From 6168f3ad47a5eddd6b10a84455f8fbd5a9852818 Mon Sep 17 00:00:00 2001 From: ljfa-ag Date: Wed, 1 Jul 2015 19:28:51 +0200 Subject: Change description of value::operator= Remove value constructor from tag&& --- include/value.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'include/value.h') diff --git a/include/value.h b/include/value.h index bcad7f3468..491a92b2a0 100644 --- a/include/value.h +++ b/include/value.h @@ -41,11 +41,6 @@ class value { public: explicit value() {} - explicit value(std::unique_ptr&& t); - explicit value(tag&& t); - - value& operator=(std::unique_ptr&& t); - value& operator=(tag&& t); //Movable but not (implicitly) copyable value(const value&) = delete; @@ -53,9 +48,19 @@ public: value& operator=(const value&) = delete; value& operator=(value&&) = default; - //Assignment of primitives and string + explicit value(std::unique_ptr&& t); + value& operator=(std::unique_ptr&& t); + /** * @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 + * of this value + */ + value& operator=(tag&& t); + + //Assignment of primitives and string + /** + * @brief Assigns the given value to the tag if the type is compatible * @throw std::bad_cast if the value is not convertible to the tag type * via a widening conversion */ -- cgit 0.0.5-2-1-g0f52