Advertisement
Guest User

Untitled

a guest
Mar 21st, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. #ifndef LIST_H
  2. #define LIST_H
  3.  
  4. #include <initializer_list>
  5. #include <memory>
  6. class List
  7. {
  8. public:
  9. List();
  10. // List(List const &);//kopieringskonstruktor
  11. // List(List &&) noexcept;//flyttkonstruktor
  12. List(std::initializer_list<int>);
  13.  
  14. // List & operator=(List const &)&;
  15. // List & operator=(List &&)& noexcept;
  16.  
  17. // void push_front(int);
  18. void push_back(int);
  19.  
  20. int back() const noexcept;
  21. int & back() noexcept;
  22.  
  23. int front() const noexcept;
  24. int & front() noexcept;
  25.  
  26. int & at(int idx);
  27. int const & at(int idx) const;
  28.  
  29. int size() const noexcept;
  30. // bool empty() const noexcept;
  31.  
  32. // void swap(List & other) noexcept;
  33. private:
  34. struct Node;
  35. Node* head {};
  36. Node* tail {};
  37. int sz {};
  38. };
  39.  
  40. #endif //LIST_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement