#include <iostream>
#include <vector>
#include <list>
using namespace std;
template <typename T,
template <typename W,typename Alloc = std::allocator<W>> typename Container = std::vector> //note the second template parameter Alloc added here
class myclass
{
public:
Container<T> myc;
public:
void func();
myclass()
{
for (int i = 0; i < 10; ++i)
{
myc.push_back(i);
}
}
};
template <typename T,
template <typename W, typename Alloc> typename Container> //note the second template parameter here
void myclass<T, Container>::func()
{
cout << "good!" << endl;
}
int main()
{
myclass<int, vector> mylistobj2;
mylistobj2.func();
return 0;
}