Title
constexpr vararg functions
Status
dr
Section
10.1.5 [dcl.constexpr]
Submitter
Daveed Vandevoorde

Created on 2016-04-11.00:00:00 last changed 25 months ago

Messages

Date: 2017-11-15.00:00:00

Proposed resolution (November, 2017)

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

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

    • ...

    • a relational (8.9 [expr.rel]) or equality (8.10 [expr.eq]) operator where the result is unspecified; or

    • a throw-expression (8.17 [expr.throw]). ; or

    • an invocation of the va_arg macro (21.10.1 [cstdarg.syn]).

    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 Clause 20 [library] through Clause 33 [thread] of this document, or an invocation of the va_start macro (21.10.1 [cstdarg.syn]), it is unspecified whether e is a core constant expression.

Date: 2018-03-15.00:00:00

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

It is not clear whether a constexpr function can be a vararg function or not. In particular, it is unclear if va_list is a literal type and whether va_start, va_arg, and va_end produce constant expressions.

History
Date User Action Args
2018-04-11 00:00:00adminsetstatus: tentatively ready -> dr
2018-02-27 00:00:00adminsetmessages: + msg5856
2016-04-11 00:00:00admincreate