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:
parent
dd1ee45c15
commit
8f03c49569
|
@ -45,7 +45,21 @@ public:
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
explicit Instance(string instance, string access_token);
|
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:
|
private:
|
||||||
const string _instance;
|
const string _instance;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user