namespace std { template > class stack { public: typedef typename Container::value_type value_type; typedef typename Container::size_type size_type; typedef Container container_type; protected: Container c; // Контейнер public: explicit stack(const Container& = Container()); bool empty() const { return c.empty(); } size_type size() const { return c.size(); } void push(const value_type& x) { c.push_back(x); } void pop() { c.pop_back(); } value_type& top() { return c.back(); } const value_type& top() const { return c.back(); } }; template bool operator==(const stack&, const stack&); template bool operator< (const stack&, const stack&); ... // (Другие операторы сравнения) }