Keith Thompson <kst-> writes:
> Tim Rentsch <> writes:
> [...]
>> Expressions that contain a function call and that must
>> be constant expressions are constraint violations and
>> must have a diagnostic issued, regardless of whether
>> an implementation chooses to regard them as constant
>> expressions.
>
> I'm not convinced that's correct. [snip elaboration]
This issue was addressed in Defect Report # 261, which reads in
part:
* If the syntax or context only permits a constant
expression, the constraints of 6.6#3 and 6.6#4 shall apply.
* Otherwise [ie, if the constraints above are not violated],
if the expression meets the requirements of 6.6 (including
any form accepted in accordance with 6.6#10), it is a
constant expression.
* Otherwise it is not a constant expression.
The phrase in []'s is my comment, but I'm confident it's
correct because otherwise the second bullet item makes
no sense. In any case here is the link if you want to
read the whole thing (be warned! some of the examples
flow off the right side of the page):
http://www.open-std.org/jtc1/sc22/wg...ocs/dr_261.htm