I've tried defining a local class and then using it as a template argument, this fails to work.
Here is a very short code example: #include <iostream> template <class T> void func2785() { } class A {}; int main() { class B {} b; func2785<A>(); func2785<B>(); } This bug also in g++ 3.4.6. -- Summary: Local classes cannot be used as template arguments Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tohava at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39099