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]

static template specialization

[Get raw message]
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!"


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