http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58538
Bug ID: 58538 Summary: Injected class-name treated as type-name instead of template-name when used as a template-argument for a template template-parameter Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: d.frey at gmx dot de The following program fail to compile. template<typename> struct A { template<template<typename> class B=A> void f(); }; int main(){} with main.cpp:3:39: error: invalid use of type ‘A< <template-parameter-1-1> >’ as a default value for a template template-parameter template<template<typename> class B=A> void f(); on GCC 4.8.1. Me (and some other on SO, see <http://http://stackoverflow.com/questions/19013071/>) think it's a bug due to §14.6.1. Work-around in case it helps to narrow down the bug: Replace B=A with B=::A