https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69138
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |msebor at gcc dot gnu.org Blocks| |55004 Known to fail| |4.9.3, 5.3.0, 6.0 --- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> --- I don't think the test case necessarily demonstrates a bug. The implicit instantiation of B<int> that's triggered by the definition of an object of the specialization "causes the implicit instantiation of the declarations, but not of the definitions, [...] of the class [...] static data members; and it causes the implicit instantiation of the definitions of unscoped member enumerations and member anonymous unions." That being said, I think the bug can be reproduced by instantiating (e.g., by virtue of using) B<int>::small_within_templated_class, for example like so: template <typename T> class B { static constexpr uint8_t small_within_templated_class = 0xFFFFFFFF; }; constexpr uint8_t i = B<int>::small_within_templated_class; Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55004 [Bug 55004] [meta-bug] constexpr issues