added trivial abi attribute to date, time, time_offset
also: - included <cassert> directly in 'debug' builds when TOML_ASSERT isn't defined - minor preprocessor cleanup - minor documentation fixes
This commit is contained in:
parent
60853e27db
commit
b2f36e38f1
@ -83,6 +83,7 @@
|
|||||||
#undef TOML_INLINE_FUNC_IMPL
|
#undef TOML_INLINE_FUNC_IMPL
|
||||||
#undef TOML_COMPILER_EXCEPTIONS
|
#undef TOML_COMPILER_EXCEPTIONS
|
||||||
#undef TOML_LAUNDER
|
#undef TOML_LAUNDER
|
||||||
|
#undef TOML_TRIVIAL_ABI
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/// \mainpage toml++
|
/// \mainpage toml++
|
||||||
|
@ -40,18 +40,12 @@
|
|||||||
#define TOML_LARGE_FILES 0
|
#define TOML_LARGE_FILES 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TOML_ASSERT
|
|
||||||
#ifdef assert
|
|
||||||
#define TOML_ASSERT(expr) assert(expr)
|
|
||||||
#else
|
|
||||||
#define TOML_ASSERT(expr) (void)0
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef TOML_UNDEF_MACROS
|
#ifndef TOML_UNDEF_MACROS
|
||||||
#define TOML_UNDEF_MACROS 1
|
#define TOML_UNDEF_MACROS 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//TOML_ASSERT
|
||||||
|
|
||||||
////////// COMPILER & ENVIRONMENT STUFF
|
////////// COMPILER & ENVIRONMENT STUFF
|
||||||
|
|
||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
@ -66,8 +60,9 @@
|
|||||||
#define TOML_POP_WARNINGS _Pragma("clang diagnostic pop")
|
#define TOML_POP_WARNINGS _Pragma("clang diagnostic pop")
|
||||||
#define TOML_ASSUME(cond) __builtin_assume(cond)
|
#define TOML_ASSUME(cond) __builtin_assume(cond)
|
||||||
#define TOML_UNREACHABLE __builtin_unreachable()
|
#define TOML_UNREACHABLE __builtin_unreachable()
|
||||||
|
#define TOML_GNU_ATTR(attr) __attribute__((attr))
|
||||||
#if defined(_MSC_VER) // msvc compat mode
|
#if defined(_MSC_VER) // msvc compat mode
|
||||||
#if defined(__has_declspec_attribute)
|
#ifdef __has_declspec_attribute
|
||||||
#if __has_declspec_attribute(novtable)
|
#if __has_declspec_attribute(novtable)
|
||||||
#define TOML_INTERFACE __declspec(novtable)
|
#define TOML_INTERFACE __declspec(novtable)
|
||||||
#endif
|
#endif
|
||||||
@ -76,12 +71,13 @@
|
|||||||
#endif
|
#endif
|
||||||
#define TOML_ALWAYS_INLINE __forceinline
|
#define TOML_ALWAYS_INLINE __forceinline
|
||||||
#endif
|
#endif
|
||||||
#else // regular ol' clang
|
#endif
|
||||||
#define TOML_GNU_ATTR(attr) __attribute__((attr))
|
#ifdef __has_attribute
|
||||||
#ifdef __has_attribute
|
#if !defined(TOML_ALWAYS_INLINE) && __has_attribute(always_inline)
|
||||||
#if __has_attribute(always_inline)
|
#define TOML_ALWAYS_INLINE __attribute__((__always_inline__)) inline
|
||||||
#define TOML_ALWAYS_INLINE __attribute__((__always_inline__)) inline
|
#endif
|
||||||
#endif
|
#if !defined(TOML_TRIVIAL_ABI) && __has_attribute(trivial_abi)
|
||||||
|
#define TOML_TRIVIAL_ABI __attribute__((__trivial_abi__))
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef __EXCEPTIONS
|
#ifdef __EXCEPTIONS
|
||||||
@ -244,6 +240,9 @@
|
|||||||
#ifndef TOML_UNLIKELY
|
#ifndef TOML_UNLIKELY
|
||||||
#define TOML_UNLIKELY
|
#define TOML_UNLIKELY
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef TOML_TRIVIAL_ABI
|
||||||
|
#define TOML_TRIVIAL_ABI
|
||||||
|
#endif
|
||||||
#ifndef TOML_NODISCARD_CTOR
|
#ifndef TOML_NODISCARD_CTOR
|
||||||
#define TOML_NODISCARD_CTOR
|
#define TOML_NODISCARD_CTOR
|
||||||
#endif
|
#endif
|
||||||
@ -338,6 +337,14 @@ TOML_DISABLE_ALL_WARNINGS
|
|||||||
#include <map>
|
#include <map>
|
||||||
#include <iosfwd>
|
#include <iosfwd>
|
||||||
#include <charconv>
|
#include <charconv>
|
||||||
|
#ifndef TOML_ASSERT
|
||||||
|
#if !defined(NDEBUG) || defined(_DEBUG) || defined(DEBUG)
|
||||||
|
#include <cassert>
|
||||||
|
#define TOML_ASSERT(expr) assert(expr)
|
||||||
|
#else
|
||||||
|
#define TOML_ASSERT(expr) (void)0
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
#ifndef TOML_OPTIONAL_TYPE
|
#ifndef TOML_OPTIONAL_TYPE
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#endif
|
#endif
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
TOML_START
|
TOML_START
|
||||||
{
|
{
|
||||||
/// \brief A local date.
|
/// \brief A local date.
|
||||||
struct date final
|
struct TOML_TRIVIAL_ABI date final
|
||||||
{
|
{
|
||||||
/// \brief The year component.
|
/// \brief The year component.
|
||||||
uint16_t year;
|
uint16_t year;
|
||||||
@ -92,7 +92,7 @@ TOML_START
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// \brief A local time-of-day.
|
/// \brief A local time-of-day.
|
||||||
struct time final
|
struct TOML_TRIVIAL_ABI time final
|
||||||
{
|
{
|
||||||
/// \brief The hour component, from 0 - 23.
|
/// \brief The hour component, from 0 - 23.
|
||||||
uint8_t hour;
|
uint8_t hour;
|
||||||
@ -180,7 +180,7 @@ TOML_START
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// \brief A timezone offset.
|
/// \brief A timezone offset.
|
||||||
struct time_offset final
|
struct TOML_TRIVIAL_ABI time_offset final
|
||||||
{
|
{
|
||||||
/// \brief Offset from UTC+0, in minutes.
|
/// \brief Offset from UTC+0, in minutes.
|
||||||
int16_t minutes;
|
int16_t minutes;
|
||||||
|
@ -484,10 +484,9 @@ TOML_START
|
|||||||
|
|
||||||
/// \brief Gets a raw reference to a value node's underlying data.
|
/// \brief Gets a raw reference to a value node's underlying data.
|
||||||
///
|
///
|
||||||
/// \warning This function is dangerous if used carelessly and **WILL** break your code if the chosen value type
|
/// \warning This function is dangerous if used carelessly and **WILL** break your code if the
|
||||||
/// doesn't match the node's actual type. If you provide a definition for `TOML_ASSERT`
|
/// chosen value type doesn't match the node's actual type. In debug builds an assertion
|
||||||
/// (explicitly or indirectly by including `<cassert>`) an assertion will fire when
|
/// will fire when invalid accesses are attempted: \cpp
|
||||||
/// invalid accesses are attempted: \cpp
|
|
||||||
///
|
///
|
||||||
/// auto tbl = toml::parse(R"(
|
/// auto tbl = toml::parse(R"(
|
||||||
///
|
///
|
||||||
|
@ -217,8 +217,7 @@ TOML_START
|
|||||||
///
|
///
|
||||||
/// \warning This function is dangerous if used carelessly and **WILL** break your code if the
|
/// \warning This function is dangerous if used carelessly and **WILL** break your code if the
|
||||||
/// node_view didn't reference a node, or the chosen value type doesn't match the node's
|
/// node_view didn't reference a node, or the chosen value type doesn't match the node's
|
||||||
/// actual type. If you provide a definition for TOML_ASSERT (explicitly or indirectly
|
/// actual type. In debug builds an assertion will fire when invalid accesses are attempted: \cpp
|
||||||
/// by including `<cassert>`) an assertion will fire when invalid accesses are attempted: \cpp
|
|
||||||
///
|
///
|
||||||
/// auto tbl = toml::parse(R"(
|
/// auto tbl = toml::parse(R"(
|
||||||
///
|
///
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#define TOML_LIB_MAJOR 0
|
#define TOML_LIB_MAJOR 0
|
||||||
#define TOML_LIB_MINOR 5
|
#define TOML_LIB_MINOR 5
|
||||||
#define TOML_LIB_PATCH 1
|
#define TOML_LIB_PATCH 2
|
||||||
|
|
||||||
#define TOML_LANG_MAJOR 0
|
#define TOML_LANG_MAJOR 0
|
||||||
#define TOML_LANG_MINOR 5
|
#define TOML_LANG_MINOR 5
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
project(
|
project(
|
||||||
'tomlplusplus',
|
'tomlplusplus',
|
||||||
'cpp',
|
'cpp',
|
||||||
version : '0.5.1',
|
version : '0.5.2',
|
||||||
license : 'MIT',
|
license : 'MIT',
|
||||||
default_options : [
|
default_options : [
|
||||||
'cpp_std=c++17',
|
'cpp_std=c++17',
|
||||||
|
@ -25,21 +25,7 @@ inline_namespaces = [
|
|||||||
inline_namespace_explainer = 'All members of this namespace are automatically members of the parent namespace. ' \
|
inline_namespace_explainer = 'All members of this namespace are automatically members of the parent namespace. ' \
|
||||||
+ 'It does not require an explicit \'using\' statement.'
|
+ 'It does not require an explicit \'using\' statement.'
|
||||||
type_names = [
|
type_names = [
|
||||||
'table',
|
#------ standard types
|
||||||
'array',
|
|
||||||
'value',
|
|
||||||
'date',
|
|
||||||
'time',
|
|
||||||
'date_time',
|
|
||||||
'time_offset',
|
|
||||||
'string',
|
|
||||||
'string_view',
|
|
||||||
'string_char',
|
|
||||||
'parse_result',
|
|
||||||
'parse_error',
|
|
||||||
'json_formatter',
|
|
||||||
'default_formatter',
|
|
||||||
'format_flags',
|
|
||||||
'size_t',
|
'size_t',
|
||||||
'uint8_t',
|
'uint8_t',
|
||||||
'uint16_t',
|
'uint16_t',
|
||||||
@ -71,7 +57,24 @@ type_names = [
|
|||||||
'ofstream',
|
'ofstream',
|
||||||
'stringstream',
|
'stringstream',
|
||||||
'istringstream',
|
'istringstream',
|
||||||
'ostringstream'
|
'ostringstream',
|
||||||
|
'string_view',
|
||||||
|
'string',
|
||||||
|
'byte',
|
||||||
|
#------ toml++ types
|
||||||
|
'table',
|
||||||
|
'array',
|
||||||
|
'value',
|
||||||
|
'date',
|
||||||
|
'time',
|
||||||
|
'date_time',
|
||||||
|
'time_offset',
|
||||||
|
'string_char',
|
||||||
|
'parse_result',
|
||||||
|
'parse_error',
|
||||||
|
'json_formatter',
|
||||||
|
'default_formatter',
|
||||||
|
'format_flags'
|
||||||
]
|
]
|
||||||
all_namespaces = [
|
all_namespaces = [
|
||||||
'std',
|
'std',
|
||||||
@ -657,16 +660,13 @@ class ExtDocLinksFix(object):
|
|||||||
(r'std::(?:basic_|w)?ostringstreams?', 'https://en.cppreference.com/w/cpp/io/basic_ostringstream'),
|
(r'std::(?:basic_|w)?ostringstreams?', 'https://en.cppreference.com/w/cpp/io/basic_ostringstream'),
|
||||||
(r'std::(?:basic_|w)?stringstreams?', 'https://en.cppreference.com/w/cpp/io/basic_stringstream'),
|
(r'std::(?:basic_|w)?stringstreams?', 'https://en.cppreference.com/w/cpp/io/basic_stringstream'),
|
||||||
(r'std::(?:basic_|w|u8)?string_views?', 'https://en.cppreference.com/w/cpp/string/basic_string_view'),
|
(r'std::(?:basic_|w|u8)?string_views?', 'https://en.cppreference.com/w/cpp/string/basic_string_view'),
|
||||||
(r'std::(?:basic_|w|u8)?strings?', 'https://en.cppreference.com/w/cpp/string/basic_string'),
|
(r'std::(?:basic_|w|u8)?strings?', 'https://en.cppreference.com/w/cpp/string/basic_string'),
|
||||||
|
|
||||||
(r'\s(?:<|<)fstream(?:>|>)', 'https://en.cppreference.com/w/cpp/header/fstream'),
|
(r'\s(?:<|<)fstream(?:>|>)', 'https://en.cppreference.com/w/cpp/header/fstream'),
|
||||||
(r'\s(?:<|<)sstream(?:>|>)', 'https://en.cppreference.com/w/cpp/header/sstream'),
|
(r'\s(?:<|<)sstream(?:>|>)', 'https://en.cppreference.com/w/cpp/header/sstream'),
|
||||||
(r'\s(?:<|<)iostream(?:>|>)', 'https://en.cppreference.com/w/cpp/header/iostream'),
|
(r'\s(?:<|<)iostream(?:>|>)', 'https://en.cppreference.com/w/cpp/header/iostream'),
|
||||||
(r'\s(?:<|<)iosfwd(?:>|>)', 'https://en.cppreference.com/w/cpp/header/iosfwd'),
|
(r'\s(?:<|<)iosfwd(?:>|>)', 'https://en.cppreference.com/w/cpp/header/iosfwd'),
|
||||||
(r'\s(?:<|<)string(?:>|>)', 'https://en.cppreference.com/w/cpp/header/string'),
|
(r'\s(?:<|<)string(?:>|>)', 'https://en.cppreference.com/w/cpp/header/string'),
|
||||||
(r'\s(?:<|<)string_view(?:>|>)', 'https://en.cppreference.com/w/cpp/header/string_view'),
|
(r'\s(?:<|<)string_view(?:>|>)', 'https://en.cppreference.com/w/cpp/header/string_view'),
|
||||||
|
|
||||||
|
|
||||||
(r'char(?:8|16|32)_ts?', 'https://en.cppreference.com/w/cpp/language/types'),
|
(r'char(?:8|16|32)_ts?', 'https://en.cppreference.com/w/cpp/language/types'),
|
||||||
(r'std::is_(?:nothrow_)?convertible(?:_v)?', 'https://en.cppreference.com/w/cpp/types/is_convertible'),
|
(r'std::is_(?:nothrow_)?convertible(?:_v)?', 'https://en.cppreference.com/w/cpp/types/is_convertible'),
|
||||||
(r'std::is_same(?:_v)?', 'https://en.cppreference.com/w/cpp/types/is_same'),
|
(r'std::is_same(?:_v)?', 'https://en.cppreference.com/w/cpp/types/is_same'),
|
||||||
@ -683,8 +683,15 @@ class ExtDocLinksFix(object):
|
|||||||
(r'std::add_[lr]value_reference(?:_t)?', 'https://en.cppreference.com/w/cpp/types/add_reference'),
|
(r'std::add_[lr]value_reference(?:_t)?', 'https://en.cppreference.com/w/cpp/types/add_reference'),
|
||||||
(r'std::remove_reference(?:_t)?', 'https://en.cppreference.com/w/cpp/types/remove_reference'),
|
(r'std::remove_reference(?:_t)?', 'https://en.cppreference.com/w/cpp/types/remove_reference'),
|
||||||
(r'std::remove_cv(?:_t)?', 'https://en.cppreference.com/w/cpp/types/remove_cv'),
|
(r'std::remove_cv(?:_t)?', 'https://en.cppreference.com/w/cpp/types/remove_cv'),
|
||||||
|
(r'std::underlying_type(?:_t)?', 'https://en.cppreference.com/w/cpp/types/underlying_type'),
|
||||||
(r'std::exceptions?', 'https://en.cppreference.com/w/cpp/error/exception'),
|
(r'std::exceptions?', 'https://en.cppreference.com/w/cpp/error/exception'),
|
||||||
(r'std::runtime_errors?', 'https://en.cppreference.com/w/cpp/error/runtime_error'),
|
(r'std::runtime_errors?', 'https://en.cppreference.com/w/cpp/error/runtime_error'),
|
||||||
|
(r'std::is_constant_evaluated', 'https://en.cppreference.com/w/cpp/types/is_constant_evaluated'),
|
||||||
|
(r'std::launder', 'https://en.cppreference.com/w/cpp/utility/launder'),
|
||||||
|
(r'std::bit_width', 'https://en.cppreference.com/w/cpp/numeric/bit_width'),
|
||||||
|
(r'std::bit_ceil', 'https://en.cppreference.com/w/cpp/numeric/bit_ceil'),
|
||||||
|
(r'std::bit_floor', 'https://en.cppreference.com/w/cpp/numeric/bit_floor'),
|
||||||
|
(r'std::bit_cast', 'https://en.cppreference.com/w/cpp/numeric/bit_cast'),
|
||||||
(r'std::initializer_lists?', 'https://en.cppreference.com/w/cpp/utility/initializer_list'),
|
(r'std::initializer_lists?', 'https://en.cppreference.com/w/cpp/utility/initializer_list'),
|
||||||
(
|
(
|
||||||
r'(?:L?P)?(?:'
|
r'(?:L?P)?(?:'
|
||||||
@ -704,7 +711,15 @@ class ExtDocLinksFix(object):
|
|||||||
(r'(?:Legacy)?BidirectionalIterators?', 'https://en.cppreference.com/w/cpp/named_req/BidirectionalIterator'),
|
(r'(?:Legacy)?BidirectionalIterators?', 'https://en.cppreference.com/w/cpp/named_req/BidirectionalIterator'),
|
||||||
(r'(?:Legacy)?RandomAccessIterators?', 'https://en.cppreference.com/w/cpp/named_req/RandomAccessIterator'),
|
(r'(?:Legacy)?RandomAccessIterators?', 'https://en.cppreference.com/w/cpp/named_req/RandomAccessIterator'),
|
||||||
(r'(?:Legacy)?ContiguousIterators?', 'https://en.cppreference.com/w/cpp/named_req/ContiguousIterator'),
|
(r'(?:Legacy)?ContiguousIterators?', 'https://en.cppreference.com/w/cpp/named_req/ContiguousIterator'),
|
||||||
#(r'(?:Legacy)?Iterators?', 'https://en.cppreference.com/w/cpp/named_req/Iterator'),
|
(
|
||||||
|
r'(?:'
|
||||||
|
+ r'__cplusplus|__STDC_HOSTED__'
|
||||||
|
+ r'|__FILE__|__LINE__'
|
||||||
|
+ r'|__DATE__|__TIME__'
|
||||||
|
+ r'|__STDCPP_DEFAULT_NEW_ALIGNMENT__'
|
||||||
|
+ r')',
|
||||||
|
'https://en.cppreference.com/w/cpp/preprocessor/replace'
|
||||||
|
),
|
||||||
# toml-specific
|
# toml-specific
|
||||||
(r'toml::values?', 'classtoml_1_1value.html'),
|
(r'toml::values?', 'classtoml_1_1value.html'),
|
||||||
(r'(toml::)?date_times?', 'structtoml_1_1date__time.html'),
|
(r'(toml::)?date_times?', 'structtoml_1_1date__time.html'),
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
#endif
|
#endif
|
||||||
#define TOML_OPTIONAL_TYPE tl::optional
|
#define TOML_OPTIONAL_TYPE tl::optional
|
||||||
#endif
|
#endif
|
||||||
|
#if !defined(_MSC_VER) || !defined(_M_IX86)
|
||||||
#include <cassert> //so TOML_ASSERT() maps to assert()
|
#define TOML_ALL_INLINE 0
|
||||||
#define TOML_ALL_INLINE 0
|
#define TOML_IMPLEMENTATION
|
||||||
#define TOML_IMPLEMENTATION
|
#endif
|
||||||
#include "../include/toml++/toml.h"
|
#include "../include/toml++/toml.h"
|
||||||
|
|
||||||
#define CATCH_CONFIG_RUNNER
|
#define CATCH_CONFIG_RUNNER
|
||||||
|
@ -9,9 +9,10 @@
|
|||||||
#endif
|
#endif
|
||||||
#include "catch2.h"
|
#include "catch2.h"
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <cassert> //so TOML_ASSERT() maps to assert()
|
|
||||||
#define TOML_UNDEF_MACROS 0
|
#define TOML_UNDEF_MACROS 0
|
||||||
#define TOML_ALL_INLINE 0
|
#if !defined(_MSC_VER) || !defined(_M_IX86)
|
||||||
|
#define TOML_ALL_INLINE 0
|
||||||
|
#endif
|
||||||
#include "../include/toml++/toml.h"
|
#include "../include/toml++/toml.h"
|
||||||
|
|
||||||
#if TOML_COMPILER_EXCEPTIONS
|
#if TOML_COMPILER_EXCEPTIONS
|
||||||
|
48
toml.hpp
48
toml.hpp
@ -1,6 +1,6 @@
|
|||||||
//----------------------------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// toml++ v0.5.1
|
// toml++ v0.5.2
|
||||||
// https://github.com/marzer/tomlplusplus
|
// https://github.com/marzer/tomlplusplus
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
//
|
//
|
||||||
@ -83,18 +83,12 @@
|
|||||||
#define TOML_LARGE_FILES 0
|
#define TOML_LARGE_FILES 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TOML_ASSERT
|
|
||||||
#ifdef assert
|
|
||||||
#define TOML_ASSERT(expr) assert(expr)
|
|
||||||
#else
|
|
||||||
#define TOML_ASSERT(expr) (void)0
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef TOML_UNDEF_MACROS
|
#ifndef TOML_UNDEF_MACROS
|
||||||
#define TOML_UNDEF_MACROS 1
|
#define TOML_UNDEF_MACROS 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//TOML_ASSERT
|
||||||
|
|
||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
#error toml++ is a C++ library.
|
#error toml++ is a C++ library.
|
||||||
#endif
|
#endif
|
||||||
@ -107,8 +101,9 @@
|
|||||||
#define TOML_POP_WARNINGS _Pragma("clang diagnostic pop")
|
#define TOML_POP_WARNINGS _Pragma("clang diagnostic pop")
|
||||||
#define TOML_ASSUME(cond) __builtin_assume(cond)
|
#define TOML_ASSUME(cond) __builtin_assume(cond)
|
||||||
#define TOML_UNREACHABLE __builtin_unreachable()
|
#define TOML_UNREACHABLE __builtin_unreachable()
|
||||||
|
#define TOML_GNU_ATTR(attr) __attribute__((attr))
|
||||||
#if defined(_MSC_VER) // msvc compat mode
|
#if defined(_MSC_VER) // msvc compat mode
|
||||||
#if defined(__has_declspec_attribute)
|
#ifdef __has_declspec_attribute
|
||||||
#if __has_declspec_attribute(novtable)
|
#if __has_declspec_attribute(novtable)
|
||||||
#define TOML_INTERFACE __declspec(novtable)
|
#define TOML_INTERFACE __declspec(novtable)
|
||||||
#endif
|
#endif
|
||||||
@ -117,12 +112,13 @@
|
|||||||
#endif
|
#endif
|
||||||
#define TOML_ALWAYS_INLINE __forceinline
|
#define TOML_ALWAYS_INLINE __forceinline
|
||||||
#endif
|
#endif
|
||||||
#else // regular ol' clang
|
#endif
|
||||||
#define TOML_GNU_ATTR(attr) __attribute__((attr))
|
#ifdef __has_attribute
|
||||||
#ifdef __has_attribute
|
#if !defined(TOML_ALWAYS_INLINE) && __has_attribute(always_inline)
|
||||||
#if __has_attribute(always_inline)
|
#define TOML_ALWAYS_INLINE __attribute__((__always_inline__)) inline
|
||||||
#define TOML_ALWAYS_INLINE __attribute__((__always_inline__)) inline
|
#endif
|
||||||
#endif
|
#if !defined(TOML_TRIVIAL_ABI) && __has_attribute(trivial_abi)
|
||||||
|
#define TOML_TRIVIAL_ABI __attribute__((__trivial_abi__))
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef __EXCEPTIONS
|
#ifdef __EXCEPTIONS
|
||||||
@ -285,6 +281,9 @@
|
|||||||
#ifndef TOML_UNLIKELY
|
#ifndef TOML_UNLIKELY
|
||||||
#define TOML_UNLIKELY
|
#define TOML_UNLIKELY
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef TOML_TRIVIAL_ABI
|
||||||
|
#define TOML_TRIVIAL_ABI
|
||||||
|
#endif
|
||||||
#ifndef TOML_NODISCARD_CTOR
|
#ifndef TOML_NODISCARD_CTOR
|
||||||
#define TOML_NODISCARD_CTOR
|
#define TOML_NODISCARD_CTOR
|
||||||
#endif
|
#endif
|
||||||
@ -307,7 +306,7 @@
|
|||||||
|
|
||||||
#define TOML_LIB_MAJOR 0
|
#define TOML_LIB_MAJOR 0
|
||||||
#define TOML_LIB_MINOR 5
|
#define TOML_LIB_MINOR 5
|
||||||
#define TOML_LIB_PATCH 1
|
#define TOML_LIB_PATCH 2
|
||||||
|
|
||||||
#define TOML_LANG_MAJOR 0
|
#define TOML_LANG_MAJOR 0
|
||||||
#define TOML_LANG_MINOR 5
|
#define TOML_LANG_MINOR 5
|
||||||
@ -383,6 +382,14 @@ TOML_DISABLE_ALL_WARNINGS
|
|||||||
#include <map>
|
#include <map>
|
||||||
#include <iosfwd>
|
#include <iosfwd>
|
||||||
#include <charconv>
|
#include <charconv>
|
||||||
|
#ifndef TOML_ASSERT
|
||||||
|
#if !defined(NDEBUG) || defined(_DEBUG) || defined(DEBUG)
|
||||||
|
#include <cassert>
|
||||||
|
#define TOML_ASSERT(expr) assert(expr)
|
||||||
|
#else
|
||||||
|
#define TOML_ASSERT(expr) (void)0
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
#ifndef TOML_OPTIONAL_TYPE
|
#ifndef TOML_OPTIONAL_TYPE
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#endif
|
#endif
|
||||||
@ -909,7 +916,7 @@ TOML_END
|
|||||||
|
|
||||||
TOML_START
|
TOML_START
|
||||||
{
|
{
|
||||||
struct date final
|
struct TOML_TRIVIAL_ABI date final
|
||||||
{
|
{
|
||||||
uint16_t year;
|
uint16_t year;
|
||||||
uint8_t month;
|
uint8_t month;
|
||||||
@ -975,7 +982,7 @@ TOML_START
|
|||||||
return lhs;
|
return lhs;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct time final
|
struct TOML_TRIVIAL_ABI time final
|
||||||
{
|
{
|
||||||
uint8_t hour;
|
uint8_t hour;
|
||||||
uint8_t minute;
|
uint8_t minute;
|
||||||
@ -1042,7 +1049,7 @@ TOML_START
|
|||||||
return lhs;
|
return lhs;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct time_offset final
|
struct TOML_TRIVIAL_ABI time_offset final
|
||||||
{
|
{
|
||||||
int16_t minutes;
|
int16_t minutes;
|
||||||
|
|
||||||
@ -9212,6 +9219,7 @@ TOML_END
|
|||||||
#undef TOML_INLINE_FUNC_IMPL
|
#undef TOML_INLINE_FUNC_IMPL
|
||||||
#undef TOML_COMPILER_EXCEPTIONS
|
#undef TOML_COMPILER_EXCEPTIONS
|
||||||
#undef TOML_LAUNDER
|
#undef TOML_LAUNDER
|
||||||
|
#undef TOML_TRIVIAL_ABI
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
<ClCompile>
|
<ClCompile>
|
||||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
<ControlFlowGuard>false</ControlFlowGuard>
|
<ControlFlowGuard>false</ControlFlowGuard>
|
||||||
<RuntimeTypeInfo>false</RuntimeTypeInfo> <!-- /GR- -->
|
|
||||||
<FloatingPointExceptions>false</FloatingPointExceptions> <!-- /fp:except- -->
|
<FloatingPointExceptions>false</FloatingPointExceptions> <!-- /fp:except- -->
|
||||||
<ExceptionHandling>Sync</ExceptionHandling> <!-- /EHsc -->
|
<ExceptionHandling>Sync</ExceptionHandling> <!-- /EHsc -->
|
||||||
<ConformanceMode>true</ConformanceMode> <!-- /permissive- -->
|
<ConformanceMode>true</ConformanceMode> <!-- /permissive- -->
|
||||||
@ -33,7 +32,6 @@
|
|||||||
<AdditionalOptions>%(AdditionalOptions) /utf-8 /volatile:iso /Zc:__cplusplus /bigobj /Zc:inline /Zc:throwingNew</AdditionalOptions>
|
<AdditionalOptions>%(AdditionalOptions) /utf-8 /volatile:iso /Zc:__cplusplus /bigobj /Zc:inline /Zc:throwingNew</AdditionalOptions>
|
||||||
<PreprocessorDefinitions>%(PreprocessorDefinitions);_CONSOLE</PreprocessorDefinitions>
|
<PreprocessorDefinitions>%(PreprocessorDefinitions);_CONSOLE</PreprocessorDefinitions>
|
||||||
<PreprocessorDefinitions>%(PreprocessorDefinitions);_ITERATOR_DEBUG_LEVEL=0</PreprocessorDefinitions>
|
<PreprocessorDefinitions>%(PreprocessorDefinitions);_ITERATOR_DEBUG_LEVEL=0</PreprocessorDefinitions>
|
||||||
<PreprocessorDefinitions>%(PreprocessorDefinitions);_ITERATOR_DEBUG_LEVEL=0</PreprocessorDefinitions>
|
|
||||||
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINSOCK_DEPRECATED_NO_WARNINGS</PreprocessorDefinitions>
|
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINSOCK_DEPRECATED_NO_WARNINGS</PreprocessorDefinitions>
|
||||||
<PreprocessorDefinitions>%(PreprocessorDefinitions);_SCL_SECURE_NO_WARNINGS</PreprocessorDefinitions>
|
<PreprocessorDefinitions>%(PreprocessorDefinitions);_SCL_SECURE_NO_WARNINGS</PreprocessorDefinitions>
|
||||||
<PreprocessorDefinitions>%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
|
<PreprocessorDefinitions>%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
|
||||||
|
@ -93,6 +93,7 @@
|
|||||||
<None Include="..\python\generate_unicode_functions.py" />
|
<None Include="..\python\generate_unicode_functions.py" />
|
||||||
<None Include="..\README.md" />
|
<None Include="..\README.md" />
|
||||||
<None Include="..\tests\meson.build" />
|
<None Include="..\tests\meson.build" />
|
||||||
|
<None Include="toml++.props" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
</Project>
|
</Project>
|
@ -100,6 +100,7 @@
|
|||||||
<None Include="..\tests\meson.build">
|
<None Include="..\tests\meson.build">
|
||||||
<Filter>tests</Filter>
|
<Filter>tests</Filter>
|
||||||
</None>
|
</None>
|
||||||
|
<None Include="toml++.props" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Filter Include="include">
|
<Filter Include="include">
|
||||||
|
Loading…
Reference in New Issue
Block a user