https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87381
--- Comment #5 from eric-bugs at omnifarious dot org --- Here is the problem, reduced to the simplest expression I could make: ----- template <int x> struct test_template { static int size() { return x; } }; constexpr int ce_strlen(char const *s) { int i = 0; while (s[i]) ++i; return i; } int joe() { constexpr int plen = ce_strlen(__PRETTY_FUNCTION__); // This works test_template<plen> a; // This declaration is valid. test_template<ce_strlen(__PRETTY_FUNCTION__)> b; // But this doesn't work?! return a.size() + b.size(); } ------ Either the declaration/initialization of both plen and b should fail, or they should both succeed. It makes no sense for one to work and the other to not.