Without inheriting from vector, how do I get all of its typedefs?
template <typename T>
class MyStack
{
public:
typename std::vector<T>::reference top()
{
return storage.front();
}
private:
std::vector<T> storage;
};
std::vector<T>::reference
is too much typing. I'm looking for something like iterator category except for containers instead of iterators. But I heard you're not allowed to inherit from standard containers.