And as u can see, it is terribly long and cumbersome.
Is there any way to shorten it ?
I'm thinking of something like :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
// class stack
namespace
{
// I think this part was messed up
template <typename T,
typename Container = std::vector<T>>
using Stack_ = Stack<T, Container>;
usingtypename Stack_::value_type
usingtypename Stack_::size_type;
usingtypename Stack_::reference;
usingtypename Stack_::const_reference;
}
value_type Stack_::pop()
{
// ...
}
but the compiler throws errors :
Stack.hpp:45:20: error: 'template<class T, class Container> using Stack_ = Stack
<T, Container>' used without template parameters
using typename Stack_::value_type
^