gcc 4.* template question

John (Eljay) Love-Jensen eljay@adobe.com
Tue Sep 19 03:39:00 GMT 2006


Hi Tao,

I believe you cannot specify your template specialization in the body of the template class itself.

If you pull the specialization out of the class...

template<>
double MScalar<double, float64>::mod(double arg1, double arg2)
{
  return arg1;
}

...things should compile.  Assuming that "float64" is declared somewhere.

HTH,
--Eljay



More information about the Gcc-help mailing list