[Bug c++/17445] too few template-parameter-lists
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Mon Apr 18 20:16:00 GMT 2005
------- Additional Comments From bangerth at dealii dot org 2005-04-18 20:16 -------
This code has at least two bugs:
template class MyType<Sample>;
template <> std::map<char*,char*> MyType<Sample>::m_map;
First, the instantiation must come *after* the definition of the static
member.
Second, the definition you thought you have written is in fact only the
declaration of an explicit specialization of that member. It needs an
initializer. You need to write
template <> std::map<char*,char*> MyType<Sample>::m_map
= std::map<char*,char*>();
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17445
More information about the Gcc-bugs
mailing list