#include <vector>
#include <iostream>
template <template <typename T, typename Allocclass C>
struct A{
//C<Tc;
//A(){ c[0]=10; }
void print(){ std::cout << "A" << std::endl; }
};
int main(){
A<std::vectora ;
a.print();
}
This posted code seems the only valid way of using template template
argument in this context. I've tried a few combinations of rearranging
things but they all failed the compiler. I am wondering what's the
point of a A<std::vectora ? It really cannot contain anything, can it?
Thanks,
#include <iostream>
template <template <typename T, typename Allocclass C>
struct A{
//C<Tc;
//A(){ c[0]=10; }
void print(){ std::cout << "A" << std::endl; }
};
int main(){
A<std::vectora ;
a.print();
}
This posted code seems the only valid way of using template template
argument in this context. I've tried a few combinations of rearranging
things but they all failed the compiler. I am wondering what's the
point of a A<std::vectora ? It really cannot contain anything, can it?
Thanks,
Comment