Original Post
I read somewhere - most likely C++ Templates - that templated classes can be used/written/declared in the template declaration itself. I.e. they could be declared with their own independent types that are separate from the rest of the template declaration. Unfortunately, I've forgotten both how to do it and what such a thing is called (thus Google hasn't been helpful). Here's a small (and incorrect) example to demonstrate what I mean : What am I missing ? Any help would be greatly appreciated. <edit :: fixed source tags
// this compiles fine
template<typename T, template<typename T2> class C>
class Foo { /* */ };
// as does this ... for obvious reasons
template<typename T>
class Bar { /* */ };
// unfortunately, this spawns an error in VS8
// error C3200: 'Bar<T>' : invalid template argument for template parameter 'C',
// expected a class template
Foo< int, Bar<int> > foo;