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

2024-07-24


2348. Non-templated constexpr if

Section: 8.5.2  [stmt.if]     Status: NAD     Submitter: John Spicer     Date: 2017-05-01

The effect of constexpr if in non-templated code is primarily limited to not requiring definitions for entities that are odr-used in discarded statements. This eliminates a plausible implementation techique of simply skipping the tokens of a discarded statement. Should the Standard allow such an approach? One needed change might be to say that all diagnosable rules become “no diagnostic required” inside discarded statements.

Rationale (April, 2018):

The design was thoroughly discussed before adopting the feature and the current specification was intentionally adopted. Any request for a change should go through the normal EWG process at this point.