mirror of https://github.com/daleclack/My_GtkUi
Update toml library
This commit is contained in:
parent
5244ae0adf
commit
4c3c388cbd
|
@ -1466,7 +1466,7 @@ TOML_NAMESPACE_START // abi namespace
|
||||||
T value;
|
T value;
|
||||||
};
|
};
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inserter(T &&) -> inserter<T&&>;
|
inserter(T&&) -> inserter<T&&>;
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inserter(T&) -> inserter<T&>;
|
inserter(T&) -> inserter<T&>;
|
||||||
|
|
||||||
|
@ -4636,7 +4636,7 @@ TOML_IMPL_NAMESPACE_START
|
||||||
{
|
{
|
||||||
template <typename T>
|
template <typename T>
|
||||||
TOML_NODISCARD
|
TOML_NODISCARD
|
||||||
static std::string make(T&& arg) noexcept
|
static std::string make(T&& arg)
|
||||||
{
|
{
|
||||||
using arg_type = std::decay_t<T>;
|
using arg_type = std::decay_t<T>;
|
||||||
#if TOML_HAS_CHAR8
|
#if TOML_HAS_CHAR8
|
||||||
|
@ -4721,6 +4721,14 @@ TOML_IMPL_NAMESPACE_START
|
||||||
}
|
}
|
||||||
return { static_cast<T>(val) };
|
return { static_cast<T>(val) };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename...>
|
||||||
|
struct value_variadic_ctor_allowed : std::true_type
|
||||||
|
{};
|
||||||
|
|
||||||
|
template <typename T, typename... Args>
|
||||||
|
struct value_variadic_ctor_allowed<value<T>, value<T>, Args...> : std::false_type
|
||||||
|
{};
|
||||||
}
|
}
|
||||||
TOML_IMPL_NAMESPACE_END;
|
TOML_IMPL_NAMESPACE_END;
|
||||||
|
|
||||||
|
@ -4759,7 +4767,9 @@ TOML_NAMESPACE_START
|
||||||
std::string_view,
|
std::string_view,
|
||||||
std::conditional_t<impl::is_one_of<value_type, double, int64_t, bool>, value_type, const value_type&>>);
|
std::conditional_t<impl::is_one_of<value_type, double, int64_t, bool>, value_type, const value_type&>>);
|
||||||
|
|
||||||
template <typename... Args>
|
TOML_HIDDEN_CONSTRAINT(
|
||||||
|
(impl::value_variadic_ctor_allowed<value<ValueType>, impl::remove_cvref<Args>...>::value),
|
||||||
|
typename... Args)
|
||||||
TOML_NODISCARD_CTOR
|
TOML_NODISCARD_CTOR
|
||||||
explicit value(Args&&... args) noexcept(noexcept(value_type(
|
explicit value(Args&&... args) noexcept(noexcept(value_type(
|
||||||
impl::native_value_maker<value_type, std::decay_t<Args>...>::make(static_cast<Args&&>(args)...))))
|
impl::native_value_maker<value_type, std::decay_t<Args>...>::make(static_cast<Args&&>(args)...))))
|
||||||
|
@ -4796,7 +4806,7 @@ TOML_NAMESPACE_START
|
||||||
value(value&& other) noexcept //
|
value(value&& other) noexcept //
|
||||||
: node(std::move(other)),
|
: node(std::move(other)),
|
||||||
val_{ std::move(other.val_) },
|
val_{ std::move(other.val_) },
|
||||||
flags_{ other.flags_ }
|
flags_{ std::exchange(other.flags_, value_flags{}) }
|
||||||
{
|
{
|
||||||
#if TOML_LIFETIME_HOOKS
|
#if TOML_LIFETIME_HOOKS
|
||||||
TOML_VALUE_CREATED;
|
TOML_VALUE_CREATED;
|
||||||
|
@ -4812,6 +4822,7 @@ TOML_NAMESPACE_START
|
||||||
#if TOML_LIFETIME_HOOKS
|
#if TOML_LIFETIME_HOOKS
|
||||||
TOML_VALUE_CREATED;
|
TOML_VALUE_CREATED;
|
||||||
#endif
|
#endif
|
||||||
|
other.flags_ = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
value& operator=(const value& rhs) noexcept
|
value& operator=(const value& rhs) noexcept
|
||||||
|
@ -4828,7 +4839,7 @@ TOML_NAMESPACE_START
|
||||||
{
|
{
|
||||||
node::operator=(std::move(rhs));
|
node::operator=(std::move(rhs));
|
||||||
val_ = std::move(rhs.val_);
|
val_ = std::move(rhs.val_);
|
||||||
flags_ = rhs.flags_;
|
flags_ = std::exchange(rhs.flags_, value_flags{});
|
||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
@ -5316,6 +5327,8 @@ TOML_NAMESPACE_START
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
value(T) -> value<impl::native_type_of<impl::remove_cvref<T>>>;
|
value(T) -> value<impl::native_type_of<impl::remove_cvref<T>>>;
|
||||||
|
template <typename T>
|
||||||
|
value(T, value_flags) -> value<impl::native_type_of<impl::remove_cvref<T>>>;
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
TOML_NODISCARD
|
TOML_NODISCARD
|
||||||
|
@ -5649,7 +5662,7 @@ TOML_IMPL_NAMESPACE_START
|
||||||
// copy/move ctor
|
// copy/move ctor
|
||||||
if constexpr (std::is_same_v<remove_cvref<T>, value_type>)
|
if constexpr (std::is_same_v<remove_cvref<T>, value_type>)
|
||||||
{
|
{
|
||||||
out = new value_type{ static_cast<T&&>(val) };
|
out = new value_type{ static_cast<T&&>(val), flags };
|
||||||
}
|
}
|
||||||
|
|
||||||
// creating from raw value
|
// creating from raw value
|
||||||
|
@ -5683,10 +5696,10 @@ TOML_IMPL_NAMESPACE_START
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
out = new value_type{ static_cast<T&&>(val) };
|
out = new value_type{ static_cast<T&&>(val) };
|
||||||
}
|
|
||||||
|
|
||||||
if (flags != preserve_source_value_flags)
|
if (flags != preserve_source_value_flags)
|
||||||
out->flags(flags);
|
out->flags(flags);
|
||||||
|
}
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
@ -8674,7 +8687,7 @@ TOML_IMPL_NAMESPACE_START
|
||||||
const auto type = state_table[byte];
|
const auto type = state_table[byte];
|
||||||
|
|
||||||
codepoint = static_cast<char32_t>(has_code_point() ? (uint_least32_t{ 255u } >> type) & byte
|
codepoint = static_cast<char32_t>(has_code_point() ? (uint_least32_t{ 255u } >> type) & byte
|
||||||
: (byte & uint_least32_t{ 63u })
|
: (byte& uint_least32_t{ 63u })
|
||||||
| (static_cast<uint_least32_t>(codepoint) << 6));
|
| (static_cast<uint_least32_t>(codepoint) << 6));
|
||||||
|
|
||||||
state = state_table[state + uint_least32_t{ 256u } + type];
|
state = state_table[state + uint_least32_t{ 256u } + type];
|
||||||
|
@ -12595,11 +12608,11 @@ TOML_ANON_NAMESPACE_START
|
||||||
template <typename Char>
|
template <typename Char>
|
||||||
utf8_reader(std::basic_string_view<Char>, std::string_view) -> utf8_reader<std::basic_string_view<Char>>;
|
utf8_reader(std::basic_string_view<Char>, std::string_view) -> utf8_reader<std::basic_string_view<Char>>;
|
||||||
template <typename Char>
|
template <typename Char>
|
||||||
utf8_reader(std::basic_string_view<Char>, std::string &&) -> utf8_reader<std::basic_string_view<Char>>;
|
utf8_reader(std::basic_string_view<Char>, std::string&&) -> utf8_reader<std::basic_string_view<Char>>;
|
||||||
template <typename Char>
|
template <typename Char>
|
||||||
utf8_reader(std::basic_istream<Char>&, std::string_view) -> utf8_reader<std::basic_istream<Char>>;
|
utf8_reader(std::basic_istream<Char>&, std::string_view) -> utf8_reader<std::basic_istream<Char>>;
|
||||||
template <typename Char>
|
template <typename Char>
|
||||||
utf8_reader(std::basic_istream<Char>&, std::string &&) -> utf8_reader<std::basic_istream<Char>>;
|
utf8_reader(std::basic_istream<Char>&, std::string&&) -> utf8_reader<std::basic_istream<Char>>;
|
||||||
|
|
||||||
#if TOML_EXCEPTIONS
|
#if TOML_EXCEPTIONS
|
||||||
#define utf8_buffered_reader_error_check(...) static_assert(true)
|
#define utf8_buffered_reader_error_check(...) static_assert(true)
|
||||||
|
|
Loading…
Reference in New Issue