Created on 2014-01-04.00:00:00 last changed 62 months ago
Rationale (May, 2015):
CWG felt that the current rules should not be changed and that programmers desiring floating point values to participate in constant expressions should use constexpr instead of const.
Additional note, April, 2015:
EWG requested CWG to allow use of const floating-point variables in constant expressions.
A const integer initialized with a constant can be used in constant expressions, but a const floating point variable initialized with a constant cannot. This was intentional, to be compatible with C++03 while encouraging the consistent use of constexpr. Some people have found this distinction to be surprising, however.
It was also observed that allowing const floating point variables as constant expressions would be an ABI-breaking change, since it would affect lambda capture.
One possibility might be to deprecate the use of const integral variables in constant expressions.
|2015-05-25 00:00:00||admin||set||messages: + msg5953|
|2015-05-25 00:00:00||admin||set||status: open -> nad|
|2015-04-13 00:00:00||admin||set||messages: + msg5320|
|2015-04-13 00:00:00||admin||set||status: extension -> open|
|2014-03-03 00:00:00||admin||set||status: open -> extension|