Title
Constant initialization of reference to function
Status
c++14
Section
6.9.3.2 [basic.start.static]
Submitter
Daniel Krügler

Created on 2013-09-10.00:00:00 last changed 121 months ago

Messages

Date: 2014-02-15.00:00:00

[Moved to DR at the February, 2014 meeting.]

Date: 2014-01-15.00:00:00

Proposed resolution (January, 2014):

Change 6.9.3.2 [basic.start.static] paragraph 2 as follows:

...Constant initialization is performed:

  • if each full-expression (including implicit conversions) that appears in the initializer of a reference with static or thread storage duration is a constant expression (7.7 [expr.const]) and the reference is bound to an lvalue designating an object with static storage duration, or to a temporary (see 6.7.7 [class.temporary]), or to a function;

  • ...

Date: 2016-02-15.00:00:00

According to 6.9.3.2 [basic.start.static] paragraph 2,

...Constant initialization is performed:

  • if each full-expression (including implicit conversions) that appears in the initializer of a reference with static or thread storage duration is a constant expression (7.7 [expr.const]) and the reference is bound to an lvalue designating an object with static storage duration or to a temporary (see 6.7.7 [class.temporary]);

  • ...

This wording, presumably inadvertently, excludes a reference to a function from being constant initialization.

History
Date User Action Args
2014-11-24 00:00:00adminsetstatus: dr -> c++14
2014-03-03 00:00:00adminsetmessages: + msg4931
2014-03-03 00:00:00adminsetstatus: tentatively ready -> dr
2014-01-20 00:00:00adminsetmessages: + msg4720
2014-01-20 00:00:00adminsetstatus: open -> tentatively ready
2013-09-10 00:00:00admincreate