Movatterモバイル変換


[0]ホーム

URL:


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

2025-12-20


2299.constexpr vararg functions

Section:9.2.6  [dcl.constexpr]    Status:CD5    Submitter:Daveed Vandevoorde    Date:2016-04-11

[Accepted as a DR at the March, 2018 (Jacksonville) meeting.]

It is not clear whether aconstexpr function can be a varargfunction or not. In particular, it is unclear ifva_list is aliteral type and whetherva_start,va_arg, andva_end produce constant expressions.

Proposed resolution (November, 2017)

  1. Add a new bullet to the list in 7.7 [expr.const] paragraph 2, and update the text as follows:

  2. An expressioneis a core constant expression unless the evaluation ofe,following the rules of the abstract machine (6.10.1 [intro.execution]),would evaluate one of the following expressions:

    Ife satisfies the constraints of a core constant expression,but evaluation ofe would evaluate an operation that has undefinedbehavior as specified in Clause 16 [library] throughClause 32 [thread] of this document,or an invocation of theva_start macro (17.14.2 [cstdarg.syn]), it isunspecified whethere is a core constant expression.




[8]ページ先頭

©2009-2026 Movatter.jp