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]

problem specializing static member function



hi -

This is for egcs, taken from the cvs repository on Jan. 23,
on a mips-sgi-irix5.3 platform.

g++ gives an error for the appended code:
x.cc:13: `d0om_make<>' does not match any template declaration.
x.cc:13: confused by earlier errors, bailing out

It compiles without error if the `static' keyword in T2 is removed.

As far as i can tell, this code is ok by the standard.  It allows
explicit specialization of member functions of template classes,
and doesn't say anything special about static member functions...

thanks,
sss


template <class T>
class T2
{
public:
  static T2* d0om_make ();
};



template<>
T2<int>* T2<int>::d0om_make ()
{
  return new T2<int> ();
}



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