17#if TOML_ENABLE_WINDOWS_COMPAT
18 #define TOML_SA_VALUE_MESSAGE_WSTRING TOML_SA_LIST_SEP "std::wstring"
20 #define TOML_SA_VALUE_MESSAGE_WSTRING
23 #define TOML_SA_VALUE_MESSAGE_U8STRING_VIEW TOML_SA_LIST_SEP "std::u8string_view"
24 #define TOML_SA_VALUE_MESSAGE_CONST_CHAR8 TOML_SA_LIST_SEP "const char8_t*"
26 #define TOML_SA_VALUE_MESSAGE_U8STRING_VIEW
27 #define TOML_SA_VALUE_MESSAGE_CONST_CHAR8
30#define TOML_SA_VALUE_EXACT_FUNC_MESSAGE(type_arg) \
31 "The " type_arg " must be one of:" \
32 TOML_SA_LIST_NEW "A native TOML value type" \
33 TOML_SA_NATIVE_VALUE_TYPE_LIST \
35 TOML_SA_LIST_NXT "A non-view type capable of losslessly representing a native TOML value type" \
36 TOML_SA_LIST_BEG "std::string" \
37 TOML_SA_VALUE_MESSAGE_WSTRING \
38 TOML_SA_LIST_SEP "any signed integer type >= 64 bits" \
39 TOML_SA_LIST_SEP "any floating-point type >= 64 bits" \
42 TOML_SA_LIST_NXT "An immutable view type not requiring additional temporary storage" \
43 TOML_SA_LIST_BEG "std::string_view" \
44 TOML_SA_VALUE_MESSAGE_U8STRING_VIEW \
45 TOML_SA_LIST_SEP "const char*" \
46 TOML_SA_VALUE_MESSAGE_CONST_CHAR8 \
49#define TOML_SA_VALUE_FUNC_MESSAGE(type_arg) \
50 "The " type_arg " must be one of:" \
51 TOML_SA_LIST_NEW "A native TOML value type" \
52 TOML_SA_NATIVE_VALUE_TYPE_LIST \
54 TOML_SA_LIST_NXT "A non-view type capable of losslessly representing a native TOML value type" \
55 TOML_SA_LIST_BEG "std::string" \
56 TOML_SA_VALUE_MESSAGE_WSTRING \
57 TOML_SA_LIST_SEP "any signed integer type >= 64 bits" \
58 TOML_SA_LIST_SEP "any floating-point type >= 64 bits" \
61 TOML_SA_LIST_NXT "A non-view type capable of (reasonably) representing a native TOML value type" \
62 TOML_SA_LIST_BEG "any other integral type" \
63 TOML_SA_LIST_SEP "any floating-point type" \
66 TOML_SA_LIST_NXT "An immutable view type not requiring additional temporary storage" \
67 TOML_SA_LIST_BEG "std::string_view" \
68 TOML_SA_VALUE_MESSAGE_U8STRING_VIEW \
69 TOML_SA_LIST_SEP "const char*" \
70 TOML_SA_VALUE_MESSAGE_CONST_CHAR8 \
79 template <
typename T,
typename...>
80 struct native_value_maker
82 template <
typename... Args>
84 static T make(Args&&... args)
noexcept(std::is_nothrow_constructible_v<T, Args&&...>)
86 if constexpr (std::is_aggregate_v<T>)
87 return T{
static_cast<Args&&
>(args)... };
89 return T(
static_cast<Args&&
>(args)...);
94 struct native_value_maker<T, T>
99 static U&& make(U&& val)
noexcept
101 return static_cast<U&&
>(val);
105#if TOML_HAS_CHAR8 || TOML_ENABLE_WINDOWS_COMPAT
109 template <
typename T>
111 static std::string make(T&& arg)
113 using arg_type = std::decay_t<T>;
115 if constexpr (is_one_of<arg_type, char8_t*, const char8_t*>)
117 return std::string(
reinterpret_cast<const char*
>(
static_cast<const char8_t*
>(arg)));
119 if constexpr (is_one_of<arg_type, std::u8string, std::u8string_view>)
121 return std::string(
reinterpret_cast<const char*
>(
static_cast<const char8_t*
>(arg.data())),
126#if TOML_ENABLE_WINDOWS_COMPAT
127 if constexpr (is_wide_string<arg_type>)
129 return narrow(
static_cast<T&&
>(arg));
137 struct native_value_maker<
std::string, char8_t*> : string_maker
140 struct native_value_maker<
std::string, const char8_t*> : string_maker
143 struct native_value_maker<
std::string, std::u8string> : string_maker
146 struct native_value_maker<
std::string, std::u8string_view> : string_maker
150#if TOML_ENABLE_WINDOWS_COMPAT
152 struct native_value_maker<
std::string, wchar_t*> : string_maker
155 struct native_value_maker<
std::string, const wchar_t*> : string_maker
158 struct native_value_maker<
std::string, std::wstring> : string_maker
161 struct native_value_maker<
std::string, std::wstring_view> : string_maker
167 template <
typename T>
169 inline optional<T> node_integer_cast(int64_t val)
noexcept
171 static_assert(node_type_of<T> == node_type::integer);
172 static_assert(!is_cvref<T>);
174 using traits = value_traits<T>;
175 if constexpr (!traits::is_signed)
177 if constexpr ((
sizeof(T) * CHAR_BIT) < 63)
179 using common_t =
decltype(int64_t{} + T{});
180 if (val < int64_t{} ||
static_cast<common_t
>(val) >
static_cast<common_t
>(traits::max))
191 if (val < traits::min || val > traits::max)
194 return {
static_cast<T
>(val) };
197 template <
typename...>
198 struct value_variadic_ctor_allowed : std::true_type
201 template <
typename T,
typename... Args>
202 struct value_variadic_ctor_allowed<value<T>, value<T>, Args...> : std::false_type
220 template <
typename ValueType>
221 class value :
public node
223 static_assert(impl::is_native<ValueType> && !impl::is_cvref<ValueType>,
224 "A toml::value<> must model one of the native TOML value types:" TOML_SA_NATIVE_VALUE_TYPE_LIST);
229 friend class TOML_PARSER_TYPENAME;
231 template <
typename T,
typename U>
233 static auto as_value([[maybe_unused]] U* ptr)
noexcept
235 if constexpr (std::is_same_v<value_type, T>)
248 using value_type = ValueType;
257 std::is_same_v<value_type, std::string>,
259 std::conditional_t<impl::is_one_of<value_type, double, int64_t, bool>, value_type,
const value_type&>>);
266 (impl::value_variadic_ctor_allowed<value<ValueType>, impl::remove_cvref<Args>...>::value),
269 explicit value(Args&&... args)
noexcept(
noexcept(value_type(
270 impl::native_value_maker<value_type, std::decay_t<Args>...>::make(
static_cast<Args&&
>(args)...))))
271 : val_(impl::native_value_maker<value_type, std::decay_t<Args>...>::make(
static_cast<Args&&
>(args)...))
273#if TOML_LIFETIME_HOOKS
280 value(
const value& other)
noexcept
283 flags_{ other.flags_ }
285#if TOML_LIFETIME_HOOKS
292 value(
const value& other,
value_flags flags)
noexcept
297#if TOML_LIFETIME_HOOKS
304 value(value&& other)
noexcept
305 : node(std::move(other)),
306 val_{ std::move(other.val_) },
307 flags_{ std::exchange(other.flags_,
value_flags{}) }
309#if TOML_LIFETIME_HOOKS
317 : node(std::move(other)),
318 val_{ std::move(other.val_) },
321#if TOML_LIFETIME_HOOKS
328 value& operator=(
const value& rhs)
noexcept
330 node::operator=(rhs);
337 value& operator=(value&& rhs)
noexcept
341 node::operator=(std::move(rhs));
342 val_ = std::move(rhs.val_);
348#if TOML_LIFETIME_HOOKS
351 TOML_VALUE_DESTROYED;
369 node_type type()
const noexcept final
371 return impl::node_type_of<value_type>;
375 bool is_homogeneous(node_type ntype)
const noexcept final
377 return ntype == node_type::none || ntype == impl::node_type_of<value_type>;
381 bool is_homogeneous(node_type ntype, node*& first_nonmatch)
noexcept final
383 if (ntype != node_type::none && ntype != impl::node_type_of<value_type>)
385 first_nonmatch =
this;
392 bool is_homogeneous(node_type ntype,
const node*& first_nonmatch)
const noexcept final
394 if (ntype != node_type::none && ntype != impl::node_type_of<value_type>)
396 first_nonmatch =
this;
403 template <
typename ElemType =
void>
405 bool is_homogeneous()
const noexcept
407 using type = impl::remove_cvref<impl::unwrap_node<ElemType>>;
408 static_assert(std::is_void_v<type> || toml::is_value<type> || toml::is_container<type>,
409 "The template type argument of value::is_homogeneous() must be void or one "
410 "of:" TOML_SA_UNWRAPPED_NODE_TYPE_LIST);
412 if constexpr (std::is_void_v<type>)
415 return impl::node_type_of<type> == impl::node_type_of<value_type>;
421 bool is_table()
const noexcept final
428 bool is_array()
const noexcept final
435 bool is_array_of_tables()
const noexcept final
442 bool is_value()
const noexcept final
451 return std::is_same_v<value_type, std::string>;
458 return std::is_same_v<value_type, int64_t>;
465 return std::is_same_v<value_type, double>;
472 return impl::is_one_of<value_type, int64_t, double>;
479 return std::is_same_v<value_type, bool>;
484 bool is_date()
const noexcept final
486 return std::is_same_v<value_type, date>;
491 bool is_time()
const noexcept final
493 return std::is_same_v<value_type, time>;
500 return std::is_same_v<value_type, date_time>;
510 table* as_table()
noexcept final
517 array* as_array()
noexcept final
524 value<std::string>* as_string()
noexcept final
526 return as_value<std::string>(
this);
531 value<int64_t>* as_integer()
noexcept final
533 return as_value<int64_t>(
this);
538 value<double>* as_floating_point()
noexcept final
540 return as_value<double>(
this);
545 value<bool>* as_boolean()
noexcept final
547 return as_value<bool>(
this);
552 value<date>* as_date()
noexcept final
554 return as_value<date>(
this);
559 value<time>* as_time()
noexcept final
561 return as_value<time>(
this);
566 value<date_time>* as_date_time()
noexcept final
568 return as_value<date_time>(
this);
573 const table* as_table()
const noexcept final
580 const array* as_array()
const noexcept final
587 const value<std::string>* as_string()
const noexcept final
589 return as_value<std::string>(
this);
594 const value<int64_t>* as_integer()
const noexcept final
596 return as_value<int64_t>(
this);
601 const value<double>* as_floating_point()
const noexcept final
603 return as_value<double>(
this);
608 const value<bool>* as_boolean()
const noexcept final
610 return as_value<bool>(
this);
615 const value<date>* as_date()
const noexcept final
617 return as_value<date>(
this);
622 const value<time>* as_time()
const noexcept final
624 return as_value<time>(
this);
629 const value<date_time>* as_date_time()
const noexcept final
631 return as_value<date_time>(
this);
641 value_type& get() &
noexcept
648 value_type&& get() &&
noexcept
650 return static_cast<value_type&&
>(val_);
655 const value_type& get()
const&
noexcept
662 const value_type&& get()
const&&
noexcept
664 return static_cast<const value_type&&
>(val_);
669 value_type& operator*() &
noexcept
676 value_type&& operator*() &&
noexcept
678 return static_cast<value_type&&
>(val_);
683 const value_type& operator*()
const&
noexcept
690 const value_type&& operator*()
const&&
noexcept
692 return static_cast<const value_type&&
>(val_);
697 explicit operator value_type&() &
noexcept
704 explicit operator value_type&&() &&
noexcept
706 return static_cast<value_type&&
>(val_);
711 explicit operator const value_type&()
const&
noexcept
718 explicit operator const value_type&&() &&
noexcept
720 return static_cast<const value_type&&
>(val_);
728 value_type* operator->()
noexcept
738 const value_type* operator->()
const noexcept
766 value& operator=(value_arg rhs)
noexcept
768 if constexpr (std::is_same_v<value_type, std::string>)
776 value& operator=(std::string&& rhs)
noexcept
778 val_ = std::move(rhs);
787 friend bool operator==(
const value& lhs, value_arg rhs)
noexcept
789 if constexpr (std::is_same_v<value_type, double>)
791 const auto lhs_nan = impl::fpclassify(lhs.val_) == impl::fp_class::nan;
792 const auto rhs_nan = impl::fpclassify(rhs) == impl::fp_class::nan;
793 if (lhs_nan != rhs_nan)
798 return lhs.val_ == rhs;
804 friend bool operator<(
const value& lhs, value_arg rhs)
noexcept
806 return lhs.val_ < rhs;
811 friend bool operator<(value_arg lhs,
const value& rhs)
noexcept
813 return lhs < rhs.val_;
818 friend bool operator<=(
const value& lhs, value_arg rhs)
noexcept
820 return lhs.val_ <= rhs;
825 friend bool operator<=(value_arg lhs,
const value& rhs)
noexcept
827 return lhs <= rhs.val_;
832 friend bool operator>(
const value& lhs, value_arg rhs)
noexcept
834 return lhs.val_ > rhs;
839 friend bool operator>(value_arg lhs,
const value& rhs)
noexcept
841 return lhs > rhs.val_;
846 friend bool operator>=(
const value& lhs, value_arg rhs)
noexcept
848 return lhs.val_ >= rhs;
853 friend bool operator>=(value_arg lhs,
const value& rhs)
noexcept
855 return lhs >= rhs.val_;
864 template <
typename T>
866 friend bool operator==(
const value& lhs,
const value<T>& rhs)
noexcept
868 if constexpr (std::is_same_v<value_type, T>)
869 return lhs == rhs.val_;
880 template <
typename T>
882 friend bool operator!=(
const value& lhs,
const value<T>& rhs)
noexcept
884 return !(lhs == rhs);
896 template <
typename T>
898 friend bool operator<(
const value& lhs,
const value<T>& rhs)
noexcept
900 if constexpr (std::is_same_v<value_type, T>)
901 return lhs.val_ < rhs.val_;
903 return impl::node_type_of<value_type> < impl::node_type_of<T>;
915 template <
typename T>
917 friend bool operator<=(
const value& lhs,
const value<T>& rhs)
noexcept
919 if constexpr (std::is_same_v<value_type, T>)
920 return lhs.val_ <= rhs.val_;
922 return impl::node_type_of<value_type> <= impl::node_type_of<T>;
934 template <
typename T>
936 friend bool operator>(
const value& lhs,
const value<T>& rhs)
noexcept
938 if constexpr (std::is_same_v<value_type, T>)
939 return lhs.val_ > rhs.val_;
941 return impl::node_type_of<value_type> > impl::node_type_of<T>;
953 template <
typename T>
955 friend bool operator>=(
const value& lhs,
const value<T>& rhs)
noexcept
957 if constexpr (std::is_same_v<value_type, T>)
958 return lhs.val_ >= rhs.val_;
960 return impl::node_type_of<value_type> >= impl::node_type_of<T>;
965#if TOML_ENABLE_FORMATTERS
970 friend std::ostream&
operator<<(std::ostream& lhs,
const value& rhs)
972 impl::print_to_stream(lhs, rhs);
981 template <
typename T>
982 value(T) -> value<impl::native_type_of<impl::remove_cvref<T>>>;
983 template <
typename T>
984 value(T,
value_flags) -> value<impl::native_type_of<impl::remove_cvref<T>>>;
986 template <
typename T>
988 inline decltype(
auto) node::get_value_exact()
const noexcept(impl::value_retrieval_is_nothrow<T>)
990 using namespace impl;
992 static_assert(node_type_of<T> != node_type::none);
993 static_assert(node_type_of<T> != node_type::table);
994 static_assert(node_type_of<T> != node_type::array);
995 static_assert(is_native<T> || can_represent_native<T>);
996 static_assert(!is_cvref<T>);
999 if constexpr (node_type_of<T> == node_type::string)
1001 const auto& str = *ref_cast<std::string>();
1002 if constexpr (std::is_same_v<T, std::string>)
1004 else if constexpr (std::is_same_v<T, std::string_view>)
1006 else if constexpr (std::is_same_v<T, const char*>)
1009 else if constexpr (std::is_same_v<T, std::wstring>)
1011#if TOML_ENABLE_WINDOWS_COMPAT
1014 static_assert(always_false<T>,
"Evaluated unreachable branch!");
1021 else if constexpr (is_one_of<T, std::u8string, std::u8string_view>)
1022 return T(
reinterpret_cast<const char8_t*
>(str.c_str()), str.length());
1023 else if constexpr (std::is_same_v<T, const char8_t*>)
1024 return reinterpret_cast<const char8_t*
>(str.c_str());
1026 static_assert(always_false<T>,
"Evaluated unreachable branch!");
1031 return static_cast<T
>(*ref_cast<native_type_of<T>>());
1034 template <
typename T>
1036 inline optional<T> node::value_exact()
const noexcept(impl::value_retrieval_is_nothrow<T>)
1038 using namespace impl;
1041 "Retrieving values as wide-character strings with node::value_exact() is only "
1042 "supported on Windows with TOML_ENABLE_WINDOWS_COMPAT enabled.");
1044 static_assert((is_native<T> || can_represent_native<T>)&&!is_cvref<T>,
1045 TOML_SA_VALUE_EXACT_FUNC_MESSAGE(
"return type of node::value_exact()"));
1048 if constexpr ((is_native<T> || can_represent_native<T>)&&!is_cvref<T>)
1050 if (type() == node_type_of<T>)
1051 return { this->get_value_exact<T>() };
1057 template <
typename T>
1059 inline optional<T> node::value()
const noexcept(impl::value_retrieval_is_nothrow<T>)
1061 using namespace impl;
1064 "Retrieving values as wide-character strings with node::value() is only "
1065 "supported on Windows with TOML_ENABLE_WINDOWS_COMPAT enabled.");
1066 static_assert((is_native<T> || can_represent_native<T> || can_partially_represent_native<T>)&&!is_cvref<T>,
1067 TOML_SA_VALUE_FUNC_MESSAGE(
"return type of node::value()"));
1071 if constexpr (is_natively_one_of<T, std::string, time, date, date_time>)
1073 if (type() == node_type_of<T>)
1074 return { this->get_value_exact<T>() };
1085 case node_type::integer:
1088 if constexpr (is_natively_one_of<T, int64_t>)
1090 if constexpr (is_native<T> || can_represent_native<T>)
1091 return static_cast<T
>(*ref_cast<int64_t>());
1093 return node_integer_cast<T>(*ref_cast<int64_t>());
1097 else if constexpr (is_natively_one_of<T, double>)
1099 const int64_t val = *ref_cast<int64_t>();
1100 if constexpr (std::numeric_limits<T>::digits < 64)
1102 constexpr auto largest_whole_float = (int64_t{ 1 } << std::numeric_limits<T>::digits);
1103 if (val < -largest_whole_float || val > largest_whole_float)
1106 return static_cast<T
>(val);
1110 else if constexpr (is_natively_one_of<T, bool>)
1111 return static_cast<bool>(*ref_cast<int64_t>());
1119 case node_type::floating_point:
1122 if constexpr (is_natively_one_of<T, double>)
1124 if constexpr (is_native<T> || can_represent_native<T>)
1125 return {
static_cast<T
>(*ref_cast<double>()) };
1128 const double val = *ref_cast<double>();
1129 if (impl::fpclassify(val) == fp_class::ok
1130 && (val < (std::numeric_limits<T>::lowest)() || val > (std::numeric_limits<T>::max)()))
1132 return {
static_cast<T
>(val) };
1137 else if constexpr (is_natively_one_of<T, int64_t>)
1139 const double val = *ref_cast<double>();
1140 if (impl::fpclassify(val) == fp_class::ok
1141 &&
static_cast<double>(
static_cast<int64_t
>(val)) == val)
1142 return node_integer_cast<T>(
static_cast<int64_t
>(val));
1153 case node_type::boolean:
1156 if constexpr (is_natively_one_of<T, bool>)
1157 return { *ref_cast<bool>() };
1160 else if constexpr (is_natively_one_of<T, int64_t>)
1161 return {
static_cast<T
>(*ref_cast<bool>()) };
1174 template <
typename T>
1176 inline auto node::value_or(T && default_value)
const noexcept(impl::value_retrieval_is_nothrow<T>)
1178 using namespace impl;
1181 "Retrieving values as wide-character strings with node::value_or() is only "
1182 "supported on Windows with TOML_ENABLE_WINDOWS_COMPAT enabled.");
1184 if constexpr (is_wide_string<T>)
1186#if TOML_ENABLE_WINDOWS_COMPAT
1188 if (type() == node_type::string)
1189 return widen(*ref_cast<std::string>());
1190 return std::wstring{
static_cast<T&&
>(default_value) };
1194 static_assert(always_false<T>,
"Evaluated unreachable branch!");
1201 std::conditional_t<std::is_pointer_v<std::decay_t<T>>,
1202 std::add_pointer_t<std::add_const_t<std::remove_pointer_t<std::decay_t<T>>>>,
1204 using traits = value_traits<value_type>;
1209 traits::is_native || traits::can_represent_native || traits::can_partially_represent_native,
1210 "The default value type of node::value_or() must be one of:"
1211 TOML_SA_LIST_NEW
"A native TOML value type"
1212 TOML_SA_NATIVE_VALUE_TYPE_LIST
1214 TOML_SA_LIST_NXT
"A non-view type capable of losslessly representing a native TOML value type"
1215 TOML_SA_LIST_BEG
"std::string"
1216 #if TOML_ENABLE_WINDOWS_COMPAT
1217 TOML_SA_LIST_SEP
"std::wstring"
1219 TOML_SA_LIST_SEP
"any signed integer type >= 64 bits"
1220 TOML_SA_LIST_SEP
"any floating-point type >= 64 bits"
1223 TOML_SA_LIST_NXT
"A non-view type capable of (reasonably) representing a native TOML value type"
1224 TOML_SA_LIST_BEG
"any other integral type"
1225 TOML_SA_LIST_SEP
"any floating-point type"
1228 TOML_SA_LIST_NXT
"A compatible view type"
1229 TOML_SA_LIST_BEG
"std::string_view"
1231 TOML_SA_LIST_SEP
"std::u8string_view"
1233 #if TOML_ENABLE_WINDOWS_COMPAT
1234 TOML_SA_LIST_SEP
"std::wstring_view"
1236 TOML_SA_LIST_SEP
"const char*"
1238 TOML_SA_LIST_SEP
"const char8_t*"
1240 #if TOML_ENABLE_WINDOWS_COMPAT
1241 TOML_SA_LIST_SEP
"const wchar_t*"
1249 if constexpr (traits::is_native || traits::can_represent_native || traits::can_partially_represent_native)
1251 if constexpr (traits::is_native)
1253 if (type() == node_type_of<value_type>)
1254 return *ref_cast<typename traits::native_type>();
1256 if (
auto val = this->value<value_type>())
1258 if constexpr (std::is_pointer_v<value_type>)
1259 return value_type{ default_value };
1261 return static_cast<T&&
>(default_value);
A TOML array.
Definition array.hpp:285
A TOML table.
Definition table.hpp:220
enum TOML_OPEN_FLAGS_ENUM value_flags
Metadata associated with TOML values.
Definition forward_declarations.hpp:272
constexpr bool is_number
Metafunction for determining if a type satisfies either toml::is_integer or toml::is_floating_point.
Definition forward_declarations.hpp:986
constexpr bool is_boolean
Metafunction for determining if a type is, or is a reference to, a bool or toml::value<bool>.
Definition forward_declarations.hpp:990
constexpr bool is_floating_point
Metafunction for determining if a type is, or is a reference to, a double or toml::value<double>.
Definition forward_declarations.hpp:980
constexpr bool is_date
Metafunction for determining if a type is, or is a reference to, a toml::date or toml::value<date>.
Definition forward_declarations.hpp:996
constexpr bool is_string
Metafunction for determining if a type is, or is a reference to, a std::string or toml::value<std::st...
Definition forward_declarations.hpp:968
constexpr bool is_array
Metafunction for determining if a type is, or is a reference to, a toml::array.
Definition forward_declarations.hpp:960
constexpr bool is_date_time
Metafunction for determining if a type is, or is a reference to, a toml::date_time or toml::value<dat...
Definition forward_declarations.hpp:1008
constexpr bool is_integer
Metafunction for determining if a type is, or is a reference to, a int64_t or toml::value<int64_t>.
Definition forward_declarations.hpp:974
constexpr value_flags preserve_source_value_flags
Special #toml::value_flags constant used for array + table insert functions to specify that any value...
Definition forward_declarations.hpp:290
std::basic_ostream< Char > & operator<<(std::basic_ostream< Char > &lhs, node_type rhs)
Pretty-prints the value of a node_type to a stream.
Definition forward_declarations.hpp:256
constexpr bool is_time
Metafunction for determining if a type is, or is a reference to, a toml::time or toml::value<time>.
Definition forward_declarations.hpp:1002
constexpr bool is_value
Metafunction for determining if a type is, or is a reference to, any of the toml value types....
Definition forward_declarations.hpp:1018
#define TOML_ASSERT(expr)
Sets the assert function used by the library. \detail Defaults to the standard C assert().
Definition preprocessor.hpp:1185
#define TOML_ENABLE_WINDOWS_COMPAT
Enables the use of wide strings (wchar_t, std::wstring) in various places throughout the library when...
Definition preprocessor.hpp:1074
bool operator==(const json_pointer< RefStringTypeLhs > &lhs, const json_pointer< RefStringTypeRhs > &rhs) noexcept
Definition json.h:14737
bool operator!=(const json_pointer< RefStringTypeLhs > &lhs, const json_pointer< RefStringTypeRhs > &rhs) noexcept
Definition json.h:14762
bool operator<(const json_pointer< RefStringTypeLhs > &lhs, const json_pointer< RefStringTypeRhs > &rhs) noexcept
Definition json.h:14787
#define TOML_NODISCARD_CTOR
Definition preprocessor.hpp:446
#define POXY_IMPLEMENTATION_DETAIL(...)
Definition preprocessor.hpp:633
#define TOML_CONSTRAINED_TEMPLATE(condition,...)
Definition preprocessor.hpp:1260
#define TOML_NODISCARD
Definition preprocessor.hpp:439
#define TOML_CONST_GETTER
Definition preprocessor.hpp:485
#define TOML_PURE_GETTER
Definition preprocessor.hpp:474
#define TOML_HIDDEN_CONSTRAINT(condition,...)
Definition preprocessor.hpp:1263
#define TOML_PURE_INLINE_GETTER
Definition preprocessor.hpp:479
#define TOML_ALWAYS_INLINE
Definition preprocessor.hpp:405
#define TOML_IMPL_NAMESPACE_END
Definition preprocessor.hpp:1334
#define TOML_IMPL_NAMESPACE_START
Definition preprocessor.hpp:1333
#define TOML_ASYMMETRICAL_EQUALITY_OPS(LHS, RHS,...)
Definition preprocessor.hpp:611
#define TOML_CONST_INLINE_GETTER
Definition preprocessor.hpp:490
TOML_NAMESPACE_START
Definition value.hpp:209
TOML_DISABLE_ARITHMETIC_WARNINGS
Definition value.hpp:12
TOML_NAMESPACE_END
Definition value.hpp:1268