Why does g ++ do this?
constexprfunctions should only be evaluated at compile time in situations where the result is used as a constant expression. This includes things like initializing a variable constexprand using it as a template argument.
, constexpr , , , . , . , gcc 6.2, clang 3.9.1, -O0 , -O1 36000.