summaryrefslogtreecommitdiff
path: root/include/value.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/value.h')
-rw-r--r--include/value.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/include/value.h b/include/value.h
index 64e79efe9c..02937c8f5e 100644
--- a/include/value.h
+++ b/include/value.h
@@ -39,12 +39,14 @@ public:
explicit value(std::unique_ptr<tag>&& t);
explicit value(tag&& t);
- //Movable but not (implicitly) copyable
- value(const value&) = delete;
+ //Moving
value(value&&) = default;
- value& operator=(const value&) = delete;
value& operator=(value&&) = default;
+ //Copying
+ explicit value(const value& rhs);
+ value& operator=(const value& rhs);
+
/**
* @brief Assigns the given value to the tag if the type matches
* @throw std::bad_cast if the type of @c t is not the same as the type
@@ -128,11 +130,6 @@ public:
value& operator[](const std::string& key);
value& operator[](const char* key); //need this overload because of conflict with built-in operator[]
- /**
- * @brief Creates a copy of the value
- */
- value copy() const;
-
std::unique_ptr<tag>& get_ptr();
const std::unique_ptr<tag>& get_ptr() const;
void set_ptr(std::unique_ptr<tag>&& t);