[Bug c++/54021] [c++0x] __builtin_constant_p should be constexpr
david at doublewise dot net
gcc-bugzilla@gcc.gnu.org
Sun Sep 9 06:00:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54021
--- Comment #7 from David Stone <david at doublewise dot net> 2012-09-09 06:00:37 UTC ---
That seems to me like saying that `constexpr bool d = sizeof(x);` should be
disallowed because it uses a non-constexpr. You're not using the value of x,
just a property about it. Whether a value is constexpr is guaranteed to be
known at compile time, and so should be usable as a constexpr.
More information about the Gcc-bugs
mailing list