I would like to define a custom vector class that uses std::vector class with custom allocator as below:
template <class T> typedef std::vector<T, MyLib::MyAlloc<T> > my_vector; Then, when I ttry to use it as:
my_vector<std::string> v; My g++ 2.95.3 Compiler on Solaris 10 complains stating that
template declaration of `typedef class vector<T,MyLib::MyAlloc<T1> > my_vector' aggregate `class my_vector<basic_string<char,string_char_traits<char>,__default_alloc_template<false,0> > > v' has incomplete type and cannot be initialized Please help me to correct the snippet.
....MyLib::MyAlloc<T1>but there is noT1in the code. If this is really the code and the error message then this is quite strange