#ifndef STACK_H_ #define STACK_H_ class Stack { public: Stack(); ~Stack(); Stack(Stack const&); Stack(Stack&&); Stack& operator=(Stack const&); Stack& operator=(Stack&&); bool empty() const; void push(int const&); void pop(); int top() const; private: class Element { public: Element(int const& i, Element* n = nullptr); ~Element(); Element(Element const&); Element& operator=(Element const&) = delete; int data; Element* next; }; Element* first; }; class Empty_Stack : public std::out_of_range { using std::out_of_range::out_of_range; }; #endif