I'm trying to understand C++ template templates by implementing a generic container class. Here is the code:
using namespace std;
template <typename T, template <typename STORETYPE> class Container>
class Store {
public:
~Store() {};
Store() {};
void someFunc( const T & ) {};
//...
private:
Container<T> storage;
};
int main(int argc, char *argv[])
{
Store<int,deque> myStore; // error here, won't compile!
}
The code above generates a compiler error message. The error message is:
"template template argument has different template parameters than its corresponding template template parameter Store aStack1;
I don't know why. What's wrong?