$ cat test.cpp
#include <vector>
template <class T>
class CRList : public std::vector<T*>
{
public:
int count() const { return size(); };
};
int main()
{
return 0;
}
$ g++-2.95 test.cpp
$ g++-4.2 test.cpp
test.cpp: In member function ‘int CRList<T>::count() const’:
test.cpp:7: error: there are no arguments to ‘size’ that depend on a template parameter, so a declaration of ‘size’ must be available
Подскажите плиз как побороть ??? Что изменить в коде чтобы g++-4.2 его съел так же как g++-2.95 ???