Add constructors and assignment operators to Instance.

Explicitly set copy & move constructors to default, explicitly delete copy &
move assignment operators. Make destructor virtual.
This commit is contained in:
tastytea 2020-01-04 13:22:55 +01:00
parent dd1ee45c15
commit 8f03c49569
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 15 additions and 1 deletions

View File

@ -45,7 +45,21 @@ public:
* @since 0.1.0
*/
explicit Instance(string instance, string access_token);
~Instance();
//! Copy constructor
Instance(const Instance &other) = default;
//! Move constructor
Instance(Instance &&other) = default;
//! Destructor
virtual ~Instance();
//! Copy assignment operator
Instance& operator=(const Instance &other) = delete;
//! Move assignment operator
Instance& operator=(Instance &&other) = delete;
private:
const string _instance;