From 0f9321550fa5351421173c8a3ffb311eabe2111f Mon Sep 17 00:00:00 2001 From: Yoshiki Matsuda Date: Fri, 1 Mar 2024 23:49:24 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=96=20Release=20v0.4.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/cpp_yyjson.hpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/include/cpp_yyjson.hpp b/include/cpp_yyjson.hpp index a4e5005..1e2a86f 100644 --- a/include/cpp_yyjson.hpp +++ b/include/cpp_yyjson.hpp @@ -1,5 +1,5 @@ /*===================================================* -| cpp-yyjson version v0.2.0 | +| cpp-yyjson version v0.4.0 | | https://github.com/yosh-matsuda/cpp-yyjson | | | | Copyright (c) 2024 Yoshiki Matsuda @yosh-matsuda | @@ -335,11 +335,11 @@ namespace yyjson template concept to_json_inp_usr_noext = - (std::same_as || std::same_as || std::same_as) && requires( + (std::same_as || std::same_as || std::same_as)&&requires( V& v, T&& t) { caster>::to_json(v, std::forward(t)); }; template concept to_json_inp_usr_only_ext = - (std::same_as || std::same_as || std::same_as) && requires( + (std::same_as || std::same_as || std::same_as)&&requires( V& v, T&& t) { caster>::to_json(v, std::forward(t), copy_string); }; template concept to_json_inp_usr_ext = to_json_inp_usr_noext && to_json_inp_usr_only_ext; @@ -356,16 +356,15 @@ namespace yyjson concept to_json_inp_usr_defined = to_json_val_usr || to_json_arr_usr || to_json_obj_usr; template - concept to_json_def = (!to_json_usr) && requires(T&& t) { + concept to_json_def = (!to_json_usr)&&requires(T&& t) { default_caster>::to_json(std::forward(t), copy_string); default_caster>::to_json(std::forward(t)); }; template concept to_json_inp_def = - (!to_json_inp_usr) && - (std::same_as || std::same_as || std::same_as) && - requires(V& v, T&& t) { + (!to_json_inp_usr)&&(std::same_as || std::same_as || + std::same_as)&&requires(V& v, T&& t) { default_caster>::to_json(v, std::forward(t), copy_string); default_caster>::to_json(v, std::forward(t)); }; @@ -1271,7 +1270,7 @@ namespace yyjson template requires is_value_type && (std::remove_cvref_t::is_const_reference || - (std::is_const_v>)) + (std::is_const_v>)) abstract_value(T&& t) noexcept // NOLINT : doc_(std::forward(t).doc_), val_(doc_.copy_value(std::forward(t))), @@ -1281,7 +1280,7 @@ namespace yyjson template requires is_value_type && (!std::remove_cvref_t::is_const_reference && - !(std::is_const_v>)) + !(std::is_const_v>)) abstract_value(T&& t) noexcept // NOLINT : doc_(std::forward(t).doc_), val_(std::forward(t).val_), @@ -1298,8 +1297,8 @@ namespace yyjson template requires is_reference && (is_const || - (!std::remove_cvref_t::is_const && !std::is_const_v>)) && - (!(std::remove_cvref_t::is_value_type && std::is_rvalue_reference_v)) + (!std::remove_cvref_t::is_const && !std::is_const_v>)) && + (!(std::remove_cvref_t::is_value_type && std::is_rvalue_reference_v)) explicit abstract_value(T&& t) noexcept : abstract_value(std::forward(t).doc_, std::forward(t).val_) {