Title
Labels in constexpr functions
Status
cd4
Section
9.2.6 [dcl.constexpr]
Submitter
Richard Smith

Created on 2015-07-24.00:00:00 last changed 95 months ago

Messages

Date: 2016-01-15.00:00:00

Proposed resolution (January, 2016):

Add the following as an additional bullet following 9.2.6 [dcl.constexpr] bullet 3.5.2:

The definition of a constexpr function shall satisfy the following requirements:

  • ...

  • its function-body shall be = delete, = default, or a compound-statement that does not contain

    • an asm-definition,

    • a goto statement,

    • an identifier label (8.2 [stmt.label]),

    • ...

Date: 2016-02-15.00:00:00

[Adopted at the February, 2016 meeting.]

The requirements for constexpr functions do not, but presumably should, forbid the appearance of a label in the function body (gotos are prohibited).

History
Date User Action Args
2017-02-06 00:00:00adminsetstatus: tentatively ready -> cd4
2016-02-15 00:00:00adminsetmessages: + msg5702
2016-02-15 00:00:00adminsetstatus: drafting -> tentatively ready
2015-07-24 00:00:00admincreate