From 2ac735054af8fc57f87c1f1f3131cccd2be41990 Mon Sep 17 00:00:00 2001 From: Mark Gillard Date: Sun, 9 Aug 2020 12:27:14 +0300 Subject: [PATCH] updated TOML version to v1.0.0-rc.2 also: - simplified warning handling macros - minor version bump --- README.md | 8 +- docs/Doxyfile | 6 +- docs/badge-TOML.svg | 2 +- docs/main_page.dox | 8 +- include/toml++/toml.h | 7 +- include/toml++/toml_array.h | 9 +- include/toml++/toml_array.hpp | 4 +- include/toml++/toml_common.h | 15 +- include/toml++/toml_date_time.h | 4 +- include/toml++/toml_default_formatter.h | 4 +- include/toml++/toml_default_formatter.hpp | 16 +- include/toml++/toml_formatter.h | 4 +- include/toml++/toml_instantiations.hpp | 8 +- include/toml++/toml_json_formatter.h | 4 +- include/toml++/toml_node.h | 5 +- include/toml++/toml_parse_error.h | 7 +- include/toml++/toml_parser.h | 4 +- include/toml++/toml_parser.hpp | 9 +- include/toml++/toml_preprocessor.h | 120 +++++----- include/toml++/toml_print_to_stream.h | 5 +- include/toml++/toml_table.h | 10 +- include/toml++/toml_table.hpp | 4 +- include/toml++/toml_utf8_streams.h | 7 +- include/toml++/toml_value.h | 5 +- include/toml++/toml_version.h | 4 +- meson.build | 2 +- python/generate_conformance_tests.py | 5 +- python/generate_documentation.py | 4 +- python/generate_single_header.py | 8 +- tests/conformance_burntsushi_invalid.cpp | 5 +- tests/conformance_burntsushi_valid.cpp | 5 +- tests/conformance_iarna_invalid.cpp | 5 +- tests/conformance_iarna_valid.cpp | 5 +- tests/manipulating_values.cpp | 5 +- tests/tests.h | 5 +- tests/windows_compat.cpp | 5 +- toml.hpp | 254 +++++++++++----------- 37 files changed, 296 insertions(+), 291 deletions(-) diff --git a/README.md b/README.md index 996e227..7c968dd 100644 --- a/README.md +++ b/README.md @@ -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/ diff --git a/docs/Doxyfile b/docs/Doxyfile index 5c64f60..6e9e447 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -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" \ diff --git a/docs/badge-TOML.svg b/docs/badge-TOML.svg index 44f161e..eba4432 100644 --- a/docs/badge-TOML.svg +++ b/docs/badge-TOML.svg @@ -1 +1 @@ - TOMLv1.0.0 rc.1 \ No newline at end of file +TOML: v1.0.0-rc.2TOMLv1.0.0-rc.2 \ No newline at end of file diff --git a/docs/main_page.dox b/docs/main_page.dox index d8e29a2..ab75a21 100644 --- a/docs/main_page.dox +++ b/docs/main_page.dox @@ -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" /// ] /// } diff --git a/include/toml++/toml.h b/include/toml++/toml.h index 933a410..50ad5d1 100644 --- a/include/toml++/toml.h +++ b/include/toml++/toml.h @@ -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 diff --git a/include/toml++/toml_array.h b/include/toml++/toml_array.h index d8b5020..c3985c6 100644 --- a/include/toml++/toml_array.h +++ b/include/toml++/toml_array.h @@ -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 > [[nodiscard]] @@ -170,7 +169,7 @@ TOML_IMPL_NAMESPACE_START return array_iterator{ raw_ }; } - TOML_POP_WARNINGS + TOML_ENABLE_WARNINGS }; template @@ -1038,4 +1037,4 @@ TOML_NAMESPACE_START } TOML_NAMESPACE_END -TOML_POP_WARNINGS //TOML_DISABLE_MISC_WARNINGS +TOML_POP_WARNINGS //TOML_DISABLE_SPAM_WARNINGS diff --git a/include/toml++/toml_array.hpp b/include/toml++/toml_array.hpp index 77c71a1..7bf7f5e 100644 --- a/include/toml++/toml_array.hpp +++ b/include/toml++/toml_array.hpp @@ -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 diff --git a/include/toml++/toml_common.h b/include/toml++/toml_common.h index 3cdedce..233a315 100644 --- a/include/toml++/toml_common.h +++ b/include/toml++/toml_common.h @@ -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 #include #include @@ -30,7 +32,7 @@ TOML_DISABLE_ALL_WARNINGS #if TOML_HAS_INCLUDE() #include #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::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 diff --git a/include/toml++/toml_date_time.h b/include/toml++/toml_date_time.h index 51a30c8..865c28d 100644 --- a/include/toml++/toml_date_time.h +++ b/include/toml++/toml_date_time.h @@ -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 diff --git a/include/toml++/toml_default_formatter.h b/include/toml++/toml_default_formatter.h index ca21659..fa4c29c 100644 --- a/include/toml++/toml_default_formatter.h +++ b/include/toml++/toml_default_formatter.h @@ -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 diff --git a/include/toml++/toml_default_formatter.hpp b/include/toml++/toml_default_formatter.hpp index 255a46a..bfbc77c 100644 --- a/include/toml++/toml_default_formatter.hpp +++ b/include/toml++/toml_default_formatter.hpp @@ -12,16 +12,14 @@ //# }} #include "toml_default_formatter.h" -TOML_PUSH_WARNINGS -TOML_DISABLE_ALL_WARNINGS +TOML_DISABLE_WARNINGS #include -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 // 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 diff --git a/include/toml++/toml_formatter.h b/include/toml++/toml_formatter.h index c0b58e8..05a68d7 100644 --- a/include/toml++/toml_formatter.h +++ b/include/toml++/toml_formatter.h @@ -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 diff --git a/include/toml++/toml_instantiations.hpp b/include/toml++/toml_instantiations.hpp index dda1f4d..2513254 100644 --- a/include/toml++/toml_instantiations.hpp +++ b/include/toml++/toml_instantiations.hpp @@ -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 #include #include -TOML_POP_WARNINGS +TOML_ENABLE_WARNINGS + #include "toml_node_view.h" #include "toml_default_formatter.h" #include "toml_json_formatter.h" diff --git a/include/toml++/toml_json_formatter.h b/include/toml++/toml_json_formatter.h index dddd156..c9bc7e3 100644 --- a/include/toml++/toml_json_formatter.h +++ b/include/toml++/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 diff --git a/include/toml++/toml_node.h b/include/toml++/toml_node.h index 45c5f32..6551944 100644 --- a/include/toml++/toml_node.h +++ b/include/toml++/toml_node.h @@ -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 diff --git a/include/toml++/toml_parse_error.h b/include/toml++/toml_parse_error.h index 0c0962c..b4072cb 100644 --- a/include/toml++/toml_parse_error.h +++ b/include/toml++/toml_parse_error.h @@ -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 #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 { diff --git a/include/toml++/toml_parser.h b/include/toml++/toml_parser.h index f7f3416..76f3260 100644 --- a/include/toml++/toml_parser.h +++ b/include/toml++/toml_parser.h @@ -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 diff --git a/include/toml++/toml_parser.hpp b/include/toml++/toml_parser.hpp index f9dedf4..3fd8d00 100644 --- a/include/toml++/toml_parser.hpp +++ b/include/toml++/toml_parser.hpp @@ -15,8 +15,7 @@ //# }} #include "toml_parser.h" -TOML_PUSH_WARNINGS -TOML_DISABLE_ALL_WARNINGS +TOML_DISABLE_WARNINGS #include #if TOML_INT_CHARCONV || TOML_FLOAT_CHARCONV #include @@ -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 diff --git a/include/toml++/toml_preprocessor.h b/include/toml++/toml_preprocessor.h index 97abcd3..ed95428 100644 --- a/include/toml++/toml_preprocessor.h +++ b/include/toml++/toml_preprocessor.h @@ -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 diff --git a/include/toml++/toml_print_to_stream.h b/include/toml++/toml_print_to_stream.h index 2c10d39..6f53ab4 100644 --- a/include/toml++/toml_print_to_stream.h +++ b/include/toml++/toml_print_to_stream.h @@ -5,8 +5,7 @@ #pragma once #include "toml_date_time.h" -TOML_PUSH_WARNINGS -TOML_DISABLE_ALL_WARNINGS +TOML_DISABLE_WARNINGS #include #if TOML_INT_CHARCONV || TOML_FLOAT_CHARCONV #include @@ -17,7 +16,7 @@ TOML_DISABLE_ALL_WARNINGS #if !TOML_INT_CHARCONV #include #endif -TOML_POP_WARNINGS +TOML_ENABLE_WARNINGS TOML_IMPL_NAMESPACE_START { diff --git a/include/toml++/toml_table.h b/include/toml++/toml_table.h index 6d7d188..38063f1 100644 --- a/include/toml++/toml_table.h +++ b/include/toml++/toml_table.h @@ -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 > [[nodiscard]] @@ -142,7 +140,7 @@ TOML_IMPL_NAMESPACE_START return table_iterator{ 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 diff --git a/include/toml++/toml_table.hpp b/include/toml++/toml_table.hpp index 2b3add2..b21e2a4 100644 --- a/include/toml++/toml_table.hpp +++ b/include/toml++/toml_table.hpp @@ -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 diff --git a/include/toml++/toml_utf8_streams.h b/include/toml++/toml_utf8_streams.h index e55df38..a5bf43a 100644 --- a/include/toml++/toml_utf8_streams.h +++ b/include/toml++/toml_utf8_streams.h @@ -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 diff --git a/include/toml++/toml_value.h b/include/toml++/toml_value.h index e89d2c9..212f732 100644 --- a/include/toml++/toml_value.h +++ b/include/toml++/toml_value.h @@ -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 diff --git a/include/toml++/toml_version.h b/include/toml++/toml_version.h index d6efb45..b6df3d5 100644 --- a/include/toml++/toml_version.h +++ b/include/toml++/toml_version.h @@ -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 diff --git a/meson.build b/meson.build index 03bd0eb..77cbd94 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project( 'tomlplusplus', 'cpp', - version : '2.0.1', + version : '2.1.0', license : 'MIT', default_options : [ 'cpp_std=c++17', diff --git a/python/generate_conformance_tests.py b/python/generate_conformance_tests.py index 40269d8..4fe4217 100644 --- a/python/generate_conformance_tests.py +++ b/python/generate_conformance_tests.py @@ -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 diff --git a/python/generate_documentation.py b/python/generate_documentation.py index 6181357..a5b000f 100644 --- a/python/generate_documentation.py +++ b/python/generate_documentation.py @@ -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), #
( diff --git a/python/generate_single_header.py b/python/generate_single_header.py index 513a7ae..d92933a 100644 --- a/python/generate_single_header.py +++ b/python/generate_single_header.py @@ -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 diff --git a/tests/conformance_burntsushi_invalid.cpp b/tests/conformance_burntsushi_invalid.cpp index e648fe0..48d6866 100644 --- a/tests/conformance_burntsushi_invalid.cpp +++ b/tests/conformance_burntsushi_invalid.cpp @@ -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") { diff --git a/tests/conformance_burntsushi_valid.cpp b/tests/conformance_burntsushi_valid.cpp index a21ef1d..a9b05f0 100644 --- a/tests/conformance_burntsushi_valid.cpp +++ b/tests/conformance_burntsushi_valid.cpp @@ -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") { diff --git a/tests/conformance_iarna_invalid.cpp b/tests/conformance_iarna_invalid.cpp index d0bd2a2..d8c7bf5 100644 --- a/tests/conformance_iarna_invalid.cpp +++ b/tests/conformance_iarna_invalid.cpp @@ -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") { diff --git a/tests/conformance_iarna_valid.cpp b/tests/conformance_iarna_valid.cpp index 8536622..18cb586 100644 --- a/tests/conformance_iarna_valid.cpp +++ b/tests/conformance_iarna_valid.cpp @@ -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") { diff --git a/tests/manipulating_values.cpp b/tests/manipulating_values.cpp index ef7d9f8..c69ace8 100644 --- a/tests/manipulating_values.cpp +++ b/tests/manipulating_values.cpp @@ -6,10 +6,9 @@ #include "tests.h" #ifdef _WIN32 -TOML_PUSH_WARNINGS -TOML_DISABLE_ALL_WARNINGS +TOML_DISABLE_WARNINGS #include -TOML_POP_WARNINGS +TOML_ENABLE_WARNINGS #endif template diff --git a/tests/tests.h b/tests/tests.h index 76103c5..4c4885c 100644 --- a/tests/tests.h +++ b/tests/tests.h @@ -26,14 +26,13 @@ TOML_DISABLE_ARITHMETIC_WARNINGS -TOML_PUSH_WARNINGS -TOML_DISABLE_ALL_WARNINGS +TOML_DISABLE_WARNINGS #include "catch2.h" #include 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" diff --git a/tests/windows_compat.cpp b/tests/windows_compat.cpp index 78535e4..8d6024b 100644 --- a/tests/windows_compat.cpp +++ b/tests/windows_compat.cpp @@ -7,10 +7,9 @@ #if TOML_WINDOWS_COMPAT -TOML_PUSH_WARNINGS -TOML_DISABLE_ALL_WARNINGS +TOML_DISABLE_WARNINGS #include -TOML_POP_WARNINGS +TOML_ENABLE_WARNINGS TEST_CASE("windows compat") { diff --git a/toml.hpp b/toml.hpp index a34eb8a..240ad5e 100644 --- a/toml.hpp +++ b/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 #include #include @@ -605,7 +627,7 @@ TOML_DISABLE_ALL_WARNINGS #if TOML_HAS_INCLUDE() #include #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::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 #if TOML_INT_CHARCONV || TOML_FLOAT_CHARCONV #include @@ -1644,7 +1662,7 @@ TOML_DISABLE_ALL_WARNINGS #if !TOML_INT_CHARCONV #include #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 > [[nodiscard]] @@ -3442,7 +3457,7 @@ TOML_IMPL_NAMESPACE_START return array_iterator{ raw_ }; } - TOML_POP_WARNINGS + TOML_ENABLE_WARNINGS }; template @@ -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 > [[nodiscard]] @@ -3986,7 +3999,7 @@ TOML_IMPL_NAMESPACE_START return table_iterator{ 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 #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 -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 // 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 #if TOML_INT_CHARCONV || TOML_FLOAT_CHARCONV #include @@ -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 #include #include -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