From ccad1a95bae539d678401776fd9a0c64a1a8543f Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Wed, 26 Mar 2025 17:43:08 +0000 Subject: [PATCH] feat [skip ci]: update single_include --- single_include/toml.hpp | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/single_include/toml.hpp b/single_include/toml.hpp index ee7f9cf..d9a40f8 100644 --- a/single_include/toml.hpp +++ b/single_include/toml.hpp @@ -3807,14 +3807,14 @@ struct is_std_tuple_impl> : std::true_type{}; template using is_std_tuple = is_std_tuple_impl>; -#if TOML11_CPLUSPLUS_STANDARD_VERSION >= TOML11_CXX17_VALUE -# if __has_include() +#if defined(TOML11_HAS_OPTIONAL) template struct is_std_optional_impl : std::false_type{}; template struct is_std_optional_impl> : std::true_type{}; template using is_std_optional = is_std_optional_impl>; -# endif // +#else +template struct is_std_optional : std::false_type{}; #endif // > C++17 template struct is_std_array_impl : std::false_type{}; @@ -3853,6 +3853,11 @@ template struct is_string_view_of : std::false_type {}; template struct is_string_view_of, std::basic_string> : std::true_type {}; +#else +template +struct is_std_basic_string_view : std::false_type {}; +template +struct is_string_view_of : std::false_type {}; #endif template struct is_chrono_duration_impl: std::false_type{}; @@ -9471,21 +9476,24 @@ namespace toml // find(value, key); template -decltype(::toml::get(std::declval const&>())) +cxx::enable_if_t>::value, + decltype(::toml::get(std::declval const&>()))> find(const basic_value& v, const typename basic_value::key_type& ky) { return ::toml::get(v.at(ky)); } template -decltype(::toml::get(std::declval&>())) +cxx::enable_if_t>::value, + decltype(::toml::get(std::declval&>()))> find(basic_value& v, const typename basic_value::key_type& ky) { return ::toml::get(v.at(ky)); } template -decltype(::toml::get(std::declval&&>())) +cxx::enable_if_t>::value, + decltype(::toml::get(std::declval&&>()))> find(basic_value&& v, const typename basic_value::key_type& ky) { return ::toml::get(std::move(v.at(ky))); @@ -9495,19 +9503,22 @@ find(basic_value&& v, const typename basic_value::key_type& ky) // find(value, idx) template -decltype(::toml::get(std::declval const&>())) +cxx::enable_if_t>::value, + decltype(::toml::get(std::declval const&>()))> find(const basic_value& v, const std::size_t idx) { return ::toml::get(v.at(idx)); } template -decltype(::toml::get(std::declval&>())) +cxx::enable_if_t>::value, + decltype(::toml::get(std::declval&>()))> find(basic_value& v, const std::size_t idx) { return ::toml::get(v.at(idx)); } template -decltype(::toml::get(std::declval&&>())) +cxx::enable_if_t>::value, + decltype(::toml::get(std::declval&&>()))> find(basic_value&& v, const std::size_t idx) { return ::toml::get(std::move(v.at(idx))); @@ -9716,19 +9727,22 @@ find(basic_value&& v, const K1& k1, const K2& k2, const Ks& ... ks) // find(v, keys...) template -decltype(::toml::get(std::declval&>())) +cxx::enable_if_t>::value, + decltype(::toml::get(std::declval&>()))> find(const basic_value& v, const K1& k1, const K2& k2, const Ks& ... ks) { return find(v.at(detail::key_cast(k1)), detail::key_cast(k2), ks...); } template -decltype(::toml::get(std::declval&>())) +cxx::enable_if_t>::value, + decltype(::toml::get(std::declval&>()))> find(basic_value& v, const K1& k1, const K2& k2, const Ks& ... ks) { return find(v.at(detail::key_cast(k1)), detail::key_cast(k2), ks...); } template -decltype(::toml::get(std::declval&&>())) +cxx::enable_if_t>::value, + decltype(::toml::get(std::declval&&>()))> find(basic_value&& v, const K1& k1, const K2& k2, const Ks& ... ks) { return find(std::move(v.at(detail::key_cast(k1))), detail::key_cast(k2), ks...);