This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15006] error: too few template-parameter-lists
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Apr 2004 21:10:21 -0000
- Subject: [Bug c++/15006] error: too few template-parameter-lists
- References: <20040418205243.15006.pluto@ds14.agh.edu.pl>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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