Hi all. I'm implementing class AbstractCollection - just a wrap on std::vector - to hide from clients the fact of using std::vector in the base (because in the future I may change vector to a list or another DS). So I try to do it in this way: template class AbstractCollection { public: AbstractCollection() : m_collection() {}; AbstractCollection(const AbstractCollection &collection); ...
Hi, > xu@la a crit : > template void Foo(const std::map const typename std::map The 'problem' is that you are in a template, trying to invoke a dependent name (your const_iterator depends on T), so you must ...
Dear all, I was experimenting with a template taking two iterators for the range of a vector.(Perhaps, it is sth simple and I am missing it because it is a late hour.) I ran into problems in the compile phase , the code is below: #include #include #include #include using std::domain_error; using std::sort; using std::vector; template
Hi, I'm trying to iterate over the values of a list that has a templated type and I'm having trouble with the syntax, could anyone offer somehelp. Simplified version... #include #include using namspace std; template class test { public: void add(T a) { l.push.back(a); } void print(void) { list::iterator itr; // <-- compile error here // ... ...
I'm having a little problem with my reverse iterator class. For some reason it likes being typedef'ed once but no more after that. As long as there is only one reverse iterator typedef it compiles, be it the ordinary version or a const version. Compiler is MSVC 2008. It gives: Quote: 1>c:\users\robert\desktop\chameleon\include\chameleon\system\array.h(46) : error C2059: syntax error : '<' 1> c:\chameleon\include\chameleon\system\array.h(421) ...