https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86590
--- Comment #15 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #14) > That's been asked for repeatedly but will never happen, instead this is > being added to C++2a: > http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0595r1.html > > So we'd do > > static _GLIBCXX17_CONSTEXPR size_t > length(const char_type* __s) > { > #if __cplusplus >= 201703L > if (std::is_constant_evaluated()) Hmm, std::is_constant_evaluated would only be declared for C++2a, so we'd need to use the magic builtin directly here, not the std:: wrapper.