static template specialization

Levente Farkas lfarkas@mindmaker.hu
Wed Nov 7 06:17:00 GMT 2001


hi,
Is this code incorrect or it's just a gcc bug?
------------
class A
{
  template<typename T>
    static int get(T) { return 0; }
  template<>
    static int get(int) { return 1; }
  template<>
    static int get(double) { return 2; }
};

int main()
{
  A a;
  return 0;
}
------------
thanks your help.

 -- Levente                               "Si vis pacem para bellum!"



More information about the Gcc-bugs mailing list