parent
b6fa7e1891
commit
67c18a3251
@ -17,6 +17,7 @@ template:
|
||||
|
||||
#### Fixes:
|
||||
- fixed `[dotted.table]` source columns sometimes being off by one (#152) (@vaartis)
|
||||
- fixed spurious `Wnull-dereference` warning on GCC (#164) (@zaporozhets)
|
||||
- fixed `print_to_stream` ambiguity for `size_t` (#167) (@acronce)
|
||||
|
||||
#### Additions:
|
||||
|
@ -576,6 +576,7 @@
|
||||
TOML_PRAGMA_GCC(diagnostic ignored "-Wmissing-field-initializers") \
|
||||
TOML_PRAGMA_GCC(diagnostic ignored "-Wmaybe-uninitialized") \
|
||||
TOML_PRAGMA_GCC(diagnostic ignored "-Wnoexcept") \
|
||||
TOML_PRAGMA_GCC(diagnostic ignored "-Wnull-dereference") \
|
||||
static_assert(true)
|
||||
|
||||
#define TOML_POP_WARNINGS \
|
||||
|
@ -234,10 +234,13 @@ TOML_NAMESPACE_START
|
||||
TOML_EXTERNAL_LINKAGE
|
||||
void toml_formatter::print(const table& tbl)
|
||||
{
|
||||
static constexpr auto is_non_inline_array_of_tables = [](auto&& nde) noexcept
|
||||
static constexpr auto is_non_inline_array_of_tables = [](const node& n) noexcept
|
||||
{
|
||||
auto arr = nde.as_array();
|
||||
return arr && arr->is_array_of_tables() && !arr->template get_as<table>(0u)->is_inline();
|
||||
const auto arr = n.as_array();
|
||||
if (!arr || !arr->is_array_of_tables())
|
||||
return false;
|
||||
|
||||
return !reinterpret_cast<const table*>(&(*arr)[0])->is_inline();
|
||||
};
|
||||
|
||||
// values, arrays, and inline tables/table arrays
|
||||
|
10
toml.hpp
10
toml.hpp
@ -606,6 +606,7 @@
|
||||
TOML_PRAGMA_GCC(diagnostic ignored "-Wmissing-field-initializers") \
|
||||
TOML_PRAGMA_GCC(diagnostic ignored "-Wmaybe-uninitialized") \
|
||||
TOML_PRAGMA_GCC(diagnostic ignored "-Wnoexcept") \
|
||||
TOML_PRAGMA_GCC(diagnostic ignored "-Wnull-dereference") \
|
||||
static_assert(true)
|
||||
|
||||
#define TOML_POP_WARNINGS \
|
||||
@ -16578,10 +16579,13 @@ TOML_NAMESPACE_START
|
||||
TOML_EXTERNAL_LINKAGE
|
||||
void toml_formatter::print(const table& tbl)
|
||||
{
|
||||
static constexpr auto is_non_inline_array_of_tables = [](auto&& nde) noexcept
|
||||
static constexpr auto is_non_inline_array_of_tables = [](const node& n) noexcept
|
||||
{
|
||||
auto arr = nde.as_array();
|
||||
return arr && arr->is_array_of_tables() && !arr->template get_as<table>(0u)->is_inline();
|
||||
const auto arr = n.as_array();
|
||||
if (!arr || !arr->is_array_of_tables())
|
||||
return false;
|
||||
|
||||
return !reinterpret_cast<const table*>(&(*arr)[0])->is_inline();
|
||||
};
|
||||
|
||||
// values, arrays, and inline tables/table arrays
|
||||
|
Loading…
Reference in New Issue
Block a user