http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56702
Bug #: 56702 Summary: <: wrongly considered an alternative token for template argument list using global name specifier Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: mmehl...@semanticdesigns.com According to 2.5, paragraph 3, second item in list the character sequence '<:' in the following example is not a alternative token/digraph, but < is a separate token. Thus, this should not cause an error. (Note: This is different from C++98.) Example code: class X { }; template<typename> class Y { }; Y<::X> y; Command line and gcc 4.7.2 error message: >>> cp fail.cpp gcc -std=c++11 test.cpp test.cpp:4:2: error: '<::' cannot begin a template-argument list [-fpermissive] test.cpp:4:2: note: '<:' is an alternate spelling for '['. Insert whitespace between '<' and '::' test.cpp:4:2: note: (if you use '-fpermissive' G++ will accept your code)