Commit 91bbe2f2 by eirrgang Committed by Jason Rhinelander

Explicitly define copy/move constructors for accessor

`accessor` currently relies on an implicit default copy constructor, but that is deprecated in C++11 when a copy assignment operator is present and can, in some cases, raise deprecation warnings (see #888).  This commit explicitly specifies the default copy constructor and also adds a default move constructor.
parent 8f6c1296
......@@ -388,6 +388,8 @@ class accessor : public object_api<accessor<Policy>> {
public:
accessor(handle obj, key_type key) : obj(obj), key(std::move(key)) { }
accessor(const accessor &a) = default;
accessor(accessor &&a) = default;
// accessor overload required to override default assignment operator (templates are not allowed
// to replace default compiler-generated assignments).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment