template<typename> class TP1 {}; template<template<typename> class A> struct B { template<typename T> struct TP2 : public A<T> {}; };
template<template<typename> class TP3, typename T> void F(const TP3<T>&) {} int main() { B<TP1>::TP2<int> b; F(b); } gets you: ~/ootbc/members/src$ c++ foo.cc foo.cc: In function `int main()': foo.cc:13: error: no matching function for call to `F(B<TP1>::TP2<int>&)' Note that simplifying to : struct B { template<typename> class TP2 {}; }; template<template<typename> class TP3, typename T> void F(const TP3<T>&) {} int main() { B::TP2<int> b; F(b); } does work OK. Ivan -- Summary: Fails to identify Product: gcc Version: 3.4.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: igodard at pacbell dot net CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22361