[Bug c++/18747] "template<> int i;" accepted

2006-06-05 Thread sambitdash at gmail dot com
--- Comment #3 from sambitdash at gmail dot com 2006-06-05 13:46 --- >From the C++ standard draft specification An explicit specialization of any of the following: — function template — class template — member function of a class template — static data member of a class templ

[Bug c++/18747] "template<> int i;" accepted

2006-06-04 Thread sambitdash at gmail dot com
--- Comment #2 from sambitdash at gmail dot com 2006-06-05 06:29 --- So is: struct A { }; template<> A i; which means the specilization syntax does not mandate a need the qualifying class needs to be a template type. That looks interesting!!! -- http://gcc.gnu.org/bu

[Bug c++/18101] invalid declaration in struct not rejected

2006-06-04 Thread sambitdash at gmail dot com
--- Comment #2 from sambitdash at gmail dot com 2006-06-05 06:22 --- I am not sure if this code is invalid. It's no different from saying: struct B { struct A; }; A is just a forward declaration here. In the following code is not invalid but the statement ::A is innocuou