From 00e0ce12e73a4e402ef0dce3fa82d29ba631ac15 Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Tue, 16 Jul 2024 23:48:15 +0900 Subject: [PATCH] feat: generalize ctor and remove feature macro --- include/toml11/value.hpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/include/toml11/value.hpp b/include/toml11/value.hpp index b0d09e4..c1b2277 100644 --- a/include/toml11/value.hpp +++ b/include/toml11/value.hpp @@ -645,38 +645,37 @@ class basic_value #endif // TOML11_HAS_STRING_VIEW -#if defined(TOML11_HAS_CHAR8_T) template, string_type>>, - std::is_same, std::u8string> + detail::is_1byte_std_basic_string >::value, std::nullptr_t> = nullptr> basic_value(const T& x) : basic_value(x, string_format_info{}, std::vector{}, region_type{}) {} template, string_type>>, - std::is_same, std::u8string> + detail::is_1byte_std_basic_string >::value, std::nullptr_t> = nullptr> basic_value(const T& x, string_format_info fmt) : basic_value(x, std::move(fmt), std::vector{}, region_type{}) {} template, string_type>>, - std::is_same, std::u8string> + detail::is_1byte_std_basic_string >::value, std::nullptr_t> = nullptr> basic_value(const T& x, std::vector com) : basic_value(x, string_format_info{}, std::move(com), region_type{}) {} template, string_type>>, - std::is_same, std::u8string> + detail::is_1byte_std_basic_string >::value, std::nullptr_t> = nullptr> basic_value(const T& x, string_format_info fmt, std::vector com) : basic_value(x, std::move(fmt), std::move(com), region_type{}) {} template, string_type>>, - std::is_same, std::u8string> + detail::is_1byte_std_basic_string >::value, std::nullptr_t> = nullptr> basic_value(const T& x, string_format_info fmt, std::vector com, region_type reg) @@ -686,7 +685,7 @@ class basic_value {} template, string_type>>, - std::is_same, std::u8string> + detail::is_1byte_std_basic_string >::value, std::nullptr_t> = nullptr> basic_value& operator=(const T& x) { @@ -702,8 +701,6 @@ class basic_value return *this; } -#endif // TOML11_HAS_STRING_VIEW - // }}} // constructor (local_date) =========================================== {{{