From f2c71fafda559beec41cdf8eb7449a1c9a31d9c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20DELRIEU?= Date: Sat, 14 Jan 2017 02:47:02 +0100 Subject: [PATCH] minor message/comments tweak --- src/json.hpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/json.hpp b/src/json.hpp index f10f178b..75fece93 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -3027,16 +3027,16 @@ class basic_json uncvref_t>::value, int> = 0> // do we really want the uncvref ? if a user call get, shouldn't we - // i know there is a special behaviour for boolean_t* and such // static assert ? + // i know there is a special behaviour for boolean_t* and such auto get() const noexcept(noexcept(JSONSerializer>::from_json( std::declval(), std::declval &>()))) -> uncvref_t { using type = uncvref_t; - static_assert(std::is_default_constructible::value && + static_assert(std::is_default_constructible::value and std::is_copy_constructible::value, - "user-defined types must be DefaultConstructible and " + "Types must be DefaultConstructible and " "CopyConstructible when used with get"); type ret; JSONSerializer::from_json(*this, ret); @@ -3052,12 +3052,11 @@ class basic_json detail::has_non_default_from_json>::value, int> = 0> - constexpr uncvref_t get() const noexcept(noexcept(JSONSerializer::from_json(std::declval()))) + uncvref_t get() const noexcept(noexcept(JSONSerializer::from_json(std::declval()))) { return JSONSerializer::from_json(*this); } - // TODO what to do with those... /*! @brief get a pointer value (explicit)