A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/CWG/issues/1952.html below:

CWG Issue 1952

This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 117b. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2025-08-11

1952. Constant expressions and library undefined behaviorSection: 7.7  [expr.const]     Status: CD4     Submitter: Daniel Krügler     Date: 2014-06-22

[Moved to DR at the May, 2015 meeting.]

According to bullet 2.5 of 7.7 [expr.const],

A conditional-expression e is a core constant expression unless the evaluation of e, following the rules of the abstract machine (6.10.1 [intro.execution]), would evaluate one of the following expressions:

The definition of “operation” is unclear. In particular, is it intended to include use of library components that are specified to produce undefined behavior, such as use of the offsetof macro when applied to a non-standard-layout class?

Proposed resolution (April, 2015):

  1. Change 7.7 [expr.const] bullet 2.5 as follows:

  2. Add the following at the end of 7.7 [expr.const] paragraph 2:

  3. If e satisfies the constraints of a core constant expression, but evaluation of e would evaluate an operation that has undefined behavior as specified in Clauses Clause 16 [library] through Clause 32 [thread] of this International Standard, it is unspecified whether e is a core constant expression.

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4