[Bug c++/63876] static data members of template classes w/ default ctors gives "undefined reference" error
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Nov 14 18:41:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63876
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
Severity|major |normal
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
You've only declared a specialization, this is not a definition:
template<> std::mutex CRTP_class< Foo >::mutex_;
You can make it a definition with an initializer:
template<> std::mutex CRTP_class< Foo >::mutex_{};
More information about the Gcc-bugs
mailing list