[Bug c++/91158] "if (__builtin_constant_p(n))" versus "if constexpr (__builtin_constant_p(n))"

glisse at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Jul 14 16:45:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91158

--- Comment #6 from Marc Glisse <glisse at gcc dot gnu.org> ---
A related common misconception is trying to write

if constexpr (std::is_constant_evaluated())

except that this one is always true instead of always false.


More information about the Gcc-bugs mailing list