The gcc incorrectly parses the template arguments for default values in member functions. Here is an example: template<class T, class S> class B { };
class A { public: void foo( B<int,int> x = B<int,int>() ) { } }; Gcc 4.3.3 emits the following: 9: error: expected ',' or '...' before '>' token 9: error: wrong number of template arguments (1, should be 2) :2: error: provided for 'template<class T, class S> class B' :9: error: default argument missing for parameter 2 of 'void A::foo(B<int, int>, int)' -- Summary: Gcc parser problems on default template arguments Product: gcc Version: 4.3.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: aran at 100acres dot us GCC build triplet: i386-unknown-netbsdelf5.99.7 GCC host triplet: i386-unknown-netbsdelf5.99.7 GCC target triplet: i386-unknown-netbsdelf5.99.7 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39426