feat: generalize ctor and remove feature macro

This commit is contained in:
ToruNiina
2024-07-16 23:48:15 +09:00
parent b68f1fd57f
commit 00e0ce12e7

View File

@@ -645,38 +645,37 @@ class basic_value
#endif // TOML11_HAS_STRING_VIEW #endif // TOML11_HAS_STRING_VIEW
#if defined(TOML11_HAS_CHAR8_T)
template<typename T, cxx::enable_if_t<cxx::conjunction< template<typename T, cxx::enable_if_t<cxx::conjunction<
cxx::negation<std::is_same<cxx::remove_cvref_t<T>, string_type>>, cxx::negation<std::is_same<cxx::remove_cvref_t<T>, string_type>>,
std::is_same<cxx::remove_cvref_t<T>, std::u8string> detail::is_1byte_std_basic_string<T>
>::value, std::nullptr_t> = nullptr> >::value, std::nullptr_t> = nullptr>
basic_value(const T& x) basic_value(const T& x)
: basic_value(x, string_format_info{}, std::vector<std::string>{}, region_type{}) : basic_value(x, string_format_info{}, std::vector<std::string>{}, region_type{})
{} {}
template<typename T, cxx::enable_if_t<cxx::conjunction< template<typename T, cxx::enable_if_t<cxx::conjunction<
cxx::negation<std::is_same<cxx::remove_cvref_t<T>, string_type>>, cxx::negation<std::is_same<cxx::remove_cvref_t<T>, string_type>>,
std::is_same<cxx::remove_cvref_t<T>, std::u8string> detail::is_1byte_std_basic_string<T>
>::value, std::nullptr_t> = nullptr> >::value, std::nullptr_t> = nullptr>
basic_value(const T& x, string_format_info fmt) basic_value(const T& x, string_format_info fmt)
: basic_value(x, std::move(fmt), std::vector<std::string>{}, region_type{}) : basic_value(x, std::move(fmt), std::vector<std::string>{}, region_type{})
{} {}
template<typename T, cxx::enable_if_t<cxx::conjunction< template<typename T, cxx::enable_if_t<cxx::conjunction<
cxx::negation<std::is_same<cxx::remove_cvref_t<T>, string_type>>, cxx::negation<std::is_same<cxx::remove_cvref_t<T>, string_type>>,
std::is_same<cxx::remove_cvref_t<T>, std::u8string> detail::is_1byte_std_basic_string<T>
>::value, std::nullptr_t> = nullptr> >::value, std::nullptr_t> = nullptr>
basic_value(const T& x, std::vector<std::string> com) basic_value(const T& x, std::vector<std::string> com)
: basic_value(x, string_format_info{}, std::move(com), region_type{}) : basic_value(x, string_format_info{}, std::move(com), region_type{})
{} {}
template<typename T, cxx::enable_if_t<cxx::conjunction< template<typename T, cxx::enable_if_t<cxx::conjunction<
cxx::negation<std::is_same<cxx::remove_cvref_t<T>, string_type>>, cxx::negation<std::is_same<cxx::remove_cvref_t<T>, string_type>>,
std::is_same<cxx::remove_cvref_t<T>, std::u8string> detail::is_1byte_std_basic_string<T>
>::value, std::nullptr_t> = nullptr> >::value, std::nullptr_t> = nullptr>
basic_value(const T& x, string_format_info fmt, std::vector<std::string> com) basic_value(const T& x, string_format_info fmt, std::vector<std::string> com)
: basic_value(x, std::move(fmt), std::move(com), region_type{}) : basic_value(x, std::move(fmt), std::move(com), region_type{})
{} {}
template<typename T, cxx::enable_if_t<cxx::conjunction< template<typename T, cxx::enable_if_t<cxx::conjunction<
cxx::negation<std::is_same<cxx::remove_cvref_t<T>, string_type>>, cxx::negation<std::is_same<cxx::remove_cvref_t<T>, string_type>>,
std::is_same<cxx::remove_cvref_t<T>, std::u8string> detail::is_1byte_std_basic_string<T>
>::value, std::nullptr_t> = nullptr> >::value, std::nullptr_t> = nullptr>
basic_value(const T& x, string_format_info fmt, basic_value(const T& x, string_format_info fmt,
std::vector<std::string> com, region_type reg) std::vector<std::string> com, region_type reg)
@@ -686,7 +685,7 @@ class basic_value
{} {}
template<typename T, cxx::enable_if_t<cxx::conjunction< template<typename T, cxx::enable_if_t<cxx::conjunction<
cxx::negation<std::is_same<cxx::remove_cvref_t<T>, string_type>>, cxx::negation<std::is_same<cxx::remove_cvref_t<T>, string_type>>,
std::is_same<cxx::remove_cvref_t<T>, std::u8string> detail::is_1byte_std_basic_string<T>
>::value, std::nullptr_t> = nullptr> >::value, std::nullptr_t> = nullptr>
basic_value& operator=(const T& x) basic_value& operator=(const T& x)
{ {
@@ -702,8 +701,6 @@ class basic_value
return *this; return *this;
} }
#endif // TOML11_HAS_STRING_VIEW
// }}} // }}}
// constructor (local_date) =========================================== {{{ // constructor (local_date) =========================================== {{{