-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
EWGEvolutionEvolutionneeds-revisionPaper needs changes before it can proceedPaper needs changes before it can proceed
Description
Migrating from https://isocpp.org/files/papers/P1018R18.html#issues
CWG2362
Section: 9.5.1 [dcl.fct.def.general] Status: extension Submitter: Anthony Polukhin Date: 2017-10-23
The definition of func in 9.5.1 [dcl.fct.def.general] paragraph 8 is:
static const char __func__[] = "function-name";
This prohibits its use in constant expressions, e.g.,
int main () {
// error: the value of __func__ is not usable in a constant expression
constexpr char c = __func__[0];
}
Notes from the October, 2018 teleconference:
CWG agreed with the proposed change.
Rationale (November, 2018):
See also issue 1962, which asks that the type of func be const char*. These two goals are incompatible, so EWG input is requested.
Meeting: handle with 1962.
Metadata
Metadata
Assignees
Labels
EWGEvolutionEvolutionneeds-revisionPaper needs changes before it can proceedPaper needs changes before it can proceed