It is a compile-time error if actual parameters to const constructor result in invalid constant expressions #34192
Labels
area-front-end
Use area-front-end for front end / CFE / kernel format related issues.
front-end-missing-error
front-end-requires-constant-evaluation
Issue that can't be solved without evaluating compile-time constants
From
co19_2/Language/Classes/Constructors/Constant_Constructors/invalid_constant_initializer_t02
:The spec says (in 10.6.3):
"When invoked from a constant object expression, a constant constructor must throw an exception if any of its actual parameters is a value that would prevent one of the potentially constant expressions within it from being a valid compile-time constant."
Here, must throw an exception should be interpreted as should be treated as if it would have thrown an exception, i.e. it is a compile-time error.
The text was updated successfully, but these errors were encountered: