meta_handle: deleted copy constructor (close #661)

This commit is contained in:
Michele Caini
2021-02-18 23:49:39 +01:00
parent 1757dbc225
commit 4e631f1536
2 changed files with 20 additions and 1 deletions

View File

@@ -573,6 +573,25 @@ struct meta_handle {
/*! @brief Default constructor. */
meta_handle() = default;
/*! @brief Default copy constructor, deleted on purpose. */
meta_handle(const meta_handle &) = delete;
/*! @brief Default move constructor. */
meta_handle(meta_handle &&) = default;
/**
* @brief Default copy assignment operator, deleted on purpose.
* @return This meta handle.
*/
meta_handle & operator=(const meta_handle &) = delete;
/**
* @brief Default move assignment operator.
* @return This meta handle.
*/
meta_handle & operator=(meta_handle &&) = default;
/**
* @brief Creates a handle that points to an unmanaged object.
* @tparam Type Type of object to use to initialize the handle.

View File

@@ -7,7 +7,7 @@
struct clazz_t {
void incr() { ++value; }
void decr() { --value; }
int value;
int value{};
};
struct MetaHandle: ::testing::Test {