Title
String literals in constant expressions
Status
cd3
Section
7.7 [expr.const]
Submitter
Daniel Krügler

Created on 2011-04-11.00:00:00 last changed 122 months ago

Messages

Date: 2012-02-15.00:00:00

[Voted into the WP at the February, 2012 meeting; moved to DR at the October, 2012 meeting.]

Date: 2011-08-15.00:00:00

Proposed resolution (August, 2011):

Change 7.7 [expr.const] paragraph 2 as follows:

  • an lvalue-to-rvalue conversion (7.3.2 [conv.lval]) unless it is applied to

    • a glvalue of integral or enumeration type that refers to a non-volatile const object with a preceding initialization, initialized with a constant expression [Note: a string literal (5.13.5 [lex.string]) corresponds to an array of such objects. —end note], or

    • ...

Date: 2012-09-24.00:00:00

It is not clear whether a string literal can be used in a constant expression.

History
Date User Action Args
2014-03-03 00:00:00adminsetstatus: drwp -> cd3
2012-11-03 00:00:00adminsetstatus: dr -> drwp
2012-09-24 00:00:00adminsetmessages: + msg3999
2012-02-27 00:00:00adminsetmessages: + msg3795
2012-02-27 00:00:00adminsetstatus: ready -> dr
2011-04-11 00:00:00admincreate