This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/15006] error: too few template-parameter-lists


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]