updated TOML version to v1.0.0-rc.2
also: - simplified warning handling macros - minor version bump
This commit is contained in:
parent
3b44bd504b
commit
2ac735054a
@ -2,7 +2,7 @@
|
||||
[![Releases](https://img.shields.io/github/v/release/marzer/tomlplusplus?style=flat-square)](https://github.com/marzer/tomlplusplus/releases)
|
||||
[![C++17](docs/badge-C++17.svg)][cpp_compilers]
|
||||
[![C++20](docs/badge-C++20.svg)][cpp_compilers]
|
||||
[![TOML](docs/badge-TOML.svg)][v1.0.0-rc.1]
|
||||
[![TOML](docs/badge-TOML.svg)][v1.0.0-rc.2]
|
||||
[![MIT license](docs/badge-license-MIT.svg)](./LICENSE)
|
||||
[![CircleCI](https://img.shields.io/circleci/build/github/marzer/tomlplusplus?label=circle%20ci&logo=circleci&logoColor=white&style=flat-square)](https://circleci.com/gh/marzer/tomlplusplus)
|
||||
[![Mentioned in Awesome C++](docs/badge-awesome.svg)](https://github.com/fffaraz/awesome-cpp)
|
||||
@ -19,7 +19,7 @@
|
||||
# Library features
|
||||
|
||||
- Header-only
|
||||
- Supports the latest [TOML] release ([v1.0.0-rc.1]), plus optional support for some [unreleased TOML language features]
|
||||
- Supports the latest [TOML] release ([v1.0.0-rc.2]), plus optional support for some [unreleased TOML language features]
|
||||
- C++17 (plus some C++20 features where available, e.g. experimental support for char8_t strings)
|
||||
- Proper UTF-8 handling (incl. BOM)
|
||||
- Works with or without exceptions
|
||||
@ -152,7 +152,7 @@ defines `TOML_LANG_MAJOR`, `TOML_LANG_MINOR` and `TOML_LANG_PATCH`.
|
||||
|
||||
> ℹ _`#define TOML_UNRELEASED_FEATURES 1` to enable these features (see [Configuration](#Configuration))._
|
||||
|
||||
### 🔹 **TOML v1.0.0-rc.1:**
|
||||
### 🔹 **TOML v1.0.0-rc.2:**
|
||||
All features supported, including:
|
||||
- [#356]: Allow leading zeros in the exponent part of a float
|
||||
- [#567]: Control characters are not permitted in comments
|
||||
@ -213,7 +213,7 @@ though you're welcome to reach out via other means. In order of likely response
|
||||
[TOML]: https://toml.io/
|
||||
[TOML master]: https://github.com/toml-lang/toml/blob/master/README.md
|
||||
[TOML issues list]: https://github.com/toml-lang/toml/issues
|
||||
[v1.0.0-rc.1]: https://toml.io/en/v1.0.0-rc.1
|
||||
[v1.0.0-rc.2]: https://toml.io/en/v1.0.0-rc.2
|
||||
[CONTRIBUTING]: ./CONTRIBUTING.md
|
||||
[LICENSE]: ./LICENSE
|
||||
[Flexible and Economical UTF-8 Decoder]: http://bjoern.hoehrmann.de/utf-8/decoder/dfa/
|
||||
|
@ -326,12 +326,12 @@ PREDEFINED = \
|
||||
"TOML_PUSH_WARNINGS=" \
|
||||
"TOML_DISABLE_SWITCH_WARNINGS=" \
|
||||
"TOML_DISABLE_INIT_WARNINGS=" \
|
||||
"TOML_DISABLE_MISC_WARNINGS=" \
|
||||
"TOML_DISABLE_PADDING_WARNINGS=" \
|
||||
"TOML_DISABLE_SPAM_WARNINGS=" \
|
||||
"TOML_DISABLE_ARITHMETIC_WARNINGS=" \
|
||||
"TOML_DISABLE_SHADOW_WARNINGS=" \
|
||||
"TOML_DISABLE_SUGGEST_WARNINGS=" \
|
||||
"TOML_DISABLE_ALL_WARNINGS=" \
|
||||
"TOML_DISABLE_WARNINGS=" \
|
||||
"TOML_ENABLE_WARNINGS=" \
|
||||
"TOML_POP_WARNINGS=" \
|
||||
"TOML_ASYMMETRICAL_EQUALITY_OPS(...)=" \
|
||||
"TOML_NAMESPACE_START=namespace toml" \
|
||||
|
@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="112" height="20"><g shape-rendering="crispEdges"><path fill="#555" d="M0 0h41v20H0z"/><path fill="#007ec6" d="M41 0h71v20H41z"/></g><g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110"> <text x="215" y="140" transform="scale(.1)" textLength="310">TOML</text><text x="755" y="140" transform="scale(.1)" textLength="610">v1.0.0 rc.1</text></g> </svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="112" height="20" role="img" aria-label="TOML: v1.0.0-rc.2"><title>TOML: v1.0.0-rc.2</title><g shape-rendering="crispEdges"><rect width="41" height="20" fill="#555"/><rect x="41" width="71" height="20" fill="#007ec6"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text x="215" y="140" transform="scale(.1)" fill="#fff" textLength="310">TOML</text><text x="755" y="140" transform="scale(.1)" fill="#fff" textLength="610">v1.0.0-rc.2</text></g></svg>
|
Before Width: | Height: | Size: 489 B After Width: | Height: | Size: 636 B |
@ -6,7 +6,7 @@
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
///
|
||||
/// \section mainpage-features Features
|
||||
/// - Supports the latest [TOML](https://toml.io/) release ([v1.0.0-rc.1](https://toml.io/en/v1.0.0-rc.1)), plus
|
||||
/// - Supports the latest [TOML](https://toml.io/) release ([v1.0.0-rc.2](https://toml.io/en/v1.0.0-rc.2)), plus
|
||||
/// optional support for some unreleased TOML features
|
||||
/// - Supports serializing to JSON
|
||||
/// - Proper UTF-8 handling (incl. BOM)
|
||||
@ -316,7 +316,7 @@
|
||||
/// auto tbl = toml::table{{
|
||||
/// { "lib", "toml++" },
|
||||
/// { "cpp", toml::array{ 17, 20, "and beyond" } },
|
||||
/// { "toml", toml::array{ "1.0.0-rc.1", "and beyond" } },
|
||||
/// { "toml", toml::array{ "1.0.0-rc.2", "and beyond" } },
|
||||
/// { "repo", "https://github.com/marzer/tomlplusplus/" },
|
||||
/// { "author", toml::table{{
|
||||
/// { "name", "Mark Gillard" },
|
||||
@ -343,7 +343,7 @@
|
||||
/// cpp = [ 17, 20, 'and beyond' ]
|
||||
/// lib = 'toml++'
|
||||
/// repo = 'https://github.com/marzer/tomlplusplus/'
|
||||
/// toml = [ '1.0.0-rc.1', 'and beyond' ]
|
||||
/// toml = [ '1.0.0-rc.2', 'and beyond' ]
|
||||
///
|
||||
/// [author]
|
||||
/// github = 'https://github.com/marzer'
|
||||
@ -366,7 +366,7 @@
|
||||
/// "lib" : "toml++",
|
||||
/// "repo" : "https://github.com/marzer/tomlplusplus/",
|
||||
/// "toml" : [
|
||||
/// "1.0.0-rc.1",
|
||||
/// "1.0.0-rc.2",
|
||||
/// "and beyond"
|
||||
/// ]
|
||||
/// }
|
||||
|
@ -67,14 +67,14 @@
|
||||
#undef TOML_CONCAT_1
|
||||
#undef TOML_CONSTEVAL
|
||||
#undef TOML_CPP
|
||||
#undef TOML_DISABLE_ALL_WARNINGS
|
||||
#undef TOML_DISABLE_ARITHMETIC_WARNINGS
|
||||
#undef TOML_DISABLE_INIT_WARNINGS
|
||||
#undef TOML_DISABLE_MISC_WARNINGS
|
||||
#undef TOML_DISABLE_PADDING_WARNINGS
|
||||
#undef TOML_DISABLE_SPAM_WARNINGS
|
||||
#undef TOML_DISABLE_SHADOW_WARNINGS
|
||||
#undef TOML_DISABLE_SUGGEST_WARNINGS
|
||||
#undef TOML_DISABLE_SWITCH_WARNINGS
|
||||
#undef TOML_DISABLE_WARNINGS
|
||||
#undef TOML_ENABLE_WARNINGS
|
||||
#undef TOML_EMPTY_BASES
|
||||
#undef TOML_EVAL_BOOL_0
|
||||
#undef TOML_EVAL_BOOL_1
|
||||
@ -87,6 +87,7 @@
|
||||
#undef TOML_HAS_CUSTOM_OPTIONAL_TYPE
|
||||
#undef TOML_HAS_INCLUDE
|
||||
#undef TOML_ICC
|
||||
#undef TOML_ICC_CL
|
||||
#undef TOML_IMPLEMENTATION
|
||||
#undef TOML_IMPL_NAMESPACE_END
|
||||
#undef TOML_IMPL_NAMESPACE_START
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include "toml_value.h"
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_MISC_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
TOML_IMPL_NAMESPACE_START
|
||||
{
|
||||
@ -160,8 +160,7 @@ TOML_IMPL_NAMESPACE_START
|
||||
return *(raw_ + idx)->get();
|
||||
}
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_ALL_WARNINGS
|
||||
TOML_DISABLE_WARNINGS
|
||||
|
||||
template <bool C = IsConst, typename = std::enable_if_t<!C>>
|
||||
[[nodiscard]]
|
||||
@ -170,7 +169,7 @@ TOML_IMPL_NAMESPACE_START
|
||||
return array_iterator<true>{ raw_ };
|
||||
}
|
||||
|
||||
TOML_POP_WARNINGS
|
||||
TOML_ENABLE_WARNINGS
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
@ -1038,4 +1037,4 @@ TOML_NAMESPACE_START
|
||||
}
|
||||
TOML_NAMESPACE_END
|
||||
|
||||
TOML_POP_WARNINGS //TOML_DISABLE_MISC_WARNINGS
|
||||
TOML_POP_WARNINGS //TOML_DISABLE_SPAM_WARNINGS
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_SUGGEST_WARNINGS
|
||||
TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
TOML_NAMESPACE_START
|
||||
{
|
||||
@ -324,5 +324,5 @@ TOML_NAMESPACE_START
|
||||
}
|
||||
TOML_NAMESPACE_END
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SUGGEST_WARNINGS, TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SUGGEST_WARNINGS, TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
|
@ -6,12 +6,14 @@
|
||||
#pragma once
|
||||
#include "toml_preprocessor.h"
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
//#====================================================================================================================
|
||||
//# INCLUDES
|
||||
//#====================================================================================================================
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_ALL_WARNINGS
|
||||
TOML_DISABLE_WARNINGS
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
#include <cstring>
|
||||
@ -30,7 +32,7 @@ TOML_DISABLE_ALL_WARNINGS
|
||||
#if TOML_HAS_INCLUDE(<version>)
|
||||
#include <version>
|
||||
#endif
|
||||
TOML_POP_WARNINGS
|
||||
TOML_ENABLE_WARNINGS
|
||||
|
||||
#ifdef __cpp_lib_launder
|
||||
#define TOML_LAUNDER(x) std::launder(x)
|
||||
@ -69,9 +71,6 @@ static_assert(std::numeric_limits<double>::digits10 == 15, TOML_ENV_MESSAGE);
|
||||
|
||||
#ifndef DOXYGEN // undocumented forward declarations are hidden from doxygen because they fuck it up =/
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_PADDING_WARNINGS
|
||||
|
||||
namespace toml // non-abi namespace; this is not an error
|
||||
{
|
||||
using namespace std::string_literals;
|
||||
@ -208,8 +207,6 @@ TOML_NAMESPACE_START // abi namespace
|
||||
}
|
||||
TOML_NAMESPACE_END
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_PADDING_WARNINGS
|
||||
|
||||
#endif // !DOXYGEN
|
||||
|
||||
//#====================================================================================================================
|
||||
@ -908,3 +905,5 @@ TOML_NAMESPACE_START
|
||||
#endif
|
||||
}
|
||||
TOML_NAMESPACE_END
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SPAM_WARNINGS
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include "toml_common.h"
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
TOML_NAMESPACE_START
|
||||
{
|
||||
@ -428,4 +428,4 @@ TOML_NAMESPACE_START
|
||||
}
|
||||
TOML_NAMESPACE_END
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SPAM_WARNINGS
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_SWITCH_WARNINGS
|
||||
TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
TOML_IMPL_NAMESPACE_START
|
||||
{
|
||||
@ -401,5 +401,5 @@ TOML_NAMESPACE_START
|
||||
}
|
||||
TOML_NAMESPACE_END
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
|
@ -12,16 +12,14 @@
|
||||
//# }}
|
||||
|
||||
#include "toml_default_formatter.h"
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_ALL_WARNINGS
|
||||
TOML_DISABLE_WARNINGS
|
||||
#include <cmath>
|
||||
TOML_POP_WARNINGS
|
||||
TOML_ENABLE_WARNINGS
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_SWITCH_WARNINGS
|
||||
TOML_DISABLE_ARITHMETIC_WARNINGS
|
||||
TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_DISABLE_MISC_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
TOML_IMPL_NAMESPACE_START
|
||||
{
|
||||
@ -210,10 +208,9 @@ TOML_NAMESPACE_END
|
||||
// implementations of windows wide string nonsense
|
||||
#if TOML_WINDOWS_COMPAT
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_ALL_WARNINGS
|
||||
TOML_DISABLE_WARNINGS
|
||||
#include <Windows.h> // fuckkkk :(
|
||||
TOML_POP_WARNINGS
|
||||
TOML_ENABLE_WARNINGS
|
||||
|
||||
TOML_IMPL_NAMESPACE_START
|
||||
{
|
||||
@ -271,5 +268,4 @@ TOML_IMPL_NAMESPACE_END
|
||||
|
||||
#endif // TOML_WINDOWS_COMPAT
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_ARITHMETIC_WARNINGS,
|
||||
// TOML_DISABLE_PADDING_WARNINGS, TOML_DISABLE_MISC_WARNINGS
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_ARITHMETIC_WARNINGS, TOML_DISABLE_SPAM_WARNINGS
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_SWITCH_WARNINGS
|
||||
TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
TOML_NAMESPACE_START
|
||||
{
|
||||
@ -251,4 +251,4 @@ TOML_IMPL_NAMESPACE_START
|
||||
}
|
||||
TOML_IMPL_NAMESPACE_END
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_SPAM_WARNINGS
|
||||
|
@ -9,17 +9,17 @@
|
||||
#if !TOML_IMPLEMENTATION
|
||||
#error This is an implementation-only header.
|
||||
#endif
|
||||
#if TOML_HEADER_ONLY
|
||||
#if TOML_HEADER_ONLY && !TOML_INTELLISENSE
|
||||
#error This header cannot not be included when TOML_HEADER_ONLY is enabled.
|
||||
#endif
|
||||
//# }}
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_ALL_WARNINGS
|
||||
TOML_DISABLE_WARNINGS
|
||||
#include <ostream>
|
||||
#include <istream>
|
||||
#include <fstream>
|
||||
TOML_POP_WARNINGS
|
||||
TOML_ENABLE_WARNINGS
|
||||
|
||||
#include "toml_node_view.h"
|
||||
#include "toml_default_formatter.h"
|
||||
#include "toml_json_formatter.h"
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_SWITCH_WARNINGS
|
||||
TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
TOML_NAMESPACE_START
|
||||
{
|
||||
@ -157,4 +157,4 @@ TOML_NAMESPACE_START
|
||||
}
|
||||
TOML_NAMESPACE_END
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_SPAM_WARNINGS
|
||||
|
@ -7,8 +7,7 @@
|
||||
#include "toml_common.h"
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_DISABLE_MISC_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
#if defined(DOXYGEN) || TOML_SIMPLE_STATIC_ASSERT_MESSAGES
|
||||
|
||||
@ -829,5 +828,5 @@ TOML_NAMESPACE_START
|
||||
}
|
||||
TOML_NAMESPACE_END
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_PADDING_WARNINGS, TOML_DISABLE_MISC_WARNINGS
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
|
@ -10,16 +10,15 @@
|
||||
#error This header cannot not be included when TOML_PARSER is disabled.
|
||||
#endif
|
||||
//# }}
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_ALL_WARNINGS
|
||||
TOML_DISABLE_WARNINGS
|
||||
#if TOML_EXCEPTIONS
|
||||
#include <stdexcept>
|
||||
#endif
|
||||
TOML_POP_WARNINGS
|
||||
TOML_ENABLE_WARNINGS
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_INIT_WARNINGS
|
||||
TOML_DISABLE_MISC_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
TOML_NAMESPACE_START
|
||||
{
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "toml_utf8_streams.h"
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
TOML_NAMESPACE_START
|
||||
{
|
||||
@ -789,4 +789,4 @@ TOML_NAMESPACE_END
|
||||
|
||||
#undef TOML_THROW_PARSE_ERROR
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SPAM_WARNINGS
|
||||
|
@ -15,8 +15,7 @@
|
||||
//# }}
|
||||
|
||||
#include "toml_parser.h"
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_ALL_WARNINGS
|
||||
TOML_DISABLE_WARNINGS
|
||||
#include <cmath>
|
||||
#if TOML_INT_CHARCONV || TOML_FLOAT_CHARCONV
|
||||
#include <charconv>
|
||||
@ -27,11 +26,11 @@ TOML_DISABLE_ALL_WARNINGS
|
||||
#if !TOML_HEADER_ONLY
|
||||
using namespace std::string_view_literals;
|
||||
#endif
|
||||
TOML_POP_WARNINGS
|
||||
TOML_ENABLE_WARNINGS
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_SWITCH_WARNINGS
|
||||
TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
#if TOML_EXCEPTIONS && !defined(__INTELLISENSE__)
|
||||
#define TOML_RETURNS_BY_THROWING [[noreturn]]
|
||||
@ -3018,4 +3017,4 @@ TOML_NAMESPACE_START
|
||||
}
|
||||
TOML_NAMESPACE_END
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_SPAM_WARNINGS
|
||||
|
@ -26,8 +26,14 @@
|
||||
#endif
|
||||
#ifdef __INTEL_COMPILER
|
||||
#define TOML_ICC __INTEL_COMPILER
|
||||
#ifdef __ICL
|
||||
#define TOML_ICC_CL TOML_ICC
|
||||
#else
|
||||
#define TOML_ICC_CL 0
|
||||
#endif
|
||||
#else
|
||||
#define TOML_ICC 0
|
||||
#define TOML_ICC_CL 0
|
||||
#endif
|
||||
#if defined(_MSC_VER) && !TOML_CLANG && !TOML_ICC
|
||||
#define TOML_MSVC _MSC_VER
|
||||
@ -49,16 +55,18 @@
|
||||
#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_PADDING_WARNINGS _Pragma("clang diagnostic ignored \"-Wpadded\"")
|
||||
#define TOML_DISABLE_ARITHMETIC_WARNINGS _Pragma("clang diagnostic ignored \"-Wfloat-equal\"") \
|
||||
_Pragma("clang diagnostic ignored \"-Wdouble-promotion\"") \
|
||||
_Pragma("clang diagnostic ignored \"-Wchar-subscripts\"")
|
||||
_Pragma("clang diagnostic ignored \"-Wchar-subscripts\"") \
|
||||
_Pragma("clang diagnostic ignored \"-Wshift-sign-overflow\"")
|
||||
#define TOML_DISABLE_SHADOW_WARNINGS _Pragma("clang diagnostic ignored \"-Wshadow\"")
|
||||
#define TOML_DISABLE_MISC_WARNINGS _Pragma("clang diagnostic ignored \"-Wweak-vtables\"") \
|
||||
_Pragma("clang diagnostic ignored \"-Wweak-template-vtables\"")
|
||||
#define TOML_DISABLE_ALL_WARNINGS _Pragma("clang diagnostic ignored \"-Weverything\"")
|
||||
#define TOML_DISABLE_SPAM_WARNINGS _Pragma("clang diagnostic ignored \"-Wweak-vtables\"") \
|
||||
_Pragma("clang diagnostic ignored \"-Wweak-template-vtables\"") \
|
||||
_Pragma("clang diagnostic ignored \"-Wpadded\"")
|
||||
#define TOML_POP_WARNINGS _Pragma("clang diagnostic pop")
|
||||
|
||||
#define TOML_DISABLE_WARNINGS TOML_PUSH_WARNINGS \
|
||||
_Pragma("clang diagnostic ignored \"-Weverything\"")
|
||||
#define TOML_ENABLE_WARNINGS TOML_POP_WARNINGS
|
||||
#define TOML_ASSUME(cond) __builtin_assume(cond)
|
||||
#define TOML_UNREACHABLE __builtin_unreachable()
|
||||
#define TOML_ATTR(...) __attribute__((__VA_ARGS__))
|
||||
@ -89,9 +97,7 @@
|
||||
#define TOML_TRIVIAL_ABI __attribute__((__trivial_abi__))
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __EXCEPTIONS
|
||||
#define TOML_COMPILER_EXCEPTIONS 1
|
||||
#else
|
||||
#ifndef __EXCEPTIONS
|
||||
#define TOML_COMPILER_EXCEPTIONS 0
|
||||
#endif
|
||||
#define TOML_LIKELY(...) (__builtin_expect(!!(__VA_ARGS__), 1) )
|
||||
@ -110,34 +116,51 @@
|
||||
//# MSVC
|
||||
//#====================================================================================================================
|
||||
|
||||
#if TOML_MSVC || (defined(_MSC_VER) && TOML_ICC && defined(__ICL))
|
||||
#if TOML_MSVC || TOML_ICC_CL
|
||||
|
||||
#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_CPP_VERSION _MSVC_LANG
|
||||
#define TOML_CPP_VERSION _MSVC_LANG
|
||||
#define TOML_PUSH_WARNINGS __pragma(warning(push))
|
||||
#if TOML_MSVC // !intel-cl
|
||||
#define TOML_PUSH_WARNINGS __pragma(warning(push))
|
||||
#define TOML_DISABLE_SWITCH_WARNINGS __pragma(warning(disable: 4063))
|
||||
#define TOML_POP_WARNINGS __pragma(warning(pop))
|
||||
#define TOML_DISABLE_WARNINGS __pragma(warning(push, 0))
|
||||
#define TOML_ENABLE_WARNINGS TOML_POP_WARNINGS
|
||||
#endif
|
||||
#ifndef TOML_ALWAYS_INLINE
|
||||
#define TOML_ALWAYS_INLINE __forceinline
|
||||
#define TOML_ALWAYS_INLINE __forceinline
|
||||
#endif
|
||||
#define TOML_NEVER_INLINE __declspec(noinline)
|
||||
#define TOML_ASSUME(cond) __assume(cond)
|
||||
#define TOML_UNREACHABLE __assume(0)
|
||||
#define TOML_INTERFACE __declspec(novtable)
|
||||
#define TOML_EMPTY_BASES __declspec(empty_bases)
|
||||
#define TOML_NEVER_INLINE __declspec(noinline)
|
||||
#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
|
||||
#define TOML_RELOPS_REORDERING 1
|
||||
#endif
|
||||
#ifdef _CPPUNWIND
|
||||
#define TOML_COMPILER_EXCEPTIONS 1
|
||||
#else
|
||||
#define TOML_COMPILER_EXCEPTIONS 0
|
||||
#ifndef _CPPUNWIND
|
||||
#define TOML_COMPILER_EXCEPTIONS 0
|
||||
#endif
|
||||
|
||||
#endif // msvc
|
||||
|
||||
//#====================================================================================================================
|
||||
//# ICC
|
||||
//#====================================================================================================================
|
||||
|
||||
#if TOML_ICC
|
||||
|
||||
#define TOML_PUSH_WARNINGS __pragma(warning(push))
|
||||
#define TOML_DISABLE_SPAM_WARNINGS __pragma(warning(disable: 82)) /* storage class is not first */ \
|
||||
__pragma(warning(disable: 111)) /* statement unreachable (false-positive) */ \
|
||||
__pragma(warning(disable: 1011)) /* missing return (false-positive) */ \
|
||||
__pragma(warning(disable: 2261)) /* assume expr side-effects discarded */
|
||||
#define TOML_POP_WARNINGS __pragma(warning(pop))
|
||||
#define TOML_DISABLE_WARNINGS __pragma(warning(push, 0))
|
||||
#define TOML_ENABLE_WARNINGS TOML_POP_WARNINGS
|
||||
|
||||
#endif // icc
|
||||
|
||||
//#====================================================================================================================
|
||||
//# GCC
|
||||
//#====================================================================================================================
|
||||
@ -151,26 +174,28 @@
|
||||
#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\"") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wcast-align\"")
|
||||
#define TOML_DISABLE_ARITHMETIC_WARNINGS _Pragma("GCC diagnostic ignored \"-Wfloat-equal\"") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wsign-conversion\"") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wchar-subscripts\"")
|
||||
#define TOML_DISABLE_SHADOW_WARNINGS _Pragma("GCC diagnostic ignored \"-Wshadow\"")
|
||||
#define TOML_DISABLE_SUGGEST_WARNINGS _Pragma("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wsuggest-attribute=pure\"")
|
||||
#define TOML_DISABLE_MISC_WARNINGS _Pragma("GCC diagnostic ignored \"-Wcomment\"") \
|
||||
#define TOML_DISABLE_SPAM_WARNINGS _Pragma("GCC diagnostic ignored \"-Wpadded\"") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wcast-align\"") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wcomment\"") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wtype-limits\"")
|
||||
#define TOML_DISABLE_ALL_WARNINGS _Pragma("GCC diagnostic ignored \"-Wall\"") \
|
||||
#define TOML_POP_WARNINGS _Pragma("GCC diagnostic pop")
|
||||
#define TOML_DISABLE_WARNINGS TOML_PUSH_WARNINGS \
|
||||
_Pragma("GCC diagnostic ignored \"-Wall\"") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wextra\"") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wpedantic\"") \
|
||||
TOML_DISABLE_SWITCH_WARNINGS \
|
||||
TOML_DISABLE_INIT_WARNINGS \
|
||||
TOML_DISABLE_PADDING_WARNINGS \
|
||||
TOML_DISABLE_ARITHMETIC_WARNINGS \
|
||||
TOML_DISABLE_SHADOW_WARNINGS \
|
||||
TOML_DISABLE_SUGGEST_WARNINGS \
|
||||
TOML_DISABLE_MISC_WARNINGS
|
||||
#define TOML_POP_WARNINGS _Pragma("GCC diagnostic pop")
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
#define TOML_ENABLE_WARNINGS TOML_POP_WARNINGS
|
||||
|
||||
#define TOML_ATTR(...) __attribute__((__VA_ARGS__))
|
||||
#ifndef TOML_ALWAYS_INLINE
|
||||
@ -181,9 +206,7 @@
|
||||
#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
|
||||
#ifndef __cpp_exceptions
|
||||
#define TOML_COMPILER_EXCEPTIONS 0
|
||||
#endif
|
||||
#define TOML_LIKELY(...) (__builtin_expect(!!(__VA_ARGS__), 1) )
|
||||
@ -341,11 +364,8 @@ is no longer necessary.
|
||||
#ifndef TOML_DISABLE_INIT_WARNINGS
|
||||
#define TOML_DISABLE_INIT_WARNINGS
|
||||
#endif
|
||||
#ifndef TOML_DISABLE_MISC_WARNINGS
|
||||
#define TOML_DISABLE_MISC_WARNINGS
|
||||
#endif
|
||||
#ifndef TOML_DISABLE_PADDING_WARNINGS
|
||||
#define TOML_DISABLE_PADDING_WARNINGS
|
||||
#ifndef TOML_DISABLE_SPAM_WARNINGS
|
||||
#define TOML_DISABLE_SPAM_WARNINGS
|
||||
#endif
|
||||
#ifndef TOML_DISABLE_ARITHMETIC_WARNINGS
|
||||
#define TOML_DISABLE_ARITHMETIC_WARNINGS
|
||||
@ -356,12 +376,15 @@ is no longer necessary.
|
||||
#ifndef TOML_DISABLE_SUGGEST_WARNINGS
|
||||
#define TOML_DISABLE_SUGGEST_WARNINGS
|
||||
#endif
|
||||
#ifndef TOML_DISABLE_ALL_WARNINGS
|
||||
#define TOML_DISABLE_ALL_WARNINGS
|
||||
#endif
|
||||
#ifndef TOML_POP_WARNINGS
|
||||
#define TOML_POP_WARNINGS
|
||||
#endif
|
||||
#ifndef TOML_DISABLE_WARNINGS
|
||||
#define TOML_DISABLE_WARNINGS
|
||||
#endif
|
||||
#ifndef TOML_ENABLE_WARNINGS
|
||||
#define TOML_ENABLE_WARNINGS
|
||||
#endif
|
||||
|
||||
#ifndef TOML_ATTR
|
||||
#define TOML_ATTR(...)
|
||||
@ -555,8 +578,7 @@ is no longer necessary.
|
||||
//# ASSERT
|
||||
//#====================================================================================================================
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_ALL_WARNINGS
|
||||
TOML_DISABLE_WARNINGS
|
||||
#ifndef TOML_ASSERT
|
||||
#if defined(NDEBUG) || !defined(_DEBUG)
|
||||
#define TOML_ASSERT(expr) (void)0
|
||||
@ -567,7 +589,7 @@ TOML_DISABLE_ALL_WARNINGS
|
||||
#define TOML_ASSERT(expr) assert(expr)
|
||||
#endif
|
||||
#endif
|
||||
TOML_POP_WARNINGS
|
||||
TOML_ENABLE_WARNINGS
|
||||
|
||||
//#====================================================================================================================
|
||||
//# DOXYGEN SPAM
|
||||
|
@ -5,8 +5,7 @@
|
||||
|
||||
#pragma once
|
||||
#include "toml_date_time.h"
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_ALL_WARNINGS
|
||||
TOML_DISABLE_WARNINGS
|
||||
#include <cmath>
|
||||
#if TOML_INT_CHARCONV || TOML_FLOAT_CHARCONV
|
||||
#include <charconv>
|
||||
@ -17,7 +16,7 @@ TOML_DISABLE_ALL_WARNINGS
|
||||
#if !TOML_INT_CHARCONV
|
||||
#include <iomanip>
|
||||
#endif
|
||||
TOML_POP_WARNINGS
|
||||
TOML_ENABLE_WARNINGS
|
||||
|
||||
TOML_IMPL_NAMESPACE_START
|
||||
{
|
||||
|
@ -7,8 +7,7 @@
|
||||
#include "toml_array.h"
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_MISC_WARNINGS
|
||||
TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
TOML_IMPL_NAMESPACE_START
|
||||
{
|
||||
@ -132,8 +131,7 @@ TOML_IMPL_NAMESPACE_START
|
||||
return lhs.raw_ != rhs.raw_;
|
||||
}
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_ALL_WARNINGS
|
||||
TOML_DISABLE_WARNINGS
|
||||
|
||||
template <bool C = IsConst, typename = std::enable_if_t<!C>>
|
||||
[[nodiscard]]
|
||||
@ -142,7 +140,7 @@ TOML_IMPL_NAMESPACE_START
|
||||
return table_iterator<true>{ raw_ };
|
||||
}
|
||||
|
||||
TOML_POP_WARNINGS
|
||||
TOML_ENABLE_WARNINGS
|
||||
};
|
||||
|
||||
struct table_init_pair final
|
||||
@ -1142,4 +1140,4 @@ TOML_NAMESPACE_START
|
||||
}
|
||||
TOML_NAMESPACE_END
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_MISC_WARNINGS, TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SPAM_WARNINGS
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_SUGGEST_WARNINGS
|
||||
TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
TOML_NAMESPACE_START
|
||||
{
|
||||
@ -321,5 +321,5 @@ TOML_NAMESPACE_START
|
||||
}
|
||||
TOML_NAMESPACE_END
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SUGGEST_WARNINGS, TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SUGGEST_WARNINGS, TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
|
@ -14,8 +14,7 @@
|
||||
#include "toml_parse_error.h"
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_DISABLE_MISC_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
TOML_IMPL_NAMESPACE_START
|
||||
{
|
||||
@ -320,9 +319,7 @@ TOML_IMPL_NAMESPACE_START
|
||||
}
|
||||
}
|
||||
|
||||
#if !TOML_ICC
|
||||
TOML_UNREACHABLE;
|
||||
#endif
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
@ -385,4 +382,4 @@ TOML_IMPL_NAMESPACE_START
|
||||
}
|
||||
TOML_IMPL_NAMESPACE_END
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_PADDING_WARNINGS, TOML_DISABLE_MISC_WARNINGS
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SPAM_WARNINGS
|
||||
|
@ -68,8 +68,7 @@
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_ARITHMETIC_WARNINGS
|
||||
TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_DISABLE_MISC_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
TOML_IMPL_NAMESPACE_START
|
||||
{
|
||||
@ -878,4 +877,4 @@ TOML_NAMESPACE_START
|
||||
}
|
||||
TOML_NAMESPACE_END
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_ARITHMETIC_WARNINGS, TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_ARITHMETIC_WARNINGS
|
||||
|
@ -6,8 +6,8 @@
|
||||
#pragma once
|
||||
|
||||
#define TOML_LIB_MAJOR 2
|
||||
#define TOML_LIB_MINOR 0
|
||||
#define TOML_LIB_PATCH 1
|
||||
#define TOML_LIB_MINOR 1
|
||||
#define TOML_LIB_PATCH 0
|
||||
|
||||
#define TOML_LANG_MAJOR 1
|
||||
#define TOML_LANG_MINOR 0
|
||||
|
@ -1,7 +1,7 @@
|
||||
project(
|
||||
'tomlplusplus',
|
||||
'cpp',
|
||||
version : '2.0.1',
|
||||
version : '2.1.0',
|
||||
license : 'MIT',
|
||||
default_options : [
|
||||
'cpp_std=c++17',
|
||||
|
@ -392,8 +392,7 @@ def write_test_file(name, test_cases):
|
||||
write('')
|
||||
|
||||
# test data
|
||||
write('TOML_PUSH_WARNINGS')
|
||||
write('TOML_DISABLE_ALL_WARNINGS // unused variable spam')
|
||||
write('TOML_DISABLE_WARNINGS // unused variable spam')
|
||||
write('')
|
||||
write('namespace')
|
||||
write('{')
|
||||
@ -408,7 +407,7 @@ def write_test_file(name, test_cases):
|
||||
write(s)
|
||||
write('}')
|
||||
write('')
|
||||
write('TOML_POP_WARNINGS')
|
||||
write('TOML_ENABLE_WARNINGS')
|
||||
write('')
|
||||
|
||||
# tests
|
||||
|
@ -239,9 +239,9 @@ badges = [
|
||||
'https://en.cppreference.com/w/cpp/compiler_support'
|
||||
),
|
||||
(
|
||||
'TOML v1.0.0-rc.1',
|
||||
'TOML v1.0.0-rc.2',
|
||||
'badge-TOML.svg',
|
||||
'https://toml.io/en/v1.0.0-rc.1'
|
||||
'https://toml.io/en/v1.0.0-rc.2'
|
||||
),
|
||||
(None, None, None), # <br>
|
||||
(
|
||||
|
@ -128,10 +128,12 @@ def main():
|
||||
// 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.''')
|
||||
preamble.append('''
|
||||
// TOML language specifications:
|
||||
// Latest: https://github.com/toml-lang/toml/blob/master/README.md
|
||||
// TOML Language Specifications:
|
||||
// latest: https://github.com/toml-lang/toml/blob/master/README.md
|
||||
// v1.0.0-rc.2: https://toml.io/en/v1.0.0-rc.2
|
||||
// v1.0.0-rc.1: https://toml.io/en/v1.0.0-rc.1
|
||||
// v0.5.0: https://toml.io/en/v0.5.0''')
|
||||
// v0.5.0: https://toml.io/en/v0.5.0
|
||||
// changelog: https://github.com/toml-lang/toml/blob/master/CHANGELOG.md''')
|
||||
preamble.append(utils.read_all_text_from_file(path.join(utils.get_script_folder(), '..', 'LICENSE')))
|
||||
|
||||
# write the output
|
||||
|
@ -8,8 +8,7 @@
|
||||
#include "tests.h"
|
||||
using namespace toml::impl;
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_ALL_WARNINGS // unused variable spam
|
||||
TOML_DISABLE_WARNINGS // unused variable spam
|
||||
|
||||
namespace
|
||||
{
|
||||
@ -120,7 +119,7 @@ answer = 42)"sv;
|
||||
])"sv;
|
||||
}
|
||||
|
||||
TOML_POP_WARNINGS
|
||||
TOML_ENABLE_WARNINGS
|
||||
|
||||
TEST_CASE("conformance - burntsushi/invalid")
|
||||
{
|
||||
|
@ -8,8 +8,7 @@
|
||||
#include "tests.h"
|
||||
using namespace toml::impl;
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_ALL_WARNINGS // unused variable spam
|
||||
TOML_DISABLE_WARNINGS // unused variable spam
|
||||
|
||||
namespace
|
||||
{
|
||||
@ -257,7 +256,7 @@ answer8 = "\U000003B4")"sv;
|
||||
#endif // UNICODE_LITERALS_OK
|
||||
}
|
||||
|
||||
TOML_POP_WARNINGS
|
||||
TOML_ENABLE_WARNINGS
|
||||
|
||||
TEST_CASE("conformance - burntsushi/valid")
|
||||
{
|
||||
|
@ -8,8 +8,7 @@
|
||||
#include "tests.h"
|
||||
using namespace toml::impl;
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_ALL_WARNINGS // unused variable spam
|
||||
TOML_DISABLE_WARNINGS // unused variable spam
|
||||
|
||||
namespace
|
||||
{
|
||||
@ -132,7 +131,7 @@ fruit = []
|
||||
color = "green")"sv;
|
||||
}
|
||||
|
||||
TOML_POP_WARNINGS
|
||||
TOML_ENABLE_WARNINGS
|
||||
|
||||
TEST_CASE("conformance - iarna/invalid")
|
||||
{
|
||||
|
@ -8,8 +8,7 @@
|
||||
#include "tests.h"
|
||||
using namespace toml::impl;
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_ALL_WARNINGS // unused variable spam
|
||||
TOML_DISABLE_WARNINGS // unused variable spam
|
||||
|
||||
namespace
|
||||
{
|
||||
@ -266,7 +265,7 @@ smooth = true)"sv;
|
||||
static constexpr auto spec_time_1 = R"(lt1 = 07:32:00)"sv;
|
||||
}
|
||||
|
||||
TOML_POP_WARNINGS
|
||||
TOML_ENABLE_WARNINGS
|
||||
|
||||
TEST_CASE("conformance - iarna/valid")
|
||||
{
|
||||
|
@ -6,10 +6,9 @@
|
||||
#include "tests.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_ALL_WARNINGS
|
||||
TOML_DISABLE_WARNINGS
|
||||
#include <Windows.h>
|
||||
TOML_POP_WARNINGS
|
||||
TOML_ENABLE_WARNINGS
|
||||
#endif
|
||||
|
||||
template <typename T>
|
||||
|
@ -26,14 +26,13 @@
|
||||
|
||||
TOML_DISABLE_ARITHMETIC_WARNINGS
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_ALL_WARNINGS
|
||||
TOML_DISABLE_WARNINGS
|
||||
#include "catch2.h"
|
||||
#include <sstream>
|
||||
namespace toml {}
|
||||
using namespace Catch::literals;
|
||||
using namespace toml;
|
||||
TOML_POP_WARNINGS
|
||||
TOML_ENABLE_WARNINGS
|
||||
|
||||
#define FILE_LINE_ARGS std::string_view{ __FILE__ }, __LINE__
|
||||
#define BOM_PREFIX "\xEF\xBB\xBF"
|
||||
|
@ -7,10 +7,9 @@
|
||||
|
||||
#if TOML_WINDOWS_COMPAT
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_ALL_WARNINGS
|
||||
TOML_DISABLE_WARNINGS
|
||||
#include <Windows.h>
|
||||
TOML_POP_WARNINGS
|
||||
TOML_ENABLE_WARNINGS
|
||||
|
||||
TEST_CASE("windows compat")
|
||||
{
|
||||
|
254
toml.hpp
254
toml.hpp
@ -1,6 +1,6 @@
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
//
|
||||
// toml++ v2.0.1
|
||||
// toml++ v2.1.0
|
||||
// https://github.com/marzer/tomlplusplus
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
@ -15,10 +15,12 @@
|
||||
//
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
//
|
||||
// TOML language specifications:
|
||||
// Latest: https://github.com/toml-lang/toml/blob/master/README.md
|
||||
// TOML Language Specifications:
|
||||
// latest: https://github.com/toml-lang/toml/blob/master/README.md
|
||||
// v1.0.0-rc.2: https://toml.io/en/v1.0.0-rc.2
|
||||
// v1.0.0-rc.1: https://toml.io/en/v1.0.0-rc.1
|
||||
// v0.5.0: https://toml.io/en/v0.5.0
|
||||
// changelog: https://github.com/toml-lang/toml/blob/master/CHANGELOG.md
|
||||
//
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
//
|
||||
@ -62,8 +64,14 @@
|
||||
#endif
|
||||
#ifdef __INTEL_COMPILER
|
||||
#define TOML_ICC __INTEL_COMPILER
|
||||
#ifdef __ICL
|
||||
#define TOML_ICC_CL TOML_ICC
|
||||
#else
|
||||
#define TOML_ICC_CL 0
|
||||
#endif
|
||||
#else
|
||||
#define TOML_ICC 0
|
||||
#define TOML_ICC_CL 0
|
||||
#endif
|
||||
#if defined(_MSC_VER) && !TOML_CLANG && !TOML_ICC
|
||||
#define TOML_MSVC _MSC_VER
|
||||
@ -81,16 +89,18 @@
|
||||
#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_PADDING_WARNINGS _Pragma("clang diagnostic ignored \"-Wpadded\"")
|
||||
#define TOML_DISABLE_ARITHMETIC_WARNINGS _Pragma("clang diagnostic ignored \"-Wfloat-equal\"") \
|
||||
_Pragma("clang diagnostic ignored \"-Wdouble-promotion\"") \
|
||||
_Pragma("clang diagnostic ignored \"-Wchar-subscripts\"")
|
||||
_Pragma("clang diagnostic ignored \"-Wchar-subscripts\"") \
|
||||
_Pragma("clang diagnostic ignored \"-Wshift-sign-overflow\"")
|
||||
#define TOML_DISABLE_SHADOW_WARNINGS _Pragma("clang diagnostic ignored \"-Wshadow\"")
|
||||
#define TOML_DISABLE_MISC_WARNINGS _Pragma("clang diagnostic ignored \"-Wweak-vtables\"") \
|
||||
_Pragma("clang diagnostic ignored \"-Wweak-template-vtables\"")
|
||||
#define TOML_DISABLE_ALL_WARNINGS _Pragma("clang diagnostic ignored \"-Weverything\"")
|
||||
#define TOML_DISABLE_SPAM_WARNINGS _Pragma("clang diagnostic ignored \"-Wweak-vtables\"") \
|
||||
_Pragma("clang diagnostic ignored \"-Wweak-template-vtables\"") \
|
||||
_Pragma("clang diagnostic ignored \"-Wpadded\"")
|
||||
#define TOML_POP_WARNINGS _Pragma("clang diagnostic pop")
|
||||
|
||||
#define TOML_DISABLE_WARNINGS TOML_PUSH_WARNINGS \
|
||||
_Pragma("clang diagnostic ignored \"-Weverything\"")
|
||||
#define TOML_ENABLE_WARNINGS TOML_POP_WARNINGS
|
||||
#define TOML_ASSUME(cond) __builtin_assume(cond)
|
||||
#define TOML_UNREACHABLE __builtin_unreachable()
|
||||
#define TOML_ATTR(...) __attribute__((__VA_ARGS__))
|
||||
@ -121,9 +131,7 @@
|
||||
#define TOML_TRIVIAL_ABI __attribute__((__trivial_abi__))
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __EXCEPTIONS
|
||||
#define TOML_COMPILER_EXCEPTIONS 1
|
||||
#else
|
||||
#ifndef __EXCEPTIONS
|
||||
#define TOML_COMPILER_EXCEPTIONS 0
|
||||
#endif
|
||||
#define TOML_LIKELY(...) (__builtin_expect(!!(__VA_ARGS__), 1) )
|
||||
@ -138,34 +146,47 @@
|
||||
|
||||
#endif // clang
|
||||
|
||||
#if TOML_MSVC || (defined(_MSC_VER) && TOML_ICC && defined(__ICL))
|
||||
#if TOML_MSVC || TOML_ICC_CL
|
||||
|
||||
#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_CPP_VERSION _MSVC_LANG
|
||||
#define TOML_CPP_VERSION _MSVC_LANG
|
||||
#define TOML_PUSH_WARNINGS __pragma(warning(push))
|
||||
#if TOML_MSVC // !intel-cl
|
||||
#define TOML_PUSH_WARNINGS __pragma(warning(push))
|
||||
#define TOML_DISABLE_SWITCH_WARNINGS __pragma(warning(disable: 4063))
|
||||
#define TOML_POP_WARNINGS __pragma(warning(pop))
|
||||
#define TOML_DISABLE_WARNINGS __pragma(warning(push, 0))
|
||||
#define TOML_ENABLE_WARNINGS TOML_POP_WARNINGS
|
||||
#endif
|
||||
#ifndef TOML_ALWAYS_INLINE
|
||||
#define TOML_ALWAYS_INLINE __forceinline
|
||||
#define TOML_ALWAYS_INLINE __forceinline
|
||||
#endif
|
||||
#define TOML_NEVER_INLINE __declspec(noinline)
|
||||
#define TOML_ASSUME(cond) __assume(cond)
|
||||
#define TOML_UNREACHABLE __assume(0)
|
||||
#define TOML_INTERFACE __declspec(novtable)
|
||||
#define TOML_EMPTY_BASES __declspec(empty_bases)
|
||||
#define TOML_NEVER_INLINE __declspec(noinline)
|
||||
#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
|
||||
#define TOML_RELOPS_REORDERING 1
|
||||
#endif
|
||||
#ifdef _CPPUNWIND
|
||||
#define TOML_COMPILER_EXCEPTIONS 1
|
||||
#else
|
||||
#define TOML_COMPILER_EXCEPTIONS 0
|
||||
#ifndef _CPPUNWIND
|
||||
#define TOML_COMPILER_EXCEPTIONS 0
|
||||
#endif
|
||||
|
||||
#endif // msvc
|
||||
|
||||
#if TOML_ICC
|
||||
|
||||
#define TOML_PUSH_WARNINGS __pragma(warning(push))
|
||||
#define TOML_DISABLE_SPAM_WARNINGS __pragma(warning(disable: 82)) /* storage class is not first */ \
|
||||
__pragma(warning(disable: 111)) /* statement unreachable (false-positive) */ \
|
||||
__pragma(warning(disable: 1011)) /* missing return (false-positive) */ \
|
||||
__pragma(warning(disable: 2261)) /* assume expr side-effects discarded */
|
||||
#define TOML_POP_WARNINGS __pragma(warning(pop))
|
||||
#define TOML_DISABLE_WARNINGS __pragma(warning(push, 0))
|
||||
#define TOML_ENABLE_WARNINGS TOML_POP_WARNINGS
|
||||
|
||||
#endif // icc
|
||||
|
||||
#if TOML_GCC
|
||||
|
||||
#define TOML_PUSH_WARNINGS _Pragma("GCC diagnostic push")
|
||||
@ -175,26 +196,28 @@
|
||||
#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\"") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wcast-align\"")
|
||||
#define TOML_DISABLE_ARITHMETIC_WARNINGS _Pragma("GCC diagnostic ignored \"-Wfloat-equal\"") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wsign-conversion\"") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wchar-subscripts\"")
|
||||
#define TOML_DISABLE_SHADOW_WARNINGS _Pragma("GCC diagnostic ignored \"-Wshadow\"")
|
||||
#define TOML_DISABLE_SUGGEST_WARNINGS _Pragma("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wsuggest-attribute=pure\"")
|
||||
#define TOML_DISABLE_MISC_WARNINGS _Pragma("GCC diagnostic ignored \"-Wcomment\"") \
|
||||
#define TOML_DISABLE_SPAM_WARNINGS _Pragma("GCC diagnostic ignored \"-Wpadded\"") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wcast-align\"") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wcomment\"") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wtype-limits\"")
|
||||
#define TOML_DISABLE_ALL_WARNINGS _Pragma("GCC diagnostic ignored \"-Wall\"") \
|
||||
#define TOML_POP_WARNINGS _Pragma("GCC diagnostic pop")
|
||||
#define TOML_DISABLE_WARNINGS TOML_PUSH_WARNINGS \
|
||||
_Pragma("GCC diagnostic ignored \"-Wall\"") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wextra\"") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wpedantic\"") \
|
||||
TOML_DISABLE_SWITCH_WARNINGS \
|
||||
TOML_DISABLE_INIT_WARNINGS \
|
||||
TOML_DISABLE_PADDING_WARNINGS \
|
||||
TOML_DISABLE_ARITHMETIC_WARNINGS \
|
||||
TOML_DISABLE_SHADOW_WARNINGS \
|
||||
TOML_DISABLE_SUGGEST_WARNINGS \
|
||||
TOML_DISABLE_MISC_WARNINGS
|
||||
#define TOML_POP_WARNINGS _Pragma("GCC diagnostic pop")
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
#define TOML_ENABLE_WARNINGS TOML_POP_WARNINGS
|
||||
|
||||
#define TOML_ATTR(...) __attribute__((__VA_ARGS__))
|
||||
#ifndef TOML_ALWAYS_INLINE
|
||||
@ -205,9 +228,7 @@
|
||||
#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
|
||||
#ifndef __cpp_exceptions
|
||||
#define TOML_COMPILER_EXCEPTIONS 0
|
||||
#endif
|
||||
#define TOML_LIKELY(...) (__builtin_expect(!!(__VA_ARGS__), 1) )
|
||||
@ -357,11 +378,8 @@ is no longer necessary.
|
||||
#ifndef TOML_DISABLE_INIT_WARNINGS
|
||||
#define TOML_DISABLE_INIT_WARNINGS
|
||||
#endif
|
||||
#ifndef TOML_DISABLE_MISC_WARNINGS
|
||||
#define TOML_DISABLE_MISC_WARNINGS
|
||||
#endif
|
||||
#ifndef TOML_DISABLE_PADDING_WARNINGS
|
||||
#define TOML_DISABLE_PADDING_WARNINGS
|
||||
#ifndef TOML_DISABLE_SPAM_WARNINGS
|
||||
#define TOML_DISABLE_SPAM_WARNINGS
|
||||
#endif
|
||||
#ifndef TOML_DISABLE_ARITHMETIC_WARNINGS
|
||||
#define TOML_DISABLE_ARITHMETIC_WARNINGS
|
||||
@ -372,12 +390,15 @@ is no longer necessary.
|
||||
#ifndef TOML_DISABLE_SUGGEST_WARNINGS
|
||||
#define TOML_DISABLE_SUGGEST_WARNINGS
|
||||
#endif
|
||||
#ifndef TOML_DISABLE_ALL_WARNINGS
|
||||
#define TOML_DISABLE_ALL_WARNINGS
|
||||
#endif
|
||||
#ifndef TOML_POP_WARNINGS
|
||||
#define TOML_POP_WARNINGS
|
||||
#endif
|
||||
#ifndef TOML_DISABLE_WARNINGS
|
||||
#define TOML_DISABLE_WARNINGS
|
||||
#endif
|
||||
#ifndef TOML_ENABLE_WARNINGS
|
||||
#define TOML_ENABLE_WARNINGS
|
||||
#endif
|
||||
|
||||
#ifndef TOML_ATTR
|
||||
#define TOML_ATTR(...)
|
||||
@ -496,8 +517,8 @@ is no longer necessary.
|
||||
#endif
|
||||
|
||||
#define TOML_LIB_MAJOR 2
|
||||
#define TOML_LIB_MINOR 0
|
||||
#define TOML_LIB_PATCH 1
|
||||
#define TOML_LIB_MINOR 1
|
||||
#define TOML_LIB_PATCH 0
|
||||
|
||||
#define TOML_LANG_MAJOR 1
|
||||
#define TOML_LANG_MINOR 0
|
||||
@ -565,8 +586,7 @@ is no longer necessary.
|
||||
#define TOML_INTERNAL_LINKAGE static
|
||||
#endif
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_ALL_WARNINGS
|
||||
TOML_DISABLE_WARNINGS
|
||||
#ifndef TOML_ASSERT
|
||||
#if defined(NDEBUG) || !defined(_DEBUG)
|
||||
#define TOML_ASSERT(expr) (void)0
|
||||
@ -577,7 +597,7 @@ TOML_DISABLE_ALL_WARNINGS
|
||||
#define TOML_ASSERT(expr) assert(expr)
|
||||
#endif
|
||||
#endif
|
||||
TOML_POP_WARNINGS
|
||||
TOML_ENABLE_WARNINGS
|
||||
|
||||
#endif
|
||||
//-------------- ↑ toml_preprocessor.h -------------------------------------------------------------------------------
|
||||
@ -586,7 +606,9 @@ TOML_POP_WARNINGS
|
||||
#if 1
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_ALL_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
TOML_DISABLE_WARNINGS
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
#include <cstring>
|
||||
@ -605,7 +627,7 @@ TOML_DISABLE_ALL_WARNINGS
|
||||
#if TOML_HAS_INCLUDE(<version>)
|
||||
#include <version>
|
||||
#endif
|
||||
TOML_POP_WARNINGS
|
||||
TOML_ENABLE_WARNINGS
|
||||
|
||||
#ifdef __cpp_lib_launder
|
||||
#define TOML_LAUNDER(x) std::launder(x)
|
||||
@ -636,9 +658,6 @@ static_assert(std::numeric_limits<double>::digits10 == 15, TOML_ENV_MESSAGE);
|
||||
|
||||
#ifndef DOXYGEN // undocumented forward declarations are hidden from doxygen because they fuck it up =/
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_PADDING_WARNINGS
|
||||
|
||||
namespace toml // non-abi namespace; this is not an error
|
||||
{
|
||||
using namespace std::string_literals;
|
||||
@ -775,8 +794,6 @@ TOML_NAMESPACE_START // abi namespace
|
||||
}
|
||||
TOML_NAMESPACE_END
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_PADDING_WARNINGS
|
||||
|
||||
#endif // !DOXYGEN
|
||||
|
||||
namespace toml { }
|
||||
@ -1314,6 +1331,8 @@ TOML_NAMESPACE_START
|
||||
}
|
||||
TOML_NAMESPACE_END
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
#endif
|
||||
//------------------------------------------ ↑ toml_common.h ---------------------------------------------------------
|
||||
|
||||
@ -1321,7 +1340,7 @@ TOML_NAMESPACE_END
|
||||
#if 1
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
TOML_NAMESPACE_START
|
||||
{
|
||||
@ -1624,7 +1643,7 @@ TOML_NAMESPACE_START
|
||||
}
|
||||
TOML_NAMESPACE_END
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
#endif
|
||||
//----------------------------------------------------------------- ↑ toml_date_time.h -------------------------------
|
||||
@ -1632,8 +1651,7 @@ TOML_POP_WARNINGS // TOML_DISABLE_PADDING_WARNINGS
|
||||
//--------------------------------------------------------------------------------------- ↓ toml_print_to_stream.h ---
|
||||
#if 1
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_ALL_WARNINGS
|
||||
TOML_DISABLE_WARNINGS
|
||||
#include <cmath>
|
||||
#if TOML_INT_CHARCONV || TOML_FLOAT_CHARCONV
|
||||
#include <charconv>
|
||||
@ -1644,7 +1662,7 @@ TOML_DISABLE_ALL_WARNINGS
|
||||
#if !TOML_INT_CHARCONV
|
||||
#include <iomanip>
|
||||
#endif
|
||||
TOML_POP_WARNINGS
|
||||
TOML_ENABLE_WARNINGS
|
||||
|
||||
TOML_IMPL_NAMESPACE_START
|
||||
{
|
||||
@ -2028,8 +2046,7 @@ TOML_NAMESPACE_END
|
||||
#if 1
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_DISABLE_MISC_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
#if defined(DOXYGEN) || TOML_SIMPLE_STATIC_ASSERT_MESSAGES
|
||||
|
||||
@ -2495,7 +2512,7 @@ TOML_NAMESPACE_START
|
||||
}
|
||||
TOML_NAMESPACE_END
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_PADDING_WARNINGS, TOML_DISABLE_MISC_WARNINGS
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
#endif
|
||||
//------------------ ↑ toml_node.h -----------------------------------------------------------------------------------
|
||||
@ -2564,8 +2581,7 @@ TOML_POP_WARNINGS // TOML_DISABLE_PADDING_WARNINGS, TOML_DISABLE_MISC_WARNINGS
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_ARITHMETIC_WARNINGS
|
||||
TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_DISABLE_MISC_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
TOML_IMPL_NAMESPACE_START
|
||||
{
|
||||
@ -3270,7 +3286,7 @@ TOML_NAMESPACE_START
|
||||
}
|
||||
TOML_NAMESPACE_END
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_ARITHMETIC_WARNINGS, TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_ARITHMETIC_WARNINGS
|
||||
|
||||
#endif
|
||||
//------------------------------------------ ↑ toml_value.h ----------------------------------------------------------
|
||||
@ -3279,7 +3295,7 @@ TOML_POP_WARNINGS // TOML_DISABLE_ARITHMETIC_WARNINGS, TOML_DISABLE_PADDING_WARN
|
||||
#if 1
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_MISC_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
TOML_IMPL_NAMESPACE_START
|
||||
{
|
||||
@ -3432,8 +3448,7 @@ TOML_IMPL_NAMESPACE_START
|
||||
return *(raw_ + idx)->get();
|
||||
}
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_ALL_WARNINGS
|
||||
TOML_DISABLE_WARNINGS
|
||||
|
||||
template <bool C = IsConst, typename = std::enable_if_t<!C>>
|
||||
[[nodiscard]]
|
||||
@ -3442,7 +3457,7 @@ TOML_IMPL_NAMESPACE_START
|
||||
return array_iterator<true>{ raw_ };
|
||||
}
|
||||
|
||||
TOML_POP_WARNINGS
|
||||
TOML_ENABLE_WARNINGS
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
@ -3842,7 +3857,7 @@ TOML_NAMESPACE_START
|
||||
}
|
||||
TOML_NAMESPACE_END
|
||||
|
||||
TOML_POP_WARNINGS //TOML_DISABLE_MISC_WARNINGS
|
||||
TOML_POP_WARNINGS //TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
#endif
|
||||
//------------------------------------------------------------------- ↑ toml_array.h ---------------------------------
|
||||
@ -3851,8 +3866,7 @@ TOML_POP_WARNINGS //TOML_DISABLE_MISC_WARNINGS
|
||||
#if 1
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_MISC_WARNINGS
|
||||
TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
TOML_IMPL_NAMESPACE_START
|
||||
{
|
||||
@ -3976,8 +3990,7 @@ TOML_IMPL_NAMESPACE_START
|
||||
return lhs.raw_ != rhs.raw_;
|
||||
}
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_ALL_WARNINGS
|
||||
TOML_DISABLE_WARNINGS
|
||||
|
||||
template <bool C = IsConst, typename = std::enable_if_t<!C>>
|
||||
[[nodiscard]]
|
||||
@ -3986,7 +3999,7 @@ TOML_IMPL_NAMESPACE_START
|
||||
return table_iterator<true>{ raw_ };
|
||||
}
|
||||
|
||||
TOML_POP_WARNINGS
|
||||
TOML_ENABLE_WARNINGS
|
||||
};
|
||||
|
||||
struct table_init_pair final
|
||||
@ -4403,7 +4416,7 @@ TOML_NAMESPACE_START
|
||||
}
|
||||
TOML_NAMESPACE_END
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_MISC_WARNINGS, TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
#endif
|
||||
//-------------------------------------------------------------------------------------------- ↑ toml_table.h --------
|
||||
@ -5771,7 +5784,7 @@ TOML_IMPL_NAMESPACE_END
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_SWITCH_WARNINGS
|
||||
TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
TOML_NAMESPACE_START
|
||||
{
|
||||
@ -6008,7 +6021,7 @@ TOML_IMPL_NAMESPACE_START
|
||||
}
|
||||
TOML_IMPL_NAMESPACE_END
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
#endif
|
||||
//----------------------------------------------------------------- ↑ toml_formatter.h -------------------------------
|
||||
@ -6018,7 +6031,7 @@ TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_PADDING_WARNINGS
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_SWITCH_WARNINGS
|
||||
TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
TOML_IMPL_NAMESPACE_START
|
||||
{
|
||||
@ -6371,7 +6384,7 @@ TOML_NAMESPACE_START
|
||||
}
|
||||
TOML_NAMESPACE_END
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
#endif
|
||||
//-------------------------------------------------------------------------------------- ↑ toml_default_formatter.h --
|
||||
@ -6381,7 +6394,7 @@ TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_PADDING_WARNINGS
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_SWITCH_WARNINGS
|
||||
TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
TOML_NAMESPACE_START
|
||||
{
|
||||
@ -6490,7 +6503,7 @@ TOML_NAMESPACE_START
|
||||
}
|
||||
TOML_NAMESPACE_END
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
#endif
|
||||
//------------- ↑ toml_json_formatter.h ------------------------------------------------------------------------------
|
||||
@ -6500,16 +6513,15 @@ TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_PADDING_WARNINGS
|
||||
//--------------------------------------- ↓ toml_parse_error.h -------------------------------------------------------
|
||||
#if 1
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_ALL_WARNINGS
|
||||
TOML_DISABLE_WARNINGS
|
||||
#if TOML_EXCEPTIONS
|
||||
#include <stdexcept>
|
||||
#endif
|
||||
TOML_POP_WARNINGS
|
||||
TOML_ENABLE_WARNINGS
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_INIT_WARNINGS
|
||||
TOML_DISABLE_MISC_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
TOML_NAMESPACE_START
|
||||
{
|
||||
@ -6625,8 +6637,7 @@ TOML_POP_WARNINGS
|
||||
#if 1
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_DISABLE_MISC_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
TOML_IMPL_NAMESPACE_START
|
||||
{
|
||||
@ -6930,9 +6941,7 @@ TOML_IMPL_NAMESPACE_START
|
||||
}
|
||||
}
|
||||
|
||||
#if !TOML_ICC
|
||||
TOML_UNREACHABLE;
|
||||
#endif
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
@ -6995,7 +7004,7 @@ TOML_IMPL_NAMESPACE_START
|
||||
}
|
||||
TOML_IMPL_NAMESPACE_END
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_PADDING_WARNINGS, TOML_DISABLE_MISC_WARNINGS
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
#endif
|
||||
//---------------------------------------------------------------- ↑ toml_utf8_streams.h -----------------------------
|
||||
@ -7004,7 +7013,7 @@ TOML_POP_WARNINGS // TOML_DISABLE_PADDING_WARNINGS, TOML_DISABLE_MISC_WARNINGS
|
||||
#if 1
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
TOML_NAMESPACE_START
|
||||
{
|
||||
@ -7425,7 +7434,7 @@ TOML_NAMESPACE_END
|
||||
|
||||
#undef TOML_THROW_PARSE_ERROR
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
#endif
|
||||
//-------------------------------------------------------------------------------------------- ↑ toml_parser.h -------
|
||||
@ -7536,7 +7545,7 @@ TOML_POP_WARNINGS // TOML_DISABLE_SUGGEST_WARNINGS
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_SUGGEST_WARNINGS
|
||||
TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
TOML_NAMESPACE_START
|
||||
{
|
||||
@ -7844,7 +7853,7 @@ TOML_NAMESPACE_START
|
||||
}
|
||||
TOML_NAMESPACE_END
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SUGGEST_WARNINGS, TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SUGGEST_WARNINGS, TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
#endif
|
||||
//----------------------------------------- ↑ toml_array.hpp ---------------------------------------------------------
|
||||
@ -7854,7 +7863,7 @@ TOML_POP_WARNINGS // TOML_DISABLE_SUGGEST_WARNINGS, TOML_DISABLE_PADDING_WARNING
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_SUGGEST_WARNINGS
|
||||
TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
TOML_NAMESPACE_START
|
||||
{
|
||||
@ -8159,7 +8168,7 @@ TOML_NAMESPACE_START
|
||||
}
|
||||
TOML_NAMESPACE_END
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SUGGEST_WARNINGS, TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SUGGEST_WARNINGS, TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
#endif
|
||||
//------------------------------------------------------------------ ↑ toml_table.hpp --------------------------------
|
||||
@ -8167,16 +8176,14 @@ TOML_POP_WARNINGS // TOML_DISABLE_SUGGEST_WARNINGS, TOML_DISABLE_PADDING_WARNING
|
||||
//------------------------------------------------------------------------------------- ↓ toml_default_formatter.hpp -
|
||||
#if 1
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_ALL_WARNINGS
|
||||
TOML_DISABLE_WARNINGS
|
||||
#include <cmath>
|
||||
TOML_POP_WARNINGS
|
||||
TOML_ENABLE_WARNINGS
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_SWITCH_WARNINGS
|
||||
TOML_DISABLE_ARITHMETIC_WARNINGS
|
||||
TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_DISABLE_MISC_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
TOML_IMPL_NAMESPACE_START
|
||||
{
|
||||
@ -8365,10 +8372,9 @@ TOML_NAMESPACE_END
|
||||
// implementations of windows wide string nonsense
|
||||
#if TOML_WINDOWS_COMPAT
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_ALL_WARNINGS
|
||||
TOML_DISABLE_WARNINGS
|
||||
#include <Windows.h> // fuckkkk :(
|
||||
TOML_POP_WARNINGS
|
||||
TOML_ENABLE_WARNINGS
|
||||
|
||||
TOML_IMPL_NAMESPACE_START
|
||||
{
|
||||
@ -8426,8 +8432,7 @@ TOML_IMPL_NAMESPACE_END
|
||||
|
||||
#endif // TOML_WINDOWS_COMPAT
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_ARITHMETIC_WARNINGS,
|
||||
// TOML_DISABLE_PADDING_WARNINGS, TOML_DISABLE_MISC_WARNINGS
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_ARITHMETIC_WARNINGS, TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
#endif
|
||||
//------------------------------------------------------------------------------------- ↑ toml_default_formatter.hpp -
|
||||
@ -8591,8 +8596,7 @@ TOML_IMPL_NAMESPACE_END
|
||||
//------------------------------------------------------------------ ↓ toml_parser.hpp -------------------------------
|
||||
#if 1
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_ALL_WARNINGS
|
||||
TOML_DISABLE_WARNINGS
|
||||
#include <cmath>
|
||||
#if TOML_INT_CHARCONV || TOML_FLOAT_CHARCONV
|
||||
#include <charconv>
|
||||
@ -8603,11 +8607,11 @@ TOML_DISABLE_ALL_WARNINGS
|
||||
#if !TOML_HEADER_ONLY
|
||||
using namespace std::string_view_literals;
|
||||
#endif
|
||||
TOML_POP_WARNINGS
|
||||
TOML_ENABLE_WARNINGS
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_SWITCH_WARNINGS
|
||||
TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
#if TOML_EXCEPTIONS && !defined(__INTELLISENSE__)
|
||||
#define TOML_RETURNS_BY_THROWING [[noreturn]]
|
||||
@ -11589,7 +11593,7 @@ TOML_NAMESPACE_START
|
||||
}
|
||||
TOML_NAMESPACE_END
|
||||
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_PADDING_WARNINGS
|
||||
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_SPAM_WARNINGS
|
||||
|
||||
#endif
|
||||
//------------------------------------------------------------------ ↑ toml_parser.hpp -------------------------------
|
||||
@ -11601,12 +11605,11 @@ TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_PADDING_WARNINGS
|
||||
//--------------------------------------------------------------------------------------- ↓ toml_instantiations.hpp --
|
||||
#if 1
|
||||
|
||||
TOML_PUSH_WARNINGS
|
||||
TOML_DISABLE_ALL_WARNINGS
|
||||
TOML_DISABLE_WARNINGS
|
||||
#include <ostream>
|
||||
#include <istream>
|
||||
#include <fstream>
|
||||
TOML_POP_WARNINGS
|
||||
TOML_ENABLE_WARNINGS
|
||||
|
||||
#if TOML_PARSER
|
||||
|
||||
@ -11767,14 +11770,14 @@ TOML_NAMESPACE_END
|
||||
#undef TOML_CONCAT_1
|
||||
#undef TOML_CONSTEVAL
|
||||
#undef TOML_CPP
|
||||
#undef TOML_DISABLE_ALL_WARNINGS
|
||||
#undef TOML_DISABLE_ARITHMETIC_WARNINGS
|
||||
#undef TOML_DISABLE_INIT_WARNINGS
|
||||
#undef TOML_DISABLE_MISC_WARNINGS
|
||||
#undef TOML_DISABLE_PADDING_WARNINGS
|
||||
#undef TOML_DISABLE_SPAM_WARNINGS
|
||||
#undef TOML_DISABLE_SHADOW_WARNINGS
|
||||
#undef TOML_DISABLE_SUGGEST_WARNINGS
|
||||
#undef TOML_DISABLE_SWITCH_WARNINGS
|
||||
#undef TOML_DISABLE_WARNINGS
|
||||
#undef TOML_ENABLE_WARNINGS
|
||||
#undef TOML_EMPTY_BASES
|
||||
#undef TOML_EVAL_BOOL_0
|
||||
#undef TOML_EVAL_BOOL_1
|
||||
@ -11787,6 +11790,7 @@ TOML_NAMESPACE_END
|
||||
#undef TOML_HAS_CUSTOM_OPTIONAL_TYPE
|
||||
#undef TOML_HAS_INCLUDE
|
||||
#undef TOML_ICC
|
||||
#undef TOML_ICC_CL
|
||||
#undef TOML_IMPLEMENTATION
|
||||
#undef TOML_IMPL_NAMESPACE_END
|
||||
#undef TOML_IMPL_NAMESPACE_START
|
||||
|
Loading…
Reference in New Issue
Block a user