有这样的代码:
template <class T>
class SomeClass{
typedef boost::shared_ptr<T> sPtr;
typedef std::vector<sPtr> c;
typedef c::iterator cIt; // here is the problem
};
错误是:
main.cpp:23: error: type ‘std::vector<boost::shared_ptr<X>, std::allocator<boost::shared_ptr&