http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47144
Summary: Doesn't reject attempt to define type in template
argument; results in weird parse
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: [email protected]
ReportedBy: [email protected]
GCC accepts the following:
template<typename> struct A { }; A< struct B { } >::SomeNonSense int y;
Seems like internally it creates the specialization for "A< ::B >", but its
parser goes mad at some part. It's not allowed to define types in template
arguments. C++03 seems to have missed to explicitly state that, but n3225 says
so explicitly.