// @topic T060920 Stack of integers v4
// @brief Stack class declaration with move constructor and initializer list constructor
#ifndef STACK_H_INCLUDED_
#define STACK_H_INCLUDED_
#include <iostream>
#include <algorithm>
#include <iterator>
class Stack {
static const int DEFAULT_CAPACITY = 1024;
int* stack_memory;
int capacity;
int top_pos;
public:
// constructors/destructor
Stack();
Stack(int initial_capacity);
Stack(Stack const& other); // copy constructor
Stack(Stack&& other); // move constructor
Stack( std::initializer_list<int> list); // initializer list constructor
~Stack(); // destructor
// overloaded operators
//private: // do this to disable the = operator
Stack& operator=(Stack const& other);
// other operators can be overloaded,
// we will discuss this in the future:
bool operator==(Stack const& other);
public:
// stack operations
void push(int value);
void pop();
int top() const;
int& top();
int size() const;
};// class Stack
#endif //STACK_H_INCLUDED_