From 4face4d5bf16326aca0da1fb33876dbca63b6e2f Mon Sep 17 00:00:00 2001 From: Mark Gillard Date: Tue, 29 Dec 2020 11:22:22 +0200 Subject: [PATCH] release 2.3.0 --- README.md | 4 ++-- docs/main_page.dox | 4 ++-- include/toml++/toml_parser.h | 12 ++++++------ include/toml++/toml_table.h | 2 +- include/toml++/toml_version.h | 2 +- meson.build | 2 +- toml.hpp | 18 +++++++++--------- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 6b7cda37..5ac06241 100644 --- a/README.md +++ b/README.md @@ -98,14 +98,14 @@ You'll find some more code examples in the `examples` directory, and plenty more 2. `#include ` ### Conan -Add `tomlplusplus/2.2.0` to your conanfile.
+Add `tomlplusplus/2.3.0` to your conanfile.
This adds the single-header version by default, but you can specify the regular version using `"multiple_headers": True`. ### DDS Add `tomlpp` to your `package.json5`, e.g.: ``` depends: [ - 'tomlpp^2.2.0', + 'tomlpp^2.3.0', ] ``` > ℹ _[What is DDS?](https://dds.pizza/)_ diff --git a/docs/main_page.dox b/docs/main_page.dox index cd8c1c32..10691a74 100644 --- a/docs/main_page.dox +++ b/docs/main_page.dox @@ -437,7 +437,7 @@ ////////////////////////////////// /// /// \subsection mainpage-adding-lib-conan Conan -/// Add `tomlplusplus/2.2.0` to your conanfile. This adds the single-header version by default, but you can specify the +/// Add `tomlplusplus/2.3.0` to your conanfile. This adds the single-header version by default, but you can specify the /// regular version using `"multiple_headers": True`. /// ////////////////////////////////// @@ -446,7 +446,7 @@ /// Add `tomlpp` to your `package.json5`, e.g.: /// \bash /// depends: [ -/// 'tomlpp^2.2.0', +/// 'tomlpp^2.3.0', /// ] /// \ebash /// diff --git a/include/toml++/toml_parser.h b/include/toml++/toml_parser.h index 266b2b1d..e60b0967 100644 --- a/include/toml++/toml_parser.h +++ b/include/toml++/toml_parser.h @@ -155,14 +155,14 @@ TOML_NAMESPACE_START explicit parse_result(toml::table&& tbl) noexcept : is_err{ false } { - ::new (&storage) toml::table{ std::move(tbl) }; + ::new (static_cast(&storage)) toml::table{ std::move(tbl) }; } TOML_NODISCARD_CTOR explicit parse_result(parse_error&& err) noexcept : is_err{ true } { - ::new (&storage) parse_error{ std::move(err) }; + ::new (static_cast(&storage)) parse_error{ std::move(err) }; } /// \brief Move constructor. @@ -171,9 +171,9 @@ TOML_NAMESPACE_START : is_err{ res.is_err } { if (is_err) - ::new (&storage) parse_error{ std::move(res).error() }; + ::new (static_cast(&storage)) parse_error{ std::move(res).error() }; else - ::new (&storage) toml::table{ std::move(res).table() }; + ::new (static_cast(&storage)) toml::table{ std::move(res).table() }; } /// \brief Move-assignment operator. @@ -184,9 +184,9 @@ TOML_NAMESPACE_START destroy(); is_err = rhs.is_err; if (is_err) - ::new (&storage) parse_error{ std::move(rhs).error() }; + ::new (static_cast(&storage)) parse_error{ std::move(rhs).error() }; else - ::new (&storage) toml::table{ std::move(rhs).table() }; + ::new (static_cast(&storage)) toml::table{ std::move(rhs).table() }; } else { diff --git a/include/toml++/toml_table.h b/include/toml++/toml_table.h index 7016e48c..5d7b6922 100644 --- a/include/toml++/toml_table.h +++ b/include/toml++/toml_table.h @@ -39,7 +39,7 @@ TOML_IMPL_NAMESPACE_START { if (!proxy_instantiated) { - auto p = new (&proxy) proxy_type{ raw_->first, *raw_->second.get() }; + auto p = ::new (static_cast(&proxy)) proxy_type{ raw_->first, *raw_->second.get() }; proxy_instantiated = true; return p; } diff --git a/include/toml++/toml_version.h b/include/toml++/toml_version.h index 87d2cd7f..86613ca4 100644 --- a/include/toml++/toml_version.h +++ b/include/toml++/toml_version.h @@ -6,7 +6,7 @@ #pragma once #define TOML_LIB_MAJOR 2 -#define TOML_LIB_MINOR 2 +#define TOML_LIB_MINOR 3 #define TOML_LIB_PATCH 0 #define TOML_LANG_MAJOR 1 diff --git a/meson.build b/meson.build index b7a817b2..9b440ac9 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project( 'tomlplusplus', 'cpp', - version : '2.2.0', + version : '2.3.0', meson_version : '>=0.53.0', license : 'MIT', default_options : [ # https://mesonbuild.com/Builtin-options.html diff --git a/toml.hpp b/toml.hpp index 3d6b255a..7fea2594 100644 --- a/toml.hpp +++ b/toml.hpp @@ -1,6 +1,6 @@ //---------------------------------------------------------------------------------------------------------------------- // -// toml++ v2.2.0 +// toml++ v2.3.0 // https://github.com/marzer/tomlplusplus // SPDX-License-Identifier: MIT // @@ -521,7 +521,7 @@ is no longer necessary. #endif #define TOML_LIB_MAJOR 2 -#define TOML_LIB_MINOR 2 +#define TOML_LIB_MINOR 3 #define TOML_LIB_PATCH 0 #define TOML_LANG_MAJOR 1 @@ -4016,7 +4016,7 @@ TOML_IMPL_NAMESPACE_START { if (!proxy_instantiated) { - auto p = new (&proxy) proxy_type{ raw_->first, *raw_->second.get() }; + auto p = ::new (static_cast(&proxy)) proxy_type{ raw_->first, *raw_->second.get() }; proxy_instantiated = true; return p; } @@ -7201,14 +7201,14 @@ TOML_NAMESPACE_START explicit parse_result(toml::table&& tbl) noexcept : is_err{ false } { - ::new (&storage) toml::table{ std::move(tbl) }; + ::new (static_cast(&storage)) toml::table{ std::move(tbl) }; } TOML_NODISCARD_CTOR explicit parse_result(parse_error&& err) noexcept : is_err{ true } { - ::new (&storage) parse_error{ std::move(err) }; + ::new (static_cast(&storage)) parse_error{ std::move(err) }; } TOML_NODISCARD_CTOR @@ -7216,9 +7216,9 @@ TOML_NAMESPACE_START : is_err{ res.is_err } { if (is_err) - ::new (&storage) parse_error{ std::move(res).error() }; + ::new (static_cast(&storage)) parse_error{ std::move(res).error() }; else - ::new (&storage) toml::table{ std::move(res).table() }; + ::new (static_cast(&storage)) toml::table{ std::move(res).table() }; } parse_result& operator=(parse_result&& rhs) noexcept @@ -7228,9 +7228,9 @@ TOML_NAMESPACE_START destroy(); is_err = rhs.is_err; if (is_err) - ::new (&storage) parse_error{ std::move(rhs).error() }; + ::new (static_cast(&storage)) parse_error{ std::move(rhs).error() }; else - ::new (&storage) toml::table{ std::move(rhs).table() }; + ::new (static_cast(&storage)) toml::table{ std::move(rhs).table() }; } else {