[Bug c++/15006] error: too few template-parameter-lists
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Apr 18 21:16:00 GMT 2004
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-04-18 21:10 -------
Reduced to:
template<class K, class V> class EST_THash;
class EST_String
{
};
class EST_Regex
{
};
template<class K, class V>
class EST_THash {
private:
static V Dummy_Value;
static K Dummy_Key;
};
EST_Regex * EST_THash< EST_String, EST_Regex * >::Dummy_Value;
EST_String EST_THash< EST_String, EST_Regex * >::Dummy_Key;
But this is invalid. to explicit instantiation, do the follwoing:
template <> EST_Regex * EST_THash< EST_String, EST_Regex * >::Dummy_Value;
template <> EST_String EST_THash< EST_String, EST_Regex * >::Dummy_Key;
template EST_Regex * EST_THash< EST_String, EST_Regex * >::Dummy_Value;
template EST_String EST_THash< EST_String, EST_Regex * >::Dummy_Key;
But just to define the space for the definition do:
template <> EST_Regex * EST_THash< EST_String, EST_Regex * >::Dummy_Value;
template <> EST_String EST_THash< EST_String, EST_Regex * >::Dummy_Key;
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15006
More information about the Gcc-bugs
mailing list