cleaned up some compiler warning management spam

also:
- removed `std::endl` from example code in documentation
- trimmed some fat from the toml.hpp generator
This commit is contained in:
Mark Gillard 2020-08-11 16:34:03 +03:00
parent 2ac735054a
commit 40d87de5b5
31 changed files with 350 additions and 486 deletions

View File

@ -67,17 +67,17 @@ for (auto&& [k, v] : config)
{
v.visit([](auto& node) noexcept
{
std::cout << node << std::endl;
std::cout << node << "\n";
if constexpr (toml::is_string<decltype(node)>)
do_something_with_string_values(node);
});
}
// re-serialize as TOML
std::cout << config << std::endl;
std::cout << config << "\n";
// re-serialize as JSON
std::cout << toml::json_formatter{ config } << std::endl;
std::cout << toml::json_formatter{ config } << "\n";
```

View File

@ -329,7 +329,6 @@ PREDEFINED = \
"TOML_DISABLE_SPAM_WARNINGS=" \
"TOML_DISABLE_ARITHMETIC_WARNINGS=" \
"TOML_DISABLE_SHADOW_WARNINGS=" \
"TOML_DISABLE_SUGGEST_WARNINGS=" \
"TOML_DISABLE_WARNINGS=" \
"TOML_ENABLE_WARNINGS=" \
"TOML_POP_WARNINGS=" \

View File

@ -43,11 +43,11 @@
/// try
/// {
/// tbl = toml::parse_file(argv[1]);
/// std::cout << tbl << std::endl;
/// std::cout << tbl << "\n";
/// }
/// catch (const toml::parse_error& err)
/// {
/// std::cerr << "Parsing failed:\n" << err << std::endl;
/// std::cerr << "Parsing failed:\n" << err << "\n";
/// return 1;
/// }
///
@ -436,19 +436,33 @@
///
//////////////////////////////////
///
/// \subsection mainpage-adding-lib-conan Conan
/// Add `tomlplusplus/2.1.0` to your conanfile. This adds the single-header version by default, but you can specify the
/// regular version using `"multiple_headers": True`.
///
//////////////////////////////////
///
/// \subsection mainpage-adding-lib-dds DDS
/// Add `tomlpp` to your `package.json5`, e.g.:
/// \bash
/// depends: [
/// 'tomlpp^2.1.0',
/// ]
/// \ebash
///
/// \see [What is DDS?](https://dds.pizza/)
///
//////////////////////////////////
///
/// \subsection mainpage-adding-lib-meson Meson
/// The library supports being added as a subproject in the meson build system.
///
//////////////////////////////////
///
/// \subsection mainpage-adding-lib-conan Conan
/// Add `tomlplusplus/2.0.0` to your conanfile. This adds the single-header version by default, but you can specify the
/// regular version using `"multiple_headers": True`.
///
//////////////////////////////////
///
/// \subsection mainpage-adding-lib-vcpkg Vcpkg
/// <em>\gh2{microsoft/vcpkg/pull/10786, coming soon...}</em>
/// \bash
/// vcpkg install tomlplusplus
/// \ebash
///
//////////////////////////////////
///

View File

@ -26,11 +26,11 @@ int main(int argc, char** argv)
try
{
const auto tbl = toml::parse_file(path);
std::cout << tbl << std::endl;
std::cout << tbl << "\n";
}
catch (const toml::parse_error& err)
{
std::cerr << err << std::endl;
std::cerr << err << "\n";
return 1;
}
return 0;

View File

@ -203,6 +203,6 @@ int main(int argc, char** argv)
}
}
std::cout << root << std::endl;
std::cout << root << "\n";
return 0;
}

View File

@ -28,11 +28,11 @@ int main(int argc, char** argv)
try
{
const auto table = toml::parse_file(argv[1]);
std::cout << toml::json_formatter{ table } << std::endl;
std::cout << toml::json_formatter{ table } << "\n";
}
catch (const toml::parse_error& err)
{
std::cerr << err << std::endl;
std::cerr << err << "\n";
return 1;
}
}
@ -43,11 +43,11 @@ int main(int argc, char** argv)
try
{
const auto table = toml::parse(std::cin, "stdin"sv);
std::cout << toml::json_formatter{ table } << std::endl;
std::cout << toml::json_formatter{ table } << "\n";
}
catch (const toml::parse_error& err)
{
std::cerr << err << std::endl;
std::cerr << err << "\n";
return 1;
}
}

View File

@ -11,6 +11,10 @@
//# is used as the source for generate_single_header.py.
#include "toml_preprocessor.h"
TOML_PUSH_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
#include "toml_common.h"
#include "toml_date_time.h"
#include "toml_print_to_stream.h"
@ -46,6 +50,8 @@
#endif // TOML_IMPLEMENTATION
TOML_POP_WARNINGS // TOML_DISABLE_SPAM_WARNINGS
// macro hygiene
#if TOML_UNDEF_MACROS
#undef TOML_ABI_NAMESPACES

View File

@ -6,9 +6,6 @@
#pragma once
#include "toml_value.h"
TOML_PUSH_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
TOML_IMPL_NAMESPACE_START
{
template <bool IsConst>
@ -1036,5 +1033,3 @@ TOML_NAMESPACE_START
};
}
TOML_NAMESPACE_END
TOML_POP_WARNINGS //TOML_DISABLE_SPAM_WARNINGS

View File

@ -13,10 +13,6 @@
#include "toml_array.h"
TOML_PUSH_WARNINGS
TOML_DISABLE_SUGGEST_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
TOML_NAMESPACE_START
{
TOML_EXTERNAL_LINKAGE
@ -323,6 +319,3 @@ TOML_NAMESPACE_START
}
}
TOML_NAMESPACE_END
TOML_POP_WARNINGS // TOML_DISABLE_SUGGEST_WARNINGS, TOML_DISABLE_SPAM_WARNINGS

View File

@ -6,9 +6,6 @@
#pragma once
#include "toml_preprocessor.h"
TOML_PUSH_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
//#====================================================================================================================
//# INCLUDES
//#====================================================================================================================
@ -274,8 +271,8 @@ TOML_NAMESPACE_START // abi namespace
/// // desired result: [ [ 42 ] ]
/// auto bad = toml::array{ toml::array{ 42 } }
/// auto good = toml::array{ toml::inserter{ toml::array{ 42 } } }
/// std::cout << "bad: " << bad << std::endl;
/// std::cout << "good:" << good << std::endl;
/// std::cout << "bad: " << bad << "\n";
/// std::cout << "good:" << good << "\n";
/// \ecpp
///
/// \out
@ -733,7 +730,7 @@ TOML_NAMESPACE_START
/// auto table = toml::parse_file("config.toml"sv);
/// std::cout << "The node 'description' was defined at "sv
/// << table.get("description")->source().begin()
/// << std::endl;
/// << "\n";
///
/// \ecpp
///
@ -807,9 +804,9 @@ TOML_NAMESPACE_START
/// auto tbl = toml::parse_file("config.toml"sv);
/// if (auto server = tbl.get("server"))
/// {
/// std::cout << "begin: "sv << server->source().begin << std::endl;
/// std::cout << "end: "sv << server->source().end << std::endl;
/// std::cout << "path: "sv << *server->source().path << std::endl;
/// std::cout << "begin: "sv << server->source().begin << "\n";
/// std::cout << "end: "sv << server->source().end << "\n";
/// std::cout << "path: "sv << *server->source().path << "\n";
/// }
///
/// \ecpp
@ -874,7 +871,7 @@ TOML_NAMESPACE_START
/// \detail \cpp
/// auto arr = toml::array{ 1, 2.0, "3", false };
/// for (size_t i = 0; i < arr.size() i++)
/// std::cout << "Element ["sv << i << "] is: "sv << arr[i].type() << std::endl;
/// std::cout << "Element ["sv << i << "] is: "sv << arr[i].type() << "\n";
///
/// \ecpp
///
@ -906,4 +903,3 @@ TOML_NAMESPACE_START
}
TOML_NAMESPACE_END
TOML_POP_WARNINGS // TOML_DISABLE_SPAM_WARNINGS

View File

@ -6,9 +6,6 @@
#pragma once
#include "toml_common.h"
TOML_PUSH_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
TOML_NAMESPACE_START
{
/// \brief A local date.
@ -82,7 +79,7 @@ TOML_NAMESPACE_START
/// \brief Prints a date out to a stream as `YYYY-MM-DD` (per RFC 3339).
/// \detail \cpp
/// std::cout << toml::date{ 1987, 3, 16 } << std::endl;
/// std::cout << toml::date{ 1987, 3, 16 } << "\n";
/// \ecpp
///
/// \out
@ -173,8 +170,8 @@ TOML_NAMESPACE_START
/// \brief Prints a time out to a stream as `HH:MM:SS.FFFFFF` (per RFC 3339).
/// \detail \cpp
/// std::cout << toml::time{ 10, 20, 34 } << std::endl;
/// std::cout << toml::time{ 10, 20, 34, 500000000 } << std::endl;
/// std::cout << toml::time{ 10, 20, 34 } << "\n";
/// std::cout << toml::time{ 10, 20, 34, 500000000 } << "\n";
/// \ecpp
///
/// \out
@ -207,10 +204,10 @@ TOML_NAMESPACE_START
/// \brief Constructs a timezone offset from separate hour and minute totals.
///
/// \detail \cpp
/// std::cout << toml::time_offset{ 2, 30 } << std::endl;
/// std::cout << toml::time_offset{ -2, 30 } << std::endl;
/// std::cout << toml::time_offset{ -2, -30 } << std::endl;
/// std::cout << toml::time_offset{ 0, 0 } << std::endl;
/// std::cout << toml::time_offset{ 2, 30 } << "\n";
/// std::cout << toml::time_offset{ -2, 30 } << "\n";
/// std::cout << toml::time_offset{ -2, -30 } << "\n";
/// std::cout << toml::time_offset{ 0, 0 } << "\n";
///
/// \ecpp
///
@ -273,11 +270,11 @@ TOML_NAMESPACE_START
/// \brief Prints a time_offset out to a stream as `+-HH:MM or Z` (per RFC 3339).
/// \detail \cpp
/// std::cout << toml::time_offset{ 2, 30 } << std::endl;
/// std::cout << toml::time_offset{ 2, -30 } << std::endl;
/// std::cout << toml::time_offset{} << std::endl;
/// std::cout << toml::time_offset{ -2, 30 } << std::endl;
/// std::cout << toml::time_offset{ -2, -30 } << std::endl;
/// std::cout << toml::time_offset{ 2, 30 } << "\n";
/// std::cout << toml::time_offset{ 2, -30 } << "\n";
/// std::cout << toml::time_offset{} << "\n";
/// std::cout << toml::time_offset{ -2, 30 } << "\n";
/// std::cout << toml::time_offset{ -2, -30 } << "\n";
/// \ecpp
///
/// \out
@ -405,9 +402,9 @@ TOML_NAMESPACE_START
/// \brief Prints a date_time out to a stream in RFC 3339 format.
/// \detail \cpp
/// std::cout << toml::date_time{ { 1987, 3, 16 }, { 10, 20, 34 } } << std::endl;
/// std::cout << toml::date_time{ { 1987, 3, 16 }, { 10, 20, 34 }, { -2, -30 } } << std::endl;
/// std::cout << toml::date_time{ { 1987, 3, 16 }, { 10, 20, 34 }, {} } << std::endl;
/// std::cout << toml::date_time{ { 1987, 3, 16 }, { 10, 20, 34 } } << "\n";
/// std::cout << toml::date_time{ { 1987, 3, 16 }, { 10, 20, 34 }, { -2, -30 } } << "\n";
/// std::cout << toml::date_time{ { 1987, 3, 16 }, { 10, 20, 34 }, {} } << "\n";
/// \ecpp
///
/// \out
@ -427,5 +424,3 @@ TOML_NAMESPACE_START
#endif
}
TOML_NAMESPACE_END
TOML_POP_WARNINGS // TOML_DISABLE_SPAM_WARNINGS

View File

@ -11,7 +11,6 @@
TOML_PUSH_WARNINGS
TOML_DISABLE_SWITCH_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
TOML_IMPL_NAMESPACE_START
{
@ -37,8 +36,8 @@ TOML_NAMESPACE_START
/// }};
///
/// // these two lines are equivalent:
/// std::cout << toml::default_formatter{ tbl } << std::endl;
/// std::cout << tbl << std::endl;
/// std::cout << toml::default_formatter{ tbl } << "\n";
/// std::cout << tbl << "\n";
///
/// \ecpp
///
@ -401,5 +400,5 @@ TOML_NAMESPACE_START
}
TOML_NAMESPACE_END
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_SPAM_WARNINGS
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS

View File

@ -19,7 +19,6 @@ TOML_ENABLE_WARNINGS
TOML_PUSH_WARNINGS
TOML_DISABLE_SWITCH_WARNINGS
TOML_DISABLE_ARITHMETIC_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
TOML_IMPL_NAMESPACE_START
{
@ -268,4 +267,4 @@ TOML_IMPL_NAMESPACE_END
#endif // TOML_WINDOWS_COMPAT
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_ARITHMETIC_WARNINGS, TOML_DISABLE_SPAM_WARNINGS
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_ARITHMETIC_WARNINGS

View File

@ -8,7 +8,6 @@
TOML_PUSH_WARNINGS
TOML_DISABLE_SWITCH_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
TOML_NAMESPACE_START
{
@ -251,4 +250,4 @@ TOML_IMPL_NAMESPACE_START
}
TOML_IMPL_NAMESPACE_END
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_SPAM_WARNINGS
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS

View File

@ -8,7 +8,6 @@
TOML_PUSH_WARNINGS
TOML_DISABLE_SWITCH_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
TOML_NAMESPACE_START
{
@ -23,7 +22,7 @@ TOML_NAMESPACE_START
/// [fruit.apple.texture]
/// smooth = true
/// )"sv);
/// std::cout << toml::json_formatter{ some_toml } << std::endl;
/// std::cout << toml::json_formatter{ some_toml } << "\n";
///
/// \ecpp
///
@ -157,4 +156,4 @@ TOML_NAMESPACE_START
}
TOML_NAMESPACE_END
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_SPAM_WARNINGS
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS

View File

@ -6,9 +6,6 @@
#pragma once
#include "toml_common.h"
TOML_PUSH_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
#if defined(DOXYGEN) || TOML_SIMPLE_STATIC_ASSERT_MESSAGES
#define TOML_SA_NEWLINE " "
@ -329,6 +326,8 @@ TOML_NAMESPACE_START
/// type can be any type where a reasonable conversion from a native TOML value exists
/// (e.g. std::wstring on Windows). If the source value cannot be represented by
/// the destination type, an empty optional is returned.
///
/// \godbolt{zzG81K}
///
/// \cpp
/// auto tbl = toml::parse(R"(
@ -341,103 +340,100 @@ TOML_NAMESPACE_START
/// )"sv);
///
/// const auto print_value_with_typename =
/// [&](std::string_view key, std::string_view type_name, auto* dummy)
/// {
/// std::cout << "'" << key << "' as " << type_name << ": ";
/// using type = std::remove_pointer_t<decltype(dummy)>;
/// if (std::optional<type> val = tbl.get(key)->value<type>())
/// std::cout << *val << "\n";
/// else
/// std::cout << "No conversion path or out-of-range\n";
/// };
/// [&](std::string_view key, std::string_view type_name, auto* dummy)
/// {
/// std::cout << "- " << std::setw(18) << std::left << type_name;
/// using type = std::remove_pointer_t<decltype(dummy)>;
/// if (std::optional<type> val = tbl.get(key)->value<type>())
/// std::cout << *val << "\n";
/// else
/// std::cout << "n/a\n";
/// };
///
/// #define print_value(key, T) print_value_with_typename(key, #T, (T*)nullptr)
/// #define print_value(key, T) print_value_with_typename(key, #T, (T*)nullptr)
///
/// print_value("int", bool);
/// print_value("int", int);
/// print_value("int", unsigned int);
/// print_value("int", long long);
/// print_value("int", float);
/// print_value("int", double);
/// std::cout << "\n";
///
/// print_value("flt", bool);
/// print_value("flt", int);
/// print_value("flt", unsigned int);
/// print_value("flt", long long);
/// print_value("flt", float);
/// print_value("flt", double);
/// std::cout << "\n";
///
/// print_value("pi", bool);
/// print_value("pi", int);
/// print_value("pi", unsigned int);
/// print_value("pi", long long);
/// print_value("pi", float);
/// print_value("pi", double);
/// std::cout << "\n";
///
/// print_value("bool", bool);
/// print_value("bool", int);
/// print_value("bool", unsigned int);
/// print_value("bool", long long);
/// print_value("bool", float);
/// print_value("bool", double);
/// std::cout << "\n";
///
/// print_value("huge", bool);
/// print_value("huge", int);
/// print_value("huge", unsigned int);
/// print_value("huge", long long);
/// print_value("huge", float);
/// print_value("huge", double);
/// std::cout << "\n";
///
/// print_value("str", std::string);
/// print_value("str", std::string_view);
/// print_value("str", const char*);
/// std::cout << "\n";
/// for (auto key : { "int", "flt", "pi", "bool", "huge", "str" })
/// {
/// std::cout << tbl[key].type() << " value '" << key << "' as:\n";
/// print_value(key, bool);
/// print_value(key, int);
/// print_value(key, unsigned int);
/// print_value(key, long long);
/// print_value(key, float);
/// print_value(key, double);
/// print_value(key, std::string);
/// print_value(key, std::string_view);
/// print_value(key, const char*);
/// std::cout << "\n";
/// }
/// \ecpp
///
/// \out
/// 'int' as bool: true
/// 'int' as int: -10
/// 'int' as unsigned int: No conversion path or out-of-range
/// 'int' as long long: -10
/// 'int' as float: -10
/// 'int' as double: -10
/// integer value 'int' as:
/// - bool true
/// - int -10
/// - unsigned int n/a
/// - long long -10
/// - float -10
/// - double -10
/// - std::string n/a
/// - std::string_view n/a
/// - const char* n/a
///
/// 'flt' as bool: No conversion path or out-of-range
/// 'flt' as int: 25
/// 'flt' as unsigned int: 25
/// 'flt' as long long: 25
/// 'flt' as float: 25
/// 'flt' as double: 25
/// floating-point value 'flt' as:
/// - bool n/a
/// - int 25
/// - unsigned int 25
/// - long long 25
/// - float 25
/// - double 25
/// - std::string n/a
/// - std::string_view n/a
/// - const char* n/a
///
/// 'pi' as bool: No conversion path or out-of-range
/// 'pi' as int: No conversion path or out-of-range
/// 'pi' as unsigned int: No conversion path or out-of-range
/// 'pi' as long long: No conversion path or out-of-range
/// 'pi' as float: 3.14159
/// 'pi' as double: 3.14159
/// floating-point value 'pi' as:
/// - bool n/a
/// - int n/a
/// - unsigned int n/a
/// - long long n/a
/// - float 3.14159
/// - double 3.14159
/// - std::string n/a
/// - std::string_view n/a
/// - const char* n/a
///
/// 'bool' as bool: false
/// 'bool' as int: 0
/// 'bool' as unsigned int: 0
/// 'bool' as long long: 0
/// 'bool' as float: No conversion path or out-of-range
/// 'bool' as double: No conversion path or out-of-range
/// boolean value 'bool' as:
/// - bool false
/// - int 0
/// - unsigned int 0
/// - long long 0
/// - float n/a
/// - double n/a
/// - std::string n/a
/// - std::string_view n/a
/// - const char* n/a
///
/// 'huge' as bool: true
/// 'huge' as int: No conversion path or out-of-range
/// 'huge' as unsigned int: No conversion path or out-of-range
/// 'huge' as long long: 9223372036854775807
/// 'huge' as float: No conversion path or out-of-range
/// 'huge' as double: No conversion path or out-of-range
/// integer value 'huge' as:
/// - bool true
/// - int n/a
/// - unsigned int n/a
/// - long long 9223372036854775807
/// - float n/a
/// - double n/a
/// - std::string n/a
/// - std::string_view n/a
/// - const char* n/a
///
/// 'str' as std::string: foo
/// 'str' as std::string_view: foo
/// 'str' as const char*: foo
/// string value 'str' as:
/// - bool n/a
/// - int n/a
/// - unsigned int n/a
/// - long long n/a
/// - float n/a
/// - double n/a
/// - std::string foo
/// - std::string_view foo
/// - const char* foo
/// \eout
///
/// \tparam T One of the native TOML value types, or a type capable of converting to one.
@ -489,14 +485,14 @@ TOML_NAMESPACE_START
/// toml::value<int64_t>* int_value = node->as<int64_t>();
/// toml::table* tbl = node->as<toml::table>();
/// if (int_value)
/// std::cout << "Node is a value<int64_t>" << std::endl;
/// std::cout << "Node is a value<int64_t>\n";
/// else if (tbl)
/// std::cout << "Node is a table" << std::endl;
/// std::cout << "Node is a table\n";
///
/// // fully-qualified value node types also work (useful for template code):
/// toml::value<int64_t>* int_value2 = node->as<toml::value<int64_t>>();
/// if (int_value2)
/// std::cout << "Node is a value<int64_t>" << std::endl;
/// std::cout << "Node is a value<int64_t>\n";
///
/// \ecpp
///
@ -827,6 +823,3 @@ TOML_NAMESPACE_START
};
}
TOML_NAMESPACE_END
TOML_POP_WARNINGS // TOML_DISABLE_SPAM_WARNINGS

View File

@ -13,9 +13,6 @@
#include "toml_node.h"
TOML_PUSH_WARNINGS
TOML_DISABLE_SUGGEST_WARNINGS
TOML_NAMESPACE_START
{
TOML_EXTERNAL_LINKAGE
@ -101,5 +98,3 @@ TOML_NAMESPACE_START
}
}
TOML_NAMESPACE_END
TOML_POP_WARNINGS // TOML_DISABLE_SUGGEST_WARNINGS

View File

@ -36,15 +36,15 @@ TOML_NAMESPACE_START
///
/// )"sv);
///
/// std::cout << tbl["title"] << std::endl;
/// std::cout << tbl["products"][0]["name"] << std::endl;
/// std::cout << tbl["products"][0]["keywords"] << std::endl;
/// std::cout << tbl["products"][0]["keywords"][2] << std::endl;
/// std::cout << tbl["title"] << "\n";
/// std::cout << tbl["products"][0]["name"] << "\n";
/// std::cout << tbl["products"][0]["keywords"] << "\n";
/// std::cout << tbl["products"][0]["keywords"][2] << "\n";
///
/// tbl["products"][0]["keywords"].as_array()->push_back("heavy");
/// std::cout << tbl["products"][0]["keywords"] << std::endl;
/// std::cout << "has product[2]: "sv << !!tbl["products"][2] << std::endl;
/// std::cout << "product[2]: "sv << tbl["products"][2] << std::endl;
/// std::cout << tbl["products"][0]["keywords"] << "\n";
/// std::cout << "has product[2]: "sv << !!tbl["products"][2] << "\n";
/// std::cout << "product[2]: "sv << tbl["products"][2] << "\n";
/// \ecpp
///
/// \out

View File

@ -18,7 +18,6 @@ TOML_ENABLE_WARNINGS
TOML_PUSH_WARNINGS
TOML_DISABLE_INIT_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
TOML_NAMESPACE_START
{
@ -126,7 +125,7 @@ TOML_NAMESPACE_START
/// }
/// catch (const toml::parse_error & err)
/// {
/// std::cerr << "Parsing failed:\n"sv << err << std::endl;
/// std::cerr << "Parsing failed:\n"sv << err << "\n";
/// }
/// \ecpp
///
@ -157,4 +156,4 @@ TOML_NAMESPACE_START
}
TOML_NAMESPACE_END
TOML_POP_WARNINGS
TOML_POP_WARNINGS // TOML_DISABLE_INIT_WARNINGS

View File

@ -13,9 +13,6 @@
#include "toml_table.h"
#include "toml_utf8_streams.h"
TOML_PUSH_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
TOML_NAMESPACE_START
{
TOML_ABI_NAMESPACE_BOOL(TOML_EXCEPTIONS, ex, noex)
@ -32,7 +29,7 @@ TOML_NAMESPACE_START
/// if (result)
/// do_stuff_with_a_table(result); //implicitly converts to table&
/// else
/// std::cerr << "Parse failed:\n"sv << result.error() << std::endl;
/// std::cerr << "Parse failed:\n"sv << result.error() << "\n";
///
/// \ecpp
///
@ -360,7 +357,7 @@ TOML_NAMESPACE_START
///
/// \detail \cpp
/// auto tbl = toml::parse("a = 3"sv);
/// std::cout << tbl["a"] << std::endl;
/// std::cout << tbl["a"] << "\n";
///
/// \ecpp
///
@ -383,7 +380,7 @@ TOML_NAMESPACE_START
///
/// \detail \cpp
/// auto tbl = toml::parse("a = 3"sv, "foo.toml");
/// std::cout << tbl["a"] << std::endl;
/// std::cout << tbl["a"] << "\n";
///
/// \ecpp
///
@ -408,7 +405,7 @@ TOML_NAMESPACE_START
///
/// \detail \cpp
/// auto tbl = toml::parse("a = 3"sv, L"foo.toml");
/// std::cout << tbl["a"] << std::endl;
/// std::cout << tbl["a"] << "\n";
///
/// \ecpp
///
@ -437,7 +434,7 @@ TOML_NAMESPACE_START
///
/// \detail \cpp
/// auto tbl = toml::parse(u8"a = 3"sv);
/// std::cout << tbl["a"] << std::endl;
/// std::cout << tbl["a"] << "\n";
///
/// \ecpp
///
@ -460,7 +457,7 @@ TOML_NAMESPACE_START
///
/// \detail \cpp
/// auto tbl = toml::parse(u8"a = 3"sv, "foo.toml");
/// std::cout << tbl["a"] << std::endl;
/// std::cout << tbl["a"] << "\n";
///
/// \ecpp
///
@ -485,7 +482,7 @@ TOML_NAMESPACE_START
///
/// \detail \cpp
/// auto tbl = toml::parse(u8"a = 3"sv, L"foo.toml");
/// std::cout << tbl["a"] << std::endl;
/// std::cout << tbl["a"] << "\n";
///
/// \ecpp
///
@ -517,7 +514,7 @@ TOML_NAMESPACE_START
/// ss << "a = 3"sv;
///
/// auto tbl = toml::parse(ss);
/// std::cout << tbl["a"] << std::endl;
/// std::cout << tbl["a"] << "\n";
///
/// \ecpp
///
@ -552,7 +549,7 @@ TOML_NAMESPACE_START
/// ss << "a = 3"sv;
///
/// auto tbl = toml::parse(ss, "foo.toml");
/// std::cout << tbl["a"] << std::endl;
/// std::cout << tbl["a"] << "\n";
///
/// \ecpp
///
@ -589,7 +586,7 @@ TOML_NAMESPACE_START
/// ss << "a = 3"sv;
///
/// auto tbl = toml::parse(ss);
/// std::cout << tbl["a"] << std::endl;
/// std::cout << tbl["a"] << "\n";
///
/// \ecpp
///
@ -737,7 +734,7 @@ TOML_NAMESPACE_START
/// using namespace toml::literals;
///
/// auto tbl = "a = 3"_toml;
/// std::cout << tbl["a"] << std::endl;
/// std::cout << tbl["a"] << "\n";
///
/// \ecpp
///
@ -762,7 +759,7 @@ TOML_NAMESPACE_START
/// using namespace toml::literals;
///
/// auto tbl = u8"a = 3"_toml;
/// std::cout << tbl["a"] << std::endl;
/// std::cout << tbl["a"] << "\n";
///
/// \ecpp
///
@ -788,5 +785,3 @@ TOML_NAMESPACE_START
TOML_NAMESPACE_END
#undef TOML_THROW_PARSE_ERROR
TOML_POP_WARNINGS // TOML_DISABLE_SPAM_WARNINGS

View File

@ -30,7 +30,6 @@ TOML_ENABLE_WARNINGS
TOML_PUSH_WARNINGS
TOML_DISABLE_SWITCH_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
#if TOML_EXCEPTIONS && !defined(__INTELLISENSE__)
#define TOML_RETURNS_BY_THROWING [[noreturn]]
@ -3017,4 +3016,4 @@ TOML_NAMESPACE_START
}
TOML_NAMESPACE_END
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_SPAM_WARNINGS
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS

View File

@ -178,12 +178,12 @@
_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_SPAM_WARNINGS _Pragma("GCC diagnostic ignored \"-Wpadded\"") \
_Pragma("GCC diagnostic ignored \"-Wcast-align\"") \
_Pragma("GCC diagnostic ignored \"-Wcomment\"") \
_Pragma("GCC diagnostic ignored \"-Wtype-limits\"")
_Pragma("GCC diagnostic ignored \"-Wtype-limits\"") \
_Pragma("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") \
_Pragma("GCC diagnostic ignored \"-Wsuggest-attribute=pure\"")
#define TOML_POP_WARNINGS _Pragma("GCC diagnostic pop")
#define TOML_DISABLE_WARNINGS TOML_PUSH_WARNINGS \
_Pragma("GCC diagnostic ignored \"-Wall\"") \
@ -193,7 +193,6 @@
TOML_DISABLE_INIT_WARNINGS \
TOML_DISABLE_ARITHMETIC_WARNINGS \
TOML_DISABLE_SHADOW_WARNINGS \
TOML_DISABLE_SUGGEST_WARNINGS \
TOML_DISABLE_SPAM_WARNINGS
#define TOML_ENABLE_WARNINGS TOML_POP_WARNINGS
@ -373,9 +372,6 @@ is no longer necessary.
#ifndef TOML_DISABLE_SHADOW_WARNINGS
#define TOML_DISABLE_SHADOW_WARNINGS
#endif
#ifndef TOML_DISABLE_SUGGEST_WARNINGS
#define TOML_DISABLE_SUGGEST_WARNINGS
#endif
#ifndef TOML_POP_WARNINGS
#define TOML_POP_WARNINGS
#endif

View File

@ -362,7 +362,7 @@ TOML_NAMESPACE_START
///
/// std::cout << "The value for 'bar' was found on "sv
/// << tbl.get("bar")->source().begin()
/// << std::endl;
/// << "\n";
///
/// \ecpp
///
@ -396,7 +396,7 @@ TOML_NAMESPACE_START
///
/// std::cout << "The value for 'bar' was found on "sv
/// << tbl.get("bar")->source()
/// << std::endl;
/// << "\n";
///
/// \ecpp
///

View File

@ -6,9 +6,6 @@
#pragma once
#include "toml_array.h"
TOML_PUSH_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
TOML_IMPL_NAMESPACE_START
{
template <bool IsConst>
@ -1139,5 +1136,3 @@ TOML_NAMESPACE_START
#endif // !DOXYGEN
}
TOML_NAMESPACE_END
TOML_POP_WARNINGS // TOML_DISABLE_SPAM_WARNINGS

View File

@ -14,10 +14,6 @@
#include "toml_table.h"
#include "toml_node_view.h"
TOML_PUSH_WARNINGS
TOML_DISABLE_SUGGEST_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
TOML_NAMESPACE_START
{
TOML_EXTERNAL_LINKAGE
@ -321,5 +317,3 @@ TOML_NAMESPACE_START
}
TOML_NAMESPACE_END
TOML_POP_WARNINGS // TOML_DISABLE_SUGGEST_WARNINGS, TOML_DISABLE_SPAM_WARNINGS

View File

@ -13,9 +13,6 @@
#include "toml_utf8.h"
#include "toml_parse_error.h"
TOML_PUSH_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
TOML_IMPL_NAMESPACE_START
{
template <typename T>
@ -381,5 +378,3 @@ TOML_IMPL_NAMESPACE_START
TOML_ABI_NAMESPACE_END // TOML_EXCEPTIONS
}
TOML_IMPL_NAMESPACE_END
TOML_POP_WARNINGS // TOML_DISABLE_SPAM_WARNINGS

View File

@ -68,7 +68,6 @@
TOML_PUSH_WARNINGS
TOML_DISABLE_ARITHMETIC_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
TOML_IMPL_NAMESPACE_START
{

View File

@ -102,24 +102,87 @@ external_links = [
(r'const_cast','https://en.cppreference.com/w/cpp/language/const_cast'),
(r'dynamic_cast','https://en.cppreference.com/w/cpp/language/dynamic_cast'),
(r'reinterpret_cast','https://en.cppreference.com/w/cpp/language/reinterpret_cast'),
('std::assume_aligned(?:\(\))?', 'https://en.cppreference.com/w/cpp/memory/assume_aligned'),
(r'(?:std::)?nullptr_t', 'https://en.cppreference.com/w/cpp/types/nullptr_t'),
(r'(?:std::)?size_t', 'https://en.cppreference.com/w/cpp/types/size_t'),
(r'(?:std::)?u?int(_fast|_least)?(?:8|16|32|64)_ts?', 'https://en.cppreference.com/w/cpp/types/integer'),
(r'std::pairs?', 'https://en.cppreference.com/w/cpp/utility/pair'),
(r'std::bytes?', 'https://en.cppreference.com/w/cpp/types/byte'),
(r'std::optionals?', 'https://en.cppreference.com/w/cpp/utility/optional'),
(r'std::tuples?', 'https://en.cppreference.com/w/cpp/utility/tuple'),
(r'std::integral_constants?', 'https://en.cppreference.com/w/cpp/types/integral_constant'),
(r'std::char_traits', 'https://en.cppreference.com/w/cpp/string/char_traits'),
(r'(?:wchar|char(?:8|16|32))_ts?', 'https://en.cppreference.com/w/cpp/language/types#Character_types'),
(r'\s(?:<|&lt;)fstream(?:>|&gt;)', 'https://en.cppreference.com/w/cpp/header/fstream'),
(r'\s(?:<|&lt;)iosfwd(?:>|&gt;)', 'https://en.cppreference.com/w/cpp/header/iosfwd'),
(r'\s(?:<|&lt;)iostream(?:>|&gt;)', 'https://en.cppreference.com/w/cpp/header/iostream'),
(r'\s(?:<|&lt;)sstream(?:>|&gt;)', 'https://en.cppreference.com/w/cpp/header/sstream'),
(r'\s(?:<|&lt;)string(?:>|&gt;)', 'https://en.cppreference.com/w/cpp/header/string'),
(r'\s(?:<|&lt;)string_view(?:>|&gt;)', 'https://en.cppreference.com/w/cpp/header/string_view'),
(r'std::(?:basic_|w)?fstreams?', 'https://en.cppreference.com/w/cpp/io/basic_fstream'),
(r'std::(?:basic_|w)?ifstreams?', 'https://en.cppreference.com/w/cpp/io/basic_ifstream'),
(r'std::(?:basic_|w)?iostreams?', 'https://en.cppreference.com/w/cpp/io/basic_iostream'),
(r'std::(?:basic_|w)?istreams?', 'https://en.cppreference.com/w/cpp/io/basic_istream'),
(r'std::(?:basic_|w)?istringstreams?', 'https://en.cppreference.com/w/cpp/io/basic_istringstream'),
(r'std::(?:basic_|w)?ofstreams?', 'https://en.cppreference.com/w/cpp/io/basic_ofstream'),
(r'std::(?:basic_|w)?ostreams?', 'https://en.cppreference.com/w/cpp/io/basic_ostream'),
(r'std::(?:basic_|w)?ostringstreams?', 'https://en.cppreference.com/w/cpp/io/basic_ostringstream'),
(r'std::(?:basic_|w)?stringstreams?', 'https://en.cppreference.com/w/cpp/io/basic_stringstream'),
(r'std::(?:basic_|w|u(?:8|16|32))?string_views?', 'https://en.cppreference.com/w/cpp/string/basic_string_view'),
(r'std::(?:basic_|w|u(?:8|16|32))?strings?', 'https://en.cppreference.com/w/cpp/string/basic_string'),
(r'std::add_[lr]value_reference(?:_t)?', 'https://en.cppreference.com/w/cpp/types/add_reference'),
(r'std::allocators?', 'https://en.cppreference.com/w/cpp/memory/allocator'),
(r'std::enable_if(?:_t)?', 'https://en.cppreference.com/w/cpp/types/enable_if'),
(r'std::arrays?', 'https://en.cppreference.com/w/cpp/container/array'),
(r'std::as_(writable_)?bytes(?:\(\))?', 'https://en.cppreference.com/w/cpp/container/span/as_bytes'),
(r'std::bit_cast(?:\(\))?', 'https://en.cppreference.com/w/cpp/numeric/bit_cast'),
(r'std::bit_ceil(?:\(\))?', 'https://en.cppreference.com/w/cpp/numeric/bit_ceil'),
(r'std::bit_floor(?:\(\))?', 'https://en.cppreference.com/w/cpp/numeric/bit_floor'),
(r'std::bit_width(?:\(\))?', 'https://en.cppreference.com/w/cpp/numeric/bit_width'),
(r'std::bytes?', 'https://en.cppreference.com/w/cpp/types/byte'),
(r'std::char_traits', 'https://en.cppreference.com/w/cpp/string/char_traits'),
(r'std::chrono::durations?', 'https://en.cppreference.com/w/cpp/chrono/duration'),
(r'std::clamp(?:\(\))?', 'https://en.cppreference.com/w/cpp/algorithm/clamp'),
(r'std::conditional(?:_t)?', 'https://en.cppreference.com/w/cpp/types/conditional'),
(r'std::countl_one(?:\(\))?', 'https://en.cppreference.com/w/cpp/numeric/countl_one'),
(r'std::countl_zero(?:\(\))?', 'https://en.cppreference.com/w/cpp/numeric/countl_zero'),
(r'std::countr_one(?:\(\))?', 'https://en.cppreference.com/w/cpp/numeric/countr_one'),
(r'std::countr_zero(?:\(\))?', 'https://en.cppreference.com/w/cpp/numeric/countr_zero'),
(r'std::enable_if(?:_t)?', 'https://en.cppreference.com/w/cpp/types/enable_if'),
(r'std::exceptions?', 'https://en.cppreference.com/w/cpp/error/exception'),
(r'std::has_single_bit(?:\(\))?', 'https://en.cppreference.com/w/cpp/numeric/has_single_bit'),
(r'std::initializer_lists?', 'https://en.cppreference.com/w/cpp/utility/initializer_list'),
(r'std::integral_constants?', 'https://en.cppreference.com/w/cpp/types/integral_constant'),
(r'std::is_(?:nothrow_)?convertible(?:_v)?', 'https://en.cppreference.com/w/cpp/types/is_convertible'),
(r'std::is_(?:nothrow_)?invocable(?:_r)?', 'https://en.cppreference.com/w/cpp/types/is_invocable'),
(r'std::is_base_of(?:_v)?', 'https://en.cppreference.com/w/cpp/types/is_base_of'),
(r'std::is_constant_evaluated(?:\(\))?', 'https://en.cppreference.com/w/cpp/types/is_constant_evaluated'),
(r'std::is_enum(?:_v)?', 'https://en.cppreference.com/w/cpp/types/is_enum'),
(r'std::is_floating_point(?:_v)?', 'https://en.cppreference.com/w/cpp/types/is_floating_point'),
(r'std::is_integral(?:_v)?', 'https://en.cppreference.com/w/cpp/types/is_integral'),
(r'std::is_pointer(?:_v)?', 'https://en.cppreference.com/w/cpp/types/is_pointer'),
(r'std::is_reference(?:_v)?', 'https://en.cppreference.com/w/cpp/types/is_reference'),
(r'std::is_same(?:_v)?', 'https://en.cppreference.com/w/cpp/types/is_same'),
(r'std::is_signed(?:_v)?', 'https://en.cppreference.com/w/cpp/types/is_signed'),
(r'std::is_unsigned(?:_v)?', 'https://en.cppreference.com/w/cpp/types/is_unsigned'),
(r'std::is_void(?:_v)?', 'https://en.cppreference.com/w/cpp/types/is_void'),
(r'std::launder(?:\(\))?', 'https://en.cppreference.com/w/cpp/utility/launder'),
(r'std::lerp(?:\(\))?', 'https://en.cppreference.com/w/cpp/numeric/lerp'),
(r'std::maps?', 'https://en.cppreference.com/w/cpp/container/map'),
(r'std::max(?:\(\))?', 'https://en.cppreference.com/w/cpp/algorithm/max'),
(r'std::min(?:\(\))?', 'https://en.cppreference.com/w/cpp/algorithm/min'),
(r'std::numeric_limits', 'https://en.cppreference.com/w/cpp/types/numeric_limits'),
(r'std::optionals?', 'https://en.cppreference.com/w/cpp/utility/optional'),
(r'std::pairs?', 'https://en.cppreference.com/w/cpp/utility/pair'),
(r'std::popcount(?:\(\))?', 'https://en.cppreference.com/w/cpp/numeric/popcount'),
(r'std::remove_cv(?:_t)?', 'https://en.cppreference.com/w/cpp/types/remove_cv'),
(r'std::remove_reference(?:_t)?', 'https://en.cppreference.com/w/cpp/types/remove_reference'),
(r'std::reverse_iterator', 'https://en.cppreference.com/w/cpp/iterator/reverse_iterator'),
(r'std::runtime_errors?', 'https://en.cppreference.com/w/cpp/error/runtime_error'),
(r'std::sets?', 'https://en.cppreference.com/w/cpp/container/set'),
(r'std::shared_ptrs?', 'https://en.cppreference.com/w/cpp/memory/shared_ptr'),
(r'std::spans?', 'https://en.cppreference.com/w/cpp/container/span'),
(r'std::to_address(?:\(\))?', 'https://en.cppreference.com/w/cpp/memory/to_address'),
(r'std::tuples?', 'https://en.cppreference.com/w/cpp/utility/tuple'),
(r'std::type_identity(?:_t)?', 'https://en.cppreference.com/w/cpp/types/type_identity'),
(r'std::underlying_type(?:_t)?', 'https://en.cppreference.com/w/cpp/types/underlying_type'),
(r'std::unique_ptrs?', 'https://en.cppreference.com/w/cpp/memory/unique_ptr'),
(r'std::unordered_maps?', 'https://en.cppreference.com/w/cpp/container/unordered_map'),
(r'std::unordered_sets?', 'https://en.cppreference.com/w/cpp/container/unordered_set'),
(r'std::maps?', 'https://en.cppreference.com/w/cpp/container/map'),
(r'std::sets?', 'https://en.cppreference.com/w/cpp/container/set'),
(r'std::vectors?', 'https://en.cppreference.com/w/cpp/container/vector'),
(r'std::arrays?', 'https://en.cppreference.com/w/cpp/container/array'),
(r'std::chrono::durations?', 'https://en.cppreference.com/w/cpp/chrono/duration'),
(
r'std::atomic(?:_(?:'
+ r'bool|[su]?char(?:8_t|16_t|32_t)?|u?short'
@ -127,63 +190,6 @@ external_links = [
+ r'))?',
'https://en.cppreference.com/w/cpp/atomic/atomic'
),
(r'std::unique_ptrs?', 'https://en.cppreference.com/w/cpp/memory/unique_ptr'),
(r'std::shared_ptrs?', 'https://en.cppreference.com/w/cpp/memory/shared_ptr'),
(r'(?:std::)?nullptr_t', 'https://en.cppreference.com/w/cpp/types/nullptr_t'),
(r'std::reverse_iterator', 'https://en.cppreference.com/w/cpp/iterator/reverse_iterator'),
(r'std::(?:basic_|w)?istreams?', 'https://en.cppreference.com/w/cpp/io/basic_istream'),
(r'std::(?:basic_|w)?ostreams?', 'https://en.cppreference.com/w/cpp/io/basic_ostream'),
(r'std::(?:basic_|w)?iostreams?', 'https://en.cppreference.com/w/cpp/io/basic_iostream'),
(r'std::(?:basic_|w)?ifstreams?', 'https://en.cppreference.com/w/cpp/io/basic_ifstream'),
(r'std::(?:basic_|w)?ofstreams?', 'https://en.cppreference.com/w/cpp/io/basic_ofstream'),
(r'std::(?:basic_|w)?fstreams?', 'https://en.cppreference.com/w/cpp/io/basic_fstream'),
(r'std::(?:basic_|w)?istringstreams?', 'https://en.cppreference.com/w/cpp/io/basic_istringstream'),
(r'std::(?:basic_|w)?ostringstreams?', 'https://en.cppreference.com/w/cpp/io/basic_ostringstream'),
(r'std::(?:basic_|w)?stringstreams?', 'https://en.cppreference.com/w/cpp/io/basic_stringstream'),
(r'std::(?:basic_|w|u(?:8|16|32))?string_views?', 'https://en.cppreference.com/w/cpp/string/basic_string_view'),
(r'std::(?:basic_|w|u(?:8|16|32))?strings?', 'https://en.cppreference.com/w/cpp/string/basic_string'),
(r'\s(?:<|&lt;)fstream(?:>|&gt;)', 'https://en.cppreference.com/w/cpp/header/fstream'),
(r'\s(?:<|&lt;)sstream(?:>|&gt;)', 'https://en.cppreference.com/w/cpp/header/sstream'),
(r'\s(?:<|&lt;)iostream(?:>|&gt;)', 'https://en.cppreference.com/w/cpp/header/iostream'),
(r'\s(?:<|&lt;)iosfwd(?:>|&gt;)', 'https://en.cppreference.com/w/cpp/header/iosfwd'),
(r'\s(?:<|&lt;)string(?:>|&gt;)', 'https://en.cppreference.com/w/cpp/header/string'),
(r'\s(?:<|&lt;)string_view(?:>|&gt;)', 'https://en.cppreference.com/w/cpp/header/string_view'),
(r'(?:wchar|char(?:8|16|32))_ts?', 'https://en.cppreference.com/w/cpp/language/types#Character_types'),
(r'std::is_(?:nothrow_)?convertible(?:_v)?', 'https://en.cppreference.com/w/cpp/types/is_convertible'),
(r'std::is_same(?:_v)?', 'https://en.cppreference.com/w/cpp/types/is_same'),
(r'std::is_base_of(?:_v)?', 'https://en.cppreference.com/w/cpp/types/is_base_of'),
(r'std::is_enum(?:_v)?', 'https://en.cppreference.com/w/cpp/types/is_enum'),
(r'std::is_floating_point(?:_v)?', 'https://en.cppreference.com/w/cpp/types/is_floating_point'),
(r'std::is_integral(?:_v)?', 'https://en.cppreference.com/w/cpp/types/is_integral'),
(r'std::is_pointer(?:_v)?', 'https://en.cppreference.com/w/cpp/types/is_pointer'),
(r'std::is_reference(?:_v)?', 'https://en.cppreference.com/w/cpp/types/is_reference'),
(r'std::is_signed(?:_v)?', 'https://en.cppreference.com/w/cpp/types/is_signed'),
(r'std::is_unsigned(?:_v)?', 'https://en.cppreference.com/w/cpp/types/is_unsigned'),
(r'std::is_void(?:_v)?', 'https://en.cppreference.com/w/cpp/types/is_void'),
(r'std::is_(?:nothrow_)?invocable(?:_r)?', 'https://en.cppreference.com/w/cpp/types/is_invocable'),
(r'std::add_[lr]value_reference(?:_t)?', 'https://en.cppreference.com/w/cpp/types/add_reference'),
(r'std::remove_reference(?:_t)?', 'https://en.cppreference.com/w/cpp/types/remove_reference'),
(r'std::remove_cv(?:_t)?', 'https://en.cppreference.com/w/cpp/types/remove_cv'),
(r'std::underlying_type(?:_t)?', 'https://en.cppreference.com/w/cpp/types/underlying_type'),
(r'std::exceptions?', 'https://en.cppreference.com/w/cpp/error/exception'),
(r'std::runtime_errors?', 'https://en.cppreference.com/w/cpp/error/runtime_error'),
(r'std::is_constant_evaluated', 'https://en.cppreference.com/w/cpp/types/is_constant_evaluated'),
(r'std::launder', 'https://en.cppreference.com/w/cpp/utility/launder'),
(r'std::bit_width', 'https://en.cppreference.com/w/cpp/numeric/bit_width'),
(r'std::bit_ceil', 'https://en.cppreference.com/w/cpp/numeric/bit_ceil'),
(r'std::bit_floor', 'https://en.cppreference.com/w/cpp/numeric/bit_floor'),
(r'std::bit_cast', 'https://en.cppreference.com/w/cpp/numeric/bit_cast'),
(r'std::countl_zero', 'https://en.cppreference.com/w/cpp/numeric/countl_zero'),
(r'std::countr_zero', 'https://en.cppreference.com/w/cpp/numeric/countr_zero'),
(r'std::countl_one', 'https://en.cppreference.com/w/cpp/numeric/countl_one'),
(r'std::countr_one', 'https://en.cppreference.com/w/cpp/numeric/countr_one'),
(r'std::popcount', 'https://en.cppreference.com/w/cpp/numeric/popcount'),
(r'std::has_single_bit', 'https://en.cppreference.com/w/cpp/numeric/has_single_bit'),
(r'std::min', 'https://en.cppreference.com/w/cpp/algorithm/min'),
(r'std::max', 'https://en.cppreference.com/w/cpp/algorithm/max'),
(r'std::clamp', 'https://en.cppreference.com/w/cpp/algorithm/clamp'),
(r'std::numeric_limits', 'https://en.cppreference.com/w/cpp/types/numeric_limits'),
(r'std::initializer_lists?', 'https://en.cppreference.com/w/cpp/utility/initializer_list'),
(
r'(?:L?P)?(?:'
+ r'D?WORD(?:32|64|_PTR)?|HANDLE|HMODULE|BOOL(?:EAN)?'

View File

@ -32,10 +32,12 @@ class Preprocessor:
if (self.__current_level == 1):
header_text = '' + raw_incl
lpad = 28 + ((25 * (self.__header_indent % 4)) - int((len(header_text) + 4) / 2))
lpad = 20 + ((25 * (self.__header_indent % 4)) - int((len(header_text) + 4) / 2))
self.__header_indent += 1
text = '{}\n#if 1\n\n{}\n\n#endif\n{}\n'.format(
utils.make_divider(header_text, lpad), text, utils.make_divider('' + raw_incl, lpad)
text = '#if 1 {}\n{}\n\n#endif {}\n'.format(
utils.make_divider(header_text, lpad, line_length=113),
text,
utils.make_divider('' + raw_incl, lpad, line_length=113)
)
return '\n\n' + text + '\n\n' # will get merged later
@ -55,13 +57,31 @@ def main():
# preprocess header(s)
source_text = str(Preprocessor('toml.h'))
source_text = re.sub(r'^\s*#\s*pragma\s+once\s*$', '', source_text, 0, re.I | re.M) # 'pragma once'
source_text = re.sub(r'^\s*//\s*clang-format\s+.+?$', '', source_text, 0, re.I | re.M) # clang-format directives
source_text = re.sub(r'^\s*//\s*SPDX-License-Identifier:.+?$', '', source_text, 0, re.I | re.M) # spdx
source_text = re.sub('(?:(?:\n|^)[ \t]*//[/#!<]+[^\n]*)+\n', '\n', source_text, 0, re.I | re.M) # remove 'magic' comment blocks
source_text = re.sub('(?://[/#!<].*?)\n', '\n', source_text, 0, re.I | re.M) # remove 'magic' comments
source_text = re.sub('([^ \t])[ \t]+\n', '\\1\n', source_text, 0, re.I | re.M) # remove trailing whitespace
source_text = re.sub('\n(?:[ \t]*\n[ \t]*)+\n', '\n\n', source_text, 0, re.I | re.M) # remove double newlines
# strip various things:
# 'pragma once'
source_text = re.sub(r'^\s*#\s*pragma\s+once\s*$', '', source_text, 0, re.I | re.M)
# clang-format directives
source_text = re.sub(r'^\s*//\s*clang-format\s+.+?$', '', source_text, 0, re.I | re.M)
# spdx license identifiers
source_text = re.sub(r'^\s*//\s*SPDX-License-Identifier:.+?$', '', source_text, 0, re.I | re.M)
# 'magic' comment blocks (incl. doxygen)
source_text = re.sub('(?:(?:\n|^)[ \t]*//[/#!<]+[^\n]*)+\n', '\n', source_text, 0, re.I | re.M)
# 'magic' comments (incl. doxygen)
source_text = re.sub('(?://[/#!<].*?)\n', '\n', source_text, 0, re.I | re.M)
# remove trailing whitespace
source_text = re.sub('([^ \t])[ \t]+\n', '\\1\n', source_text, 0, re.I | re.M)
# bookended namespace blocks
source_text = re.sub('}\n+TOML_NAMESPACE_END\n+TOML_NAMESPACE_START\n+{\n+', '\n', source_text, 0, re.I | re.M)
source_text = re.sub('}\n+TOML_IMPL_NAMESPACE_END\n+TOML_IMPL_NAMESPACE_START\n+{\n+', '\n', source_text, 0, re.I | re.M)
# blank lines before some preprocessor directives
#source_text = re.sub('\n+\n(\s*)#\s*(elif|else|endif)(.*?)\n', '\n\\1#\\2\\3\n', source_text, 0, re.I | re.M)
# blank lines after some preprocessor directives
#source_text = re.sub('#\s*(if|ifn?def|elif|else)(.*?)\n\n+', '#\\1\\2\n', source_text, 0, re.I | re.M)
# blank lines after opening braces
source_text = re.sub('[{]\s*\n\s*\n+', '{\n', source_text, 0, re.I | re.M)
# double newlines
source_text = re.sub('\n(?:[ \t]*\n[ \t]*)+\n', '\n\n', source_text, 0, re.I | re.M)
# source_text = re.sub( # blank lines between various preprocessor directives
# '[#](endif(?:\s*//[^\n]*)?)\n{2,}[#](ifn?(?:def)?|define)',

View File

@ -50,7 +50,7 @@ compiler_supports_cpp20 = compiler.links('''
int main()
{
std::string s = "kek";
std::cout << s << std::endl;
std::cout << s << "\n";
return 0;
}
''',
@ -259,7 +259,7 @@ compiler_supports_fast_math = compiler.links('''
#include <iostream>
int main()
{
std::cout << std::exp2(2.0) << std::pow(2.0, 3.0) << std::endl;
std::cout << std::exp2(2.0) << std::pow(2.0, 3.0) << "\n";
return 0;
}
''',

236
toml.hpp
View File

@ -45,8 +45,7 @@
#ifndef INCLUDE_TOMLPLUSPLUS_H
#define INCLUDE_TOMLPLUSPLUS_H
//-------------- ↓ toml_preprocessor.h -------------------------------------------------------------------------------
#if 1
#if 1 //------ ↓ toml_preprocessor.h --------------------------------------------------------------------------------
#ifndef __cplusplus
#error toml++ is a C++ library.
@ -200,12 +199,12 @@
_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_SPAM_WARNINGS _Pragma("GCC diagnostic ignored \"-Wpadded\"") \
_Pragma("GCC diagnostic ignored \"-Wcast-align\"") \
_Pragma("GCC diagnostic ignored \"-Wcomment\"") \
_Pragma("GCC diagnostic ignored \"-Wtype-limits\"")
_Pragma("GCC diagnostic ignored \"-Wtype-limits\"") \
_Pragma("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") \
_Pragma("GCC diagnostic ignored \"-Wsuggest-attribute=pure\"")
#define TOML_POP_WARNINGS _Pragma("GCC diagnostic pop")
#define TOML_DISABLE_WARNINGS TOML_PUSH_WARNINGS \
_Pragma("GCC diagnostic ignored \"-Wall\"") \
@ -215,7 +214,6 @@
TOML_DISABLE_INIT_WARNINGS \
TOML_DISABLE_ARITHMETIC_WARNINGS \
TOML_DISABLE_SHADOW_WARNINGS \
TOML_DISABLE_SUGGEST_WARNINGS \
TOML_DISABLE_SPAM_WARNINGS
#define TOML_ENABLE_WARNINGS TOML_POP_WARNINGS
@ -387,9 +385,6 @@ is no longer necessary.
#ifndef TOML_DISABLE_SHADOW_WARNINGS
#define TOML_DISABLE_SHADOW_WARNINGS
#endif
#ifndef TOML_DISABLE_SUGGEST_WARNINGS
#define TOML_DISABLE_SUGGEST_WARNINGS
#endif
#ifndef TOML_POP_WARNINGS
#define TOML_POP_WARNINGS
#endif
@ -599,15 +594,13 @@ TOML_DISABLE_WARNINGS
#endif
TOML_ENABLE_WARNINGS
#endif
//-------------- ↑ toml_preprocessor.h -------------------------------------------------------------------------------
//------------------------------------------ ↓ toml_common.h ---------------------------------------------------------
#if 1
#endif //------ ↑ toml_preprocessor.h --------------------------------------------------------------------------------
TOML_PUSH_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
#if 1 //---------------------------------- ↓ toml_common.h ----------------------------------------------------------
TOML_DISABLE_WARNINGS
#include <cstdint>
#include <cstddef>
@ -1231,11 +1224,7 @@ TOML_NAMESPACE_START
{
return static_cast<size_t>(n);
}
}
TOML_NAMESPACE_END
TOML_NAMESPACE_START
{
TOML_ABI_NAMESPACE_BOOL(TOML_LARGE_FILES, lf, sf)
#if TOML_LARGE_FILES
@ -1304,11 +1293,7 @@ TOML_NAMESPACE_START
};
TOML_ABI_NAMESPACE_END // TOML_LARGE_FILES
}
TOML_NAMESPACE_END
TOML_NAMESPACE_START
{
template <typename Char>
inline std::basic_ostream<Char>& operator << (std::basic_ostream<Char>& lhs, node_type rhs)
{
@ -1331,16 +1316,9 @@ TOML_NAMESPACE_START
}
TOML_NAMESPACE_END
TOML_POP_WARNINGS // TOML_DISABLE_SPAM_WARNINGS
#endif //---------------------------------- ↑ toml_common.h ----------------------------------------------------------
#endif
//------------------------------------------ ↑ toml_common.h ---------------------------------------------------------
//----------------------------------------------------------------- ↓ toml_date_time.h -------------------------------
#if 1
TOML_PUSH_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
#if 1 //--------------------------------------------------------- ↓ toml_date_time.h --------------------------------
TOML_NAMESPACE_START
{
@ -1643,13 +1621,9 @@ TOML_NAMESPACE_START
}
TOML_NAMESPACE_END
TOML_POP_WARNINGS // TOML_DISABLE_SPAM_WARNINGS
#endif //--------------------------------------------------------- ↑ toml_date_time.h --------------------------------
#endif
//----------------------------------------------------------------- ↑ toml_date_time.h -------------------------------
//--------------------------------------------------------------------------------------- ↓ toml_print_to_stream.h ---
#if 1
#if 1 //------------------------------------------------------------------------------- ↓ toml_print_to_stream.h ----
TOML_DISABLE_WARNINGS
#include <cmath>
@ -2039,14 +2013,9 @@ TOML_NAMESPACE_START
}
TOML_NAMESPACE_END
#endif
//--------------------------------------------------------------------------------------- ↑ toml_print_to_stream.h ---
#endif //------------------------------------------------------------------------------- ↑ toml_print_to_stream.h ----
//------------------ ↓ toml_node.h -----------------------------------------------------------------------------------
#if 1
TOML_PUSH_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
#if 1 //---------- ↓ toml_node.h ------------------------------------------------------------------------------------
#if defined(DOXYGEN) || TOML_SIMPLE_STATIC_ASSERT_MESSAGES
@ -2512,13 +2481,9 @@ TOML_NAMESPACE_START
}
TOML_NAMESPACE_END
TOML_POP_WARNINGS // TOML_DISABLE_SPAM_WARNINGS
#endif //---------- ↑ toml_node.h ------------------------------------------------------------------------------------
#endif
//------------------ ↑ toml_node.h -----------------------------------------------------------------------------------
//------------------------------------------ ↓ toml_value.h ----------------------------------------------------------
#if 1
#if 1 //---------------------------------- ↓ toml_value.h -----------------------------------------------------------
#ifndef DOXYGEN
#if TOML_WINDOWS_COMPAT
@ -2581,7 +2546,6 @@ TOML_POP_WARNINGS // TOML_DISABLE_SPAM_WARNINGS
TOML_PUSH_WARNINGS
TOML_DISABLE_ARITHMETIC_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
TOML_IMPL_NAMESPACE_START
{
@ -3288,14 +3252,9 @@ TOML_NAMESPACE_END
TOML_POP_WARNINGS // TOML_DISABLE_ARITHMETIC_WARNINGS
#endif
//------------------------------------------ ↑ toml_value.h ----------------------------------------------------------
#endif //---------------------------------- ↑ toml_value.h -----------------------------------------------------------
//------------------------------------------------------------------- ↓ toml_array.h ---------------------------------
#if 1
TOML_PUSH_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
#if 1 //----------------------------------------------------------- ↓ toml_array.h ----------------------------------
TOML_IMPL_NAMESPACE_START
{
@ -3857,16 +3816,9 @@ TOML_NAMESPACE_START
}
TOML_NAMESPACE_END
TOML_POP_WARNINGS //TOML_DISABLE_SPAM_WARNINGS
#endif //----------------------------------------------------------- ↑ toml_array.h ----------------------------------
#endif
//------------------------------------------------------------------- ↑ toml_array.h ---------------------------------
//-------------------------------------------------------------------------------------------- ↓ toml_table.h --------
#if 1
TOML_PUSH_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
#if 1 //------------------------------------------------------------------------------------ ↓ toml_table.h ---------
TOML_IMPL_NAMESPACE_START
{
@ -4243,7 +4195,6 @@ TOML_NAMESPACE_START
}
else
{
using type = impl::unwrap_node<ValueType>;
static_assert(
(impl::is_native<type> || impl::is_one_of<type, table, array>) && !impl::is_cvref<type>,
@ -4416,13 +4367,9 @@ TOML_NAMESPACE_START
}
TOML_NAMESPACE_END
TOML_POP_WARNINGS // TOML_DISABLE_SPAM_WARNINGS
#endif //------------------------------------------------------------------------------------ ↑ toml_table.h ---------
#endif
//-------------------------------------------------------------------------------------------- ↑ toml_table.h --------
//--------------- ↓ toml_node_view.h ---------------------------------------------------------------------------------
#if 1
#if 1 //------- ↓ toml_node_view.h ----------------------------------------------------------------------------------
TOML_PUSH_WARNINGS
TOML_DISABLE_ARITHMETIC_WARNINGS
@ -4808,11 +4755,9 @@ TOML_NAMESPACE_END
TOML_POP_WARNINGS // TOML_DISABLE_ARITHMETIC_WARNINGS
#endif
//--------------- ↑ toml_node_view.h ---------------------------------------------------------------------------------
#endif //------- ↑ toml_node_view.h ----------------------------------------------------------------------------------
//------------------------------------------- ↓ toml_utf8.h ----------------------------------------------------------
#if 1
#if 1 //----------------------------------- ↓ toml_utf8.h -----------------------------------------------------------
#ifndef DOXYGEN
@ -5776,15 +5721,12 @@ TOML_IMPL_NAMESPACE_END
#endif // !DOXYGEN
#endif
//------------------------------------------- ↑ toml_utf8.h ----------------------------------------------------------
#endif //----------------------------------- ↑ toml_utf8.h -----------------------------------------------------------
//----------------------------------------------------------------- ↓ toml_formatter.h -------------------------------
#if 1
#if 1 //--------------------------------------------------------- ↓ toml_formatter.h --------------------------------
TOML_PUSH_WARNINGS
TOML_DISABLE_SWITCH_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
TOML_NAMESPACE_START
{
@ -6021,17 +5963,14 @@ TOML_IMPL_NAMESPACE_START
}
TOML_IMPL_NAMESPACE_END
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_SPAM_WARNINGS
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS
#endif
//----------------------------------------------------------------- ↑ toml_formatter.h -------------------------------
#endif //--------------------------------------------------------- ↑ toml_formatter.h --------------------------------
//-------------------------------------------------------------------------------------- ↓ toml_default_formatter.h --
#if 1
#if 1 //------------------------------------------------------------------------------ ↓ toml_default_formatter.h ---
TOML_PUSH_WARNINGS
TOML_DISABLE_SWITCH_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
TOML_IMPL_NAMESPACE_START
{
@ -6384,17 +6323,14 @@ TOML_NAMESPACE_START
}
TOML_NAMESPACE_END
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_SPAM_WARNINGS
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS
#endif
//-------------------------------------------------------------------------------------- ↑ toml_default_formatter.h --
#endif //------------------------------------------------------------------------------ ↑ toml_default_formatter.h ---
//------------- ↓ toml_json_formatter.h ------------------------------------------------------------------------------
#if 1
#if 1 //----- ↓ toml_json_formatter.h -------------------------------------------------------------------------------
TOML_PUSH_WARNINGS
TOML_DISABLE_SWITCH_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
TOML_NAMESPACE_START
{
@ -6503,15 +6439,13 @@ TOML_NAMESPACE_START
}
TOML_NAMESPACE_END
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_SPAM_WARNINGS
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS
#endif
//------------- ↑ toml_json_formatter.h ------------------------------------------------------------------------------
#endif //----- ↑ toml_json_formatter.h -------------------------------------------------------------------------------
#if TOML_PARSER
//--------------------------------------- ↓ toml_parse_error.h -------------------------------------------------------
#if 1
#if 1 //------------------------------- ↓ toml_parse_error.h --------------------------------------------------------
TOML_DISABLE_WARNINGS
#if TOML_EXCEPTIONS
@ -6521,7 +6455,6 @@ TOML_ENABLE_WARNINGS
TOML_PUSH_WARNINGS
TOML_DISABLE_INIT_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
TOML_NAMESPACE_START
{
@ -6628,16 +6561,11 @@ TOML_NAMESPACE_START
}
TOML_NAMESPACE_END
TOML_POP_WARNINGS
TOML_POP_WARNINGS // TOML_DISABLE_INIT_WARNINGS
#endif
//--------------------------------------- ↑ toml_parse_error.h -------------------------------------------------------
#endif //------------------------------- ↑ toml_parse_error.h --------------------------------------------------------
//---------------------------------------------------------------- ↓ toml_utf8_streams.h -----------------------------
#if 1
TOML_PUSH_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
#if 1 //-------------------------------------------------------- ↓ toml_utf8_streams.h ------------------------------
TOML_IMPL_NAMESPACE_START
{
@ -6981,7 +6909,6 @@ TOML_IMPL_NAMESPACE_START
utf8_reader_interface& reader;
struct
{
utf8_codepoint buffer[history_buffer_size];
size_t count, first;
}
@ -7004,16 +6931,9 @@ TOML_IMPL_NAMESPACE_START
}
TOML_IMPL_NAMESPACE_END
TOML_POP_WARNINGS // TOML_DISABLE_SPAM_WARNINGS
#endif //-------------------------------------------------------- ↑ toml_utf8_streams.h ------------------------------
#endif
//---------------------------------------------------------------- ↑ toml_utf8_streams.h -----------------------------
//-------------------------------------------------------------------------------------------- ↓ toml_parser.h -------
#if 1
TOML_PUSH_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
#if 1 //------------------------------------------------------------------------------------ ↓ toml_parser.h --------
TOML_NAMESPACE_START
{
@ -7434,20 +7354,13 @@ TOML_NAMESPACE_END
#undef TOML_THROW_PARSE_ERROR
TOML_POP_WARNINGS // TOML_DISABLE_SPAM_WARNINGS
#endif
//-------------------------------------------------------------------------------------------- ↑ toml_parser.h -------
#endif //------------------------------------------------------------------------------------ ↑ toml_parser.h --------
#endif // TOML_PARSER
#if TOML_IMPLEMENTATION
//----------------- ↓ toml_node.hpp ----------------------------------------------------------------------------------
#if 1
TOML_PUSH_WARNINGS
TOML_DISABLE_SUGGEST_WARNINGS
#if 1 //--------- ↓ toml_node.hpp -----------------------------------------------------------------------------------
TOML_NAMESPACE_START
{
@ -7535,17 +7448,9 @@ TOML_NAMESPACE_START
}
TOML_NAMESPACE_END
TOML_POP_WARNINGS // TOML_DISABLE_SUGGEST_WARNINGS
#endif //--------- ↑ toml_node.hpp -----------------------------------------------------------------------------------
#endif
//----------------- ↑ toml_node.hpp ----------------------------------------------------------------------------------
//----------------------------------------- ↓ toml_array.hpp ---------------------------------------------------------
#if 1
TOML_PUSH_WARNINGS
TOML_DISABLE_SUGGEST_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
#if 1 //--------------------------------- ↓ toml_array.hpp ----------------------------------------------------------
TOML_NAMESPACE_START
{
@ -7853,17 +7758,9 @@ TOML_NAMESPACE_START
}
TOML_NAMESPACE_END
TOML_POP_WARNINGS // TOML_DISABLE_SUGGEST_WARNINGS, TOML_DISABLE_SPAM_WARNINGS
#endif //--------------------------------- ↑ toml_array.hpp ----------------------------------------------------------
#endif
//----------------------------------------- ↑ toml_array.hpp ---------------------------------------------------------
//------------------------------------------------------------------ ↓ toml_table.hpp --------------------------------
#if 1
TOML_PUSH_WARNINGS
TOML_DISABLE_SUGGEST_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
#if 1 //---------------------------------------------------------- ↓ toml_table.hpp ---------------------------------
TOML_NAMESPACE_START
{
@ -8168,13 +8065,9 @@ TOML_NAMESPACE_START
}
TOML_NAMESPACE_END
TOML_POP_WARNINGS // TOML_DISABLE_SUGGEST_WARNINGS, TOML_DISABLE_SPAM_WARNINGS
#endif //---------------------------------------------------------- ↑ toml_table.hpp ---------------------------------
#endif
//------------------------------------------------------------------ ↑ toml_table.hpp --------------------------------
//------------------------------------------------------------------------------------- ↓ toml_default_formatter.hpp -
#if 1
#if 1 //----------------------------------------------------------------------------- ↓ toml_default_formatter.hpp --
TOML_DISABLE_WARNINGS
#include <cmath>
@ -8183,7 +8076,6 @@ TOML_ENABLE_WARNINGS
TOML_PUSH_WARNINGS
TOML_DISABLE_SWITCH_WARNINGS
TOML_DISABLE_ARITHMETIC_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
TOML_IMPL_NAMESPACE_START
{
@ -8432,13 +8324,11 @@ TOML_IMPL_NAMESPACE_END
#endif // TOML_WINDOWS_COMPAT
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_ARITHMETIC_WARNINGS, TOML_DISABLE_SPAM_WARNINGS
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_ARITHMETIC_WARNINGS
#endif
//------------------------------------------------------------------------------------- ↑ toml_default_formatter.hpp -
#endif //----------------------------------------------------------------------------- ↑ toml_default_formatter.hpp --
//------------ ↓ toml_json_formatter.hpp -----------------------------------------------------------------------------
#if 1
#if 1 //---- ↓ toml_json_formatter.hpp ------------------------------------------------------------------------------
TOML_PUSH_WARNINGS
TOML_DISABLE_SWITCH_WARNINGS
@ -8489,13 +8379,11 @@ TOML_NAMESPACE_END
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS
#endif
//------------ ↑ toml_json_formatter.hpp -----------------------------------------------------------------------------
#endif //---- ↑ toml_json_formatter.hpp ------------------------------------------------------------------------------
#if TOML_PARSER
//-------------------------------------- ↓ toml_utf8_streams.hpp -----------------------------------------------------
#if 1
#if 1 //------------------------------ ↓ toml_utf8_streams.hpp ------------------------------------------------------
#if !TOML_EXCEPTIONS
#undef TOML_ERROR_CHECK
@ -8590,11 +8478,9 @@ TOML_IMPL_NAMESPACE_END
#undef TOML_ERROR_CHECK
#undef TOML_ERROR
#endif
//-------------------------------------- ↑ toml_utf8_streams.hpp -----------------------------------------------------
#endif //------------------------------ ↑ toml_utf8_streams.hpp ------------------------------------------------------
//------------------------------------------------------------------ ↓ toml_parser.hpp -------------------------------
#if 1
#if 1 //---------------------------------------------------------- ↓ toml_parser.hpp --------------------------------
TOML_DISABLE_WARNINGS
#include <cmath>
@ -8611,7 +8497,6 @@ TOML_ENABLE_WARNINGS
TOML_PUSH_WARNINGS
TOML_DISABLE_SWITCH_WARNINGS
TOML_DISABLE_SPAM_WARNINGS
#if TOML_EXCEPTIONS && !defined(__INTELLISENSE__)
#define TOML_RETURNS_BY_THROWING [[noreturn]]
@ -11593,17 +11478,15 @@ TOML_NAMESPACE_START
}
TOML_NAMESPACE_END
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS, TOML_DISABLE_SPAM_WARNINGS
TOML_POP_WARNINGS // TOML_DISABLE_SWITCH_WARNINGS
#endif
//------------------------------------------------------------------ ↑ toml_parser.hpp -------------------------------
#endif //---------------------------------------------------------- ↑ toml_parser.hpp --------------------------------
#endif // TOML_PARSER
#if !TOML_HEADER_ONLY
//--------------------------------------------------------------------------------------- ↓ toml_instantiations.hpp --
#if 1
#if 1 //------------------------------------------------------------------------------- ↓ toml_instantiations.hpp ---
TOML_DISABLE_WARNINGS
#include <ostream>
@ -11742,13 +11625,14 @@ TOML_NAMESPACE_START
}
TOML_NAMESPACE_END
#endif
//--------------------------------------------------------------------------------------- ↑ toml_instantiations.hpp --
#endif //------------------------------------------------------------------------------- ↑ toml_instantiations.hpp ---
#endif // !TOML_HEADER_ONLY
#endif // TOML_IMPLEMENTATION
TOML_POP_WARNINGS // TOML_DISABLE_SPAM_WARNINGS
// macro hygiene
#if TOML_UNDEF_MACROS
#undef TOML_ABI_NAMESPACES