#include <iostream> template<class T> int bar ( const T& ) { return 0; } struct Foo { int bar; }; template<class F> void callBar ( F& foo ) { if( foo.bar<0 ) std::cout<<foo.bar<<std::endl; } int main () { Foo foo; foo.bar = -1; callBar( foo ); return 0; } should be a correct code, but gcc complains with the error: In function ‘void callBar(F&)’: error: parse error in template argument list I got this error for the gcc version 3.4.1, 4.1.2, 4.2.4, 4.3.6, 4.4.7, 4.5.4, 4.6.4, 4.7.4, 4.8.3 and 4.9.1. The same hold for icc in different version, but not for clang 3.5.0.
EDG accepts it too.
Dup of bug 10200. *** This bug has been marked as a duplicate of bug 10200 ***