bug-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A bug of g++3.1


From: Jie Zhang
Subject: A bug of g++3.1
Date: Fri, 12 Jul 2002 14:22:53 +0800
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.0) Gecko/20020530

The following code has an error.

template <class T> class List{};
List<int*> li;
template <class T> class List<T*>{};
int main(){}

Comeau C++ compiler can catch it:
line 5: error: this partial specialization would have been used to
          instantiate class "List<int *>"
  template <class T> class List<T*>{};
                           ^

1 error detected


However, g++3.1 cannot.

Jie Zhang




reply via email to

[Prev in Thread] Current Thread [Next in Thread]