//---------------------------------------------------------------------------------------------------------------------- // // toml++ v1.3.2 // https://github.com/marzer/tomlplusplus // SPDX-License-Identifier: MIT // //---------------------------------------------------------------------------------------------------------------------- // // - THIS FILE WAS ASSEMBLED FROM MULTIPLE HEADER FILES BY A SCRIPT - PLEASE DON'T EDIT IT DIRECTLY - // // If you wish to submit a contribution to toml++, hooray and thanks! Before you crack on, please be aware that this // file was assembled from a number of smaller files by a python script, and code contributions should not be made // against it directly. You should instead make your changes in the relevant source file(s). The file names of the files // that contributed to this header can be found at the beginnings and ends of the corresponding sections of this file. // //---------------------------------------------------------------------------------------------------------------------- // // TOML language specifications: // Latest: https://github.com/toml-lang/toml/blob/master/README.md // v1.0.0-rc.1: https://github.com/toml-lang/toml/blob/master/versions/en/toml-v1.0.0-rc.1.md // v0.5.0: https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.5.0.md // //---------------------------------------------------------------------------------------------------------------------- // // MIT License // // Copyright (c) 2019-2020 Mark Gillard // Copyright (c) 2008-2010 Bjoern Hoehrmann (utf8_decoder) // // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated // documentation files (the "Software"), to deal in the Software without restriction, including without limitation the // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the // Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE // WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // //---------------------------------------------------------------------------------------------------------------------- // clang-format off #ifndef INCLUDE_TOMLPLUSPLUS_H #define INCLUDE_TOMLPLUSPLUS_H #ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunknown-pragmas" #endif #define TOML_LIB_SINGLE_HEADER 1 //-------------- ↓ toml_preprocessor.h ------------------------------------------------------------------------------- #pragma region #ifdef TOML_CONFIG_HEADER #include TOML_CONFIG_HEADER #endif #if !defined(TOML_ALL_INLINE) || (defined(TOML_ALL_INLINE) && TOML_ALL_INLINE) #undef TOML_ALL_INLINE #define TOML_ALL_INLINE 1 #endif #if defined(TOML_IMPLEMENTATION) || TOML_ALL_INLINE || defined(__INTELLISENSE__) #undef TOML_IMPLEMENTATION #define TOML_IMPLEMENTATION 1 #else #define TOML_IMPLEMENTATION 0 #endif #ifndef TOML_API #define TOML_API #endif #ifndef TOML_CHAR_8_STRINGS #define TOML_CHAR_8_STRINGS 0 #endif #ifndef TOML_UNRELEASED_FEATURES #define TOML_UNRELEASED_FEATURES 0 #endif #ifndef TOML_LARGE_FILES #define TOML_LARGE_FILES 0 #endif #ifndef TOML_UNDEF_MACROS #define TOML_UNDEF_MACROS 1 #endif #ifndef TOML_PARSER #define TOML_PARSER 1 #endif #ifndef TOML_DOXYGEN #define TOML_DOXYGEN 0 #endif #ifndef __cplusplus #error toml++ is a C++ library. #endif #ifdef __clang__ #define TOML_PUSH_WARNINGS _Pragma("clang diagnostic push") #define TOML_DISABLE_SWITCH_WARNINGS _Pragma("clang diagnostic ignored \"-Wswitch\"") #define TOML_DISABLE_INIT_WARNINGS _Pragma("clang diagnostic ignored \"-Wmissing-field-initializers\"") #define TOML_DISABLE_VTABLE_WARNINGS _Pragma("clang diagnostic ignored \"-Weverything\"") \ _Pragma("clang diagnostic ignored \"-Wweak-vtables\"") #define TOML_DISABLE_PADDING_WARNINGS _Pragma("clang diagnostic ignored \"-Wpadded\"") #define TOML_DISABLE_FLOAT_WARNINGS _Pragma("clang diagnostic ignored \"-Wfloat-equal\"") \ _Pragma("clang diagnostic ignored \"-Wdouble-promotion\"") #define TOML_DISABLE_SHADOW_WARNINGS _Pragma("clang diagnostic ignored \"-Wshadow\"") #define TOML_DISABLE_ALL_WARNINGS _Pragma("clang diagnostic ignored \"-Weverything\"") #define TOML_POP_WARNINGS _Pragma("clang diagnostic pop") #define TOML_ASSUME(cond) __builtin_assume(cond) #define TOML_UNREACHABLE __builtin_unreachable() #define TOML_GNU_ATTR(...) __attribute__((__VA_ARGS__)) #if defined(_MSC_VER) // msvc compat mode #ifdef __has_declspec_attribute #if __has_declspec_attribute(novtable) #define TOML_INTERFACE __declspec(novtable) #endif #if __has_declspec_attribute(empty_bases) #define TOML_EMPTY_BASES __declspec(empty_bases) #endif #define TOML_ALWAYS_INLINE __forceinline #endif #endif #ifdef __has_attribute #if !defined(TOML_ALWAYS_INLINE) && __has_attribute(always_inline) #define TOML_ALWAYS_INLINE __attribute__((__always_inline__)) inline #endif #if !defined(TOML_TRIVIAL_ABI) && __has_attribute(trivial_abi) #define TOML_TRIVIAL_ABI __attribute__((__trivial_abi__)) #endif #endif #ifdef __EXCEPTIONS #define TOML_COMPILER_EXCEPTIONS 1 #else #define TOML_COMPILER_EXCEPTIONS 0 #endif #define TOML_LIKELY(...) (__builtin_expect(!!(__VA_ARGS__), 1) ) #define TOML_UNLIKELY(...) (__builtin_expect(!!(__VA_ARGS__), 0) ) //floating-point from_chars and to_chars are not implemented in any version of clang as of 1/1/2020 #ifndef TOML_FLOAT_CHARCONV #define TOML_FLOAT_CHARCONV 0 #endif #elif defined(_MSC_VER) || (defined(__INTEL_COMPILER) && defined(__ICL)) #define TOML_CPP_VERSION _MSVC_LANG #define TOML_PUSH_WARNINGS __pragma(warning(push)) #define TOML_DISABLE_SWITCH_WARNINGS __pragma(warning(disable: 4063)) #define TOML_DISABLE_ALL_WARNINGS __pragma(warning(pop)) \ __pragma(warning(push, 0)) #define TOML_POP_WARNINGS __pragma(warning(pop)) #define TOML_ALWAYS_INLINE __forceinline #define TOML_ASSUME(cond) __assume(cond) #define TOML_UNREACHABLE __assume(0) #define TOML_INTERFACE __declspec(novtable) #define TOML_EMPTY_BASES __declspec(empty_bases) #if !defined(TOML_RELOPS_REORDERING) && defined(__cpp_impl_three_way_comparison) #define TOML_RELOPS_REORDERING 1 #endif #ifdef _CPPUNWIND #define TOML_COMPILER_EXCEPTIONS 1 #else #define TOML_COMPILER_EXCEPTIONS 0 #endif #elif defined(__GNUC__) #define TOML_PUSH_WARNINGS _Pragma("GCC diagnostic push") #define TOML_DISABLE_SWITCH_WARNINGS _Pragma("GCC diagnostic ignored \"-Wswitch\"") \ _Pragma("GCC diagnostic ignored \"-Wswitch-enum\"") \ _Pragma("GCC diagnostic ignored \"-Wswitch-default\"") #define TOML_DISABLE_INIT_WARNINGS _Pragma("GCC diagnostic ignored \"-Wmissing-field-initializers\"") \ _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") \ _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") #define TOML_DISABLE_PADDING_WARNINGS _Pragma("GCC diagnostic ignored \"-Wpadded\"") #define TOML_DISABLE_FLOAT_WARNINGS _Pragma("GCC diagnostic ignored \"-Wfloat-equal\"") #define TOML_DISABLE_SHADOW_WARNINGS _Pragma("GCC diagnostic ignored \"-Wshadow\"") #define TOML_DISABLE_ALL_WARNINGS _Pragma("GCC diagnostic ignored \"-Wall\"") \ _Pragma("GCC diagnostic ignored \"-Wextra\"") \ _Pragma("GCC diagnostic ignored \"-Wchar-subscripts\"") \ _Pragma("GCC diagnostic ignored \"-Wtype-limits\"") \ TOML_DISABLE_SWITCH_WARNINGS \ TOML_DISABLE_INIT_WARNINGS \ TOML_DISABLE_PADDING_WARNINGS \ TOML_DISABLE_FLOAT_WARNINGS \ TOML_DISABLE_SHADOW_WARNINGS #define TOML_POP_WARNINGS _Pragma("GCC diagnostic pop") #define TOML_GNU_ATTR(...) __attribute__((__VA_ARGS__)) #define TOML_ALWAYS_INLINE __attribute__((__always_inline__)) inline #define TOML_UNREACHABLE __builtin_unreachable() #if !defined(TOML_RELOPS_REORDERING) && defined(__cpp_impl_three_way_comparison) #define TOML_RELOPS_REORDERING 1 #endif #ifdef __cpp_exceptions #define TOML_COMPILER_EXCEPTIONS 1 #else #define TOML_COMPILER_EXCEPTIONS 0 #endif #define TOML_LIKELY(...) (__builtin_expect(!!(__VA_ARGS__), 1) ) #define TOML_UNLIKELY(...) (__builtin_expect(!!(__VA_ARGS__), 0) ) // floating-point from_chars and to_chars are not implemented in any version of gcc as of 1/1/2020 #ifndef TOML_FLOAT_CHARCONV #define TOML_FLOAT_CHARCONV 0 #endif #endif #ifndef TOML_CPP_VERSION #define TOML_CPP_VERSION __cplusplus #endif #if TOML_CPP_VERSION < 201103L #error toml++ requires C++17 or higher. For a TOML library supporting pre-C++11 see https://github.com/ToruNiina/Boost.toml #elif TOML_CPP_VERSION < 201703L #error toml++ requires C++17 or higher. For a TOML library supporting C++11 see https://github.com/skystrife/cpptoml #elif TOML_CPP_VERSION >= 202600L #define TOML_CPP 26 #elif TOML_CPP_VERSION >= 202300L #define TOML_CPP 23 #elif TOML_CPP_VERSION >= 202002L #define TOML_CPP 20 #elif TOML_CPP_VERSION >= 201703L #define TOML_CPP 17 #endif #ifndef TOML_COMPILER_EXCEPTIONS #define TOML_COMPILER_EXCEPTIONS 1 #endif #if TOML_COMPILER_EXCEPTIONS #ifndef TOML_EXCEPTIONS #define TOML_EXCEPTIONS 1 #endif #else #if defined(TOML_EXCEPTIONS) && TOML_EXCEPTIONS #error TOML_EXCEPTIONS was explicitly enabled but exceptions are disabled/unsupported by the compiler. #endif #undef TOML_EXCEPTIONS #define TOML_EXCEPTIONS 0 #endif #if TOML_EXCEPTIONS #define TOML_MAY_THROW #else #define TOML_MAY_THROW noexcept #endif #ifndef TOML_INT_CHARCONV #define TOML_INT_CHARCONV 1 #endif #ifndef TOML_FLOAT_CHARCONV #define TOML_FLOAT_CHARCONV 1 #endif #if (TOML_INT_CHARCONV || TOML_FLOAT_CHARCONV) && !__has_include() #undef TOML_INT_CHARCONV #undef TOML_FLOAT_CHARCONV #define TOML_INT_CHARCONV 0 #define TOML_FLOAT_CHARCONV 0 #endif #ifndef TOML_PUSH_WARNINGS #define TOML_PUSH_WARNINGS #endif #ifndef TOML_DISABLE_SWITCH_WARNINGS #define TOML_DISABLE_SWITCH_WARNINGS #endif #ifndef TOML_DISABLE_INIT_WARNINGS #define TOML_DISABLE_INIT_WARNINGS #endif #ifndef TOML_DISABLE_VTABLE_WARNINGS #define TOML_DISABLE_VTABLE_WARNINGS #endif #ifndef TOML_DISABLE_PADDING_WARNINGS #define TOML_DISABLE_PADDING_WARNINGS #endif #ifndef TOML_DISABLE_FLOAT_WARNINGS #define TOML_DISABLE_FLOAT_WARNINGS #endif #ifndef TOML_DISABLE_SHADOW_WARNINGS #define TOML_DISABLE_SHADOW_WARNINGS #endif #ifndef TOML_DISABLE_ALL_WARNINGS #define TOML_DISABLE_ALL_WARNINGS #endif #ifndef TOML_POP_WARNINGS #define TOML_POP_WARNINGS #endif #ifndef TOML_GNU_ATTR #define TOML_GNU_ATTR(...) #endif #ifndef TOML_INTERFACE #define TOML_INTERFACE #endif #ifndef TOML_EMPTY_BASES #define TOML_EMPTY_BASES #endif #ifndef TOML_ALWAYS_INLINE #define TOML_ALWAYS_INLINE inline #endif #ifndef TOML_ASSUME #define TOML_ASSUME(cond) (void)0 #endif #ifndef TOML_UNREACHABLE #define TOML_UNREACHABLE TOML_ASSERT(false) #endif #define TOML_NO_DEFAULT_CASE default: TOML_UNREACHABLE #ifdef __cpp_consteval #define TOML_CONSTEVAL consteval #else #define TOML_CONSTEVAL constexpr #endif #if !TOML_DOXYGEN && !defined(__INTELLISENSE__) #if !defined(TOML_LIKELY) && __has_cpp_attribute(likely) #define TOML_LIKELY(...) (__VA_ARGS__) [[likely]] #endif #if !defined(TOML_UNLIKELY) && __has_cpp_attribute(unlikely) #define TOML_UNLIKELY(...) (__VA_ARGS__) [[unlikely]] #endif #if __has_cpp_attribute(nodiscard) >= 201907L #define TOML_NODISCARD_CTOR [[nodiscard]] #endif #endif #ifndef TOML_LIKELY #define TOML_LIKELY(...) (__VA_ARGS__) #endif #ifndef TOML_UNLIKELY #define TOML_UNLIKELY(...) (__VA_ARGS__) #endif #ifndef TOML_NODISCARD_CTOR #define TOML_NODISCARD_CTOR #endif #ifndef TOML_TRIVIAL_ABI #define TOML_TRIVIAL_ABI #endif #ifndef TOML_RELOPS_REORDERING #define TOML_RELOPS_REORDERING 0 #endif #if TOML_RELOPS_REORDERING #define TOML_ASYMMETRICAL_EQUALITY_OPS(...) #else #define TOML_ASYMMETRICAL_EQUALITY_OPS(LHS, RHS, ...) \ __VA_ARGS__ [[nodiscard]] friend bool operator == (RHS rhs, LHS lhs) noexcept { return lhs == rhs; } \ __VA_ARGS__ [[nodiscard]] friend bool operator != (LHS lhs, RHS rhs) noexcept { return !(lhs == rhs); } \ __VA_ARGS__ [[nodiscard]] friend bool operator != (RHS rhs, LHS lhs) noexcept { return !(lhs == rhs); } #endif #if TOML_ALL_INLINE #define TOML_EXTERNAL_LINKAGE inline #define TOML_INTERNAL_LINKAGE inline #define TOML_INTERNAL_NAMESPACE toml::impl #else #define TOML_EXTERNAL_LINKAGE #define TOML_INTERNAL_LINKAGE static #define TOML_INTERNAL_NAMESPACE #endif #define TOML_LIB_MAJOR 1 #define TOML_LIB_MINOR 3 #define TOML_LIB_PATCH 2 #define TOML_LANG_MAJOR 1 #define TOML_LANG_MINOR 0 #define TOML_LANG_PATCH 0 #define TOML_MAKE_VERSION(maj, min, rev) \ ((maj) * 1000 + (min) * 25 + (rev)) #if TOML_UNRELEASED_FEATURES #define TOML_LANG_EFFECTIVE_VERSION \ TOML_MAKE_VERSION(TOML_LANG_MAJOR, TOML_LANG_MINOR, TOML_LANG_PATCH+1) #else #define TOML_LANG_EFFECTIVE_VERSION \ TOML_MAKE_VERSION(TOML_LANG_MAJOR, TOML_LANG_MINOR, TOML_LANG_PATCH) #endif #define TOML_LANG_HIGHER_THAN(maj, min, rev) \ (TOML_LANG_EFFECTIVE_VERSION > TOML_MAKE_VERSION(maj, min, rev)) #define TOML_LANG_AT_LEAST(maj, min, rev) \ (TOML_LANG_EFFECTIVE_VERSION >= TOML_MAKE_VERSION(maj, min, rev)) #define TOML_LANG_UNRELEASED \ TOML_LANG_HIGHER_THAN(TOML_LANG_MAJOR, TOML_LANG_MINOR, TOML_LANG_PATCH) #if TOML_DOXYGEN || defined(__INTELLISENSE__) #define TOML_ABI_NAMESPACES 0 #define TOML_ABI_NAMESPACE_START(name) #define TOML_ABI_NAMESPACE_END #else #define TOML_ABI_NAMESPACES 1 #define TOML_ABI_NAMESPACE_START(name) inline namespace abi_##name { #define TOML_ABI_NAMESPACE_END } #endif TOML_PUSH_WARNINGS TOML_DISABLE_ALL_WARNINGS #ifndef TOML_ASSERT #ifdef NDEBUG #define TOML_ASSERT(expr) (void)0 #else #include #define TOML_ASSERT(expr) assert(expr) #endif #endif TOML_POP_WARNINGS #if TOML_CHAR_8_STRINGS #define TOML_STRING_PREFIX_1(S) u8##S #define TOML_STRING_PREFIX(S) TOML_STRING_PREFIX_1(S) #else #define TOML_STRING_PREFIX(S) S #endif #pragma endregion //-------------- ↑ toml_preprocessor.h ------------------------------------------------------------------------------- //------------------------------------------ ↓ toml_common.h --------------------------------------------------------- #pragma region TOML_PUSH_WARNINGS TOML_DISABLE_ALL_WARNINGS #if __has_include() #include #endif #include #include //memcpy, memset #include #include #include #include #include #include #ifndef TOML_OPTIONAL_TYPE #include #endif #ifndef TOML_ASSERT #ifdef NDEBUG #define TOML_ASSERT(expr) (void)0 #else #include #define TOML_ASSERT(expr) assert(expr) #endif #endif TOML_POP_WARNINGS #if TOML_CHAR_8_STRINGS && !defined(__cpp_lib_char8_t) #error toml++ requires implementation support to use char8_t strings, but yours does not provide it. #endif #ifdef __cpp_lib_launder #define TOML_LAUNDER(x) std::launder(x) #else #define TOML_LAUNDER(x) x #endif namespace toml { using namespace std::string_literals; using namespace std::string_view_literals; using size_t = std::size_t; using ptrdiff_t = std::ptrdiff_t; [[nodiscard]] TOML_GNU_ATTR(const) TOML_ALWAYS_INLINE TOML_CONSTEVAL size_t operator"" _sz(unsigned long long n) noexcept { return static_cast(n); } #if TOML_CHAR_8_STRINGS using string_char = char8_t; using string = std::u8string; using string_view = std::u8string_view; #else using string_char = char; using string = std::string; using string_view = std::string_view; #endif TOML_PUSH_WARNINGS TOML_DISABLE_PADDING_WARNINGS TOML_DISABLE_SHADOW_WARNINGS // false positive on gcc #if !TOML_DOXYGEN // foward declarations are hidden from doxygen // because they fuck it up =/ struct date; struct time; struct time_offset; class node; class array; class table; template class node_view; template class value; template class default_formatter; template class json_formatter; #ifdef TOML_OPTIONAL_TYPE TOML_ABI_NAMESPACE_START(custopt) #else TOML_ABI_NAMESPACE_START(stdopt) #endif struct date_time; TOML_ABI_NAMESPACE_END // TOML_OPTIONAL_TYPE #endif // !TOML_DOXYGEN enum class node_type : uint8_t { none, table, array, string, integer, floating_point, boolean, date, time, date_time }; TOML_POP_WARNINGS // TOML_DISABLE_PADDING_WARNINGS, TOML_DISABLE_SHADOW_WARNINGS #ifdef TOML_OPTIONAL_TYPE template using optional = TOML_OPTIONAL_TYPE; #else template using optional = std::optional; #endif #if TOML_LARGE_FILES using source_index = uint32_t; #else using source_index = uint16_t; #endif using source_path_ptr = std::shared_ptr; #if TOML_LARGE_FILES TOML_ABI_NAMESPACE_START(lf) #else TOML_ABI_NAMESPACE_START(sf) #endif struct TOML_TRIVIAL_ABI source_position { source_index line; source_index column; [[nodiscard]] explicit constexpr operator bool () const noexcept { return line > source_index{} && column > source_index{}; } [[nodiscard]] friend constexpr bool operator == (const source_position& lhs, const source_position& rhs) noexcept { return lhs.line == rhs.line && lhs.column == rhs.column; } [[nodiscard]] friend constexpr bool operator != (const source_position& lhs, const source_position& rhs) noexcept { return lhs.line != rhs.line || lhs.column != rhs.column; } [[nodiscard]] friend constexpr bool operator < (const source_position& lhs, const source_position& rhs) noexcept { return lhs.line < rhs.line || (lhs.line == rhs.line && lhs.column < rhs.column); } [[nodiscard]] friend constexpr bool operator <= (const source_position& lhs, const source_position& rhs) noexcept { return lhs.line < rhs.line || (lhs.line == rhs.line && lhs.column <= rhs.column); } }; struct source_region { source_position begin; source_position end; source_path_ptr path; }; TOML_ABI_NAMESPACE_END // TOML_LARGE_FILES } namespace toml::impl { template using string_map = std::map>; //heterogeneous lookup template using remove_cvref_t = std::remove_cv_t>; template struct is_one_of_ : std::integral_constant) > {}; template inline constexpr bool is_one_of = is_one_of_::value; template [[nodiscard]] TOML_GNU_ATTR(const) TOML_ALWAYS_INLINE constexpr std::underlying_type_t unbox_enum(T val) noexcept { return static_cast>(val); } // Q: "why not use std::find??" // A: Because is _huge_ and std::find would be the only thing I used from it. // I don't want to impose such a heavy compile-time burden on users. template [[nodiscard]] inline const T* find(const std::vector& haystack, const T& needle) noexcept { for (size_t i = 0, e = haystack.size(); i < e; i++) if (haystack[i] == needle) return haystack.data() + i; return nullptr; } #if TOML_ABI_NAMESPACES #if TOML_EXCEPTIONS TOML_ABI_NAMESPACE_START(impl_ex) #define TOML_PARSER_TYPENAME ::toml::impl::abi_impl_ex::parser #else TOML_ABI_NAMESPACE_START(impl_noex) #define TOML_PARSER_TYPENAME ::toml::impl::abi_impl_noex::parser #endif #else #define TOML_PARSER_TYPENAME ::toml::impl::parser #endif class parser; TOML_ABI_NAMESPACE_END // TOML_EXCEPTIONS template inline constexpr bool is_value = std::is_same_v || std::is_same_v || std::is_same_v || std::is_same_v || std::is_same_v || std::is_same_v || std::is_same_v; template inline constexpr bool is_value_or_promotable = is_value || std::is_same_v, string_char*> || std::is_same_v || std::is_same_v || std::is_same_v || std::is_same_v || std::is_same_v || std::is_same_v || std::is_same_v || std::is_same_v #ifdef TOML_SMALL_FLOAT_TYPE || std::is_same_v #endif #ifdef TOML_SMALL_INT_TYPE || std::is_same_v #endif ; template inline constexpr bool is_value_or_node = is_value || std::is_same_v || std::is_same_v; template struct node_wrapper { using type = T; }; template <> struct node_wrapper { using type = value; }; template <> struct node_wrapper { using type = value; }; template <> struct node_wrapper { using type = value; }; template <> struct node_wrapper { using type = value; }; template <> struct node_wrapper { using type = value; }; template <> struct node_wrapper