Skip to content

Commit

Permalink
release 2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
marzer committed Dec 29, 2020
1 parent 63ec393 commit 4face4d
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ You'll find some more code examples in the `examples` directory, and plenty more
2. `#include <toml++/toml.h>`
### Conan
Add `tomlplusplus/2.2.0` to your conanfile.<br>
Add `tomlplusplus/2.3.0` to your conanfile.<br>
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/)_
Expand Down
4 changes: 2 additions & 2 deletions docs/main_page.dox
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
///
//////////////////////////////////
Expand All @@ -446,7 +446,7 @@
/// Add `tomlpp` to your `package.json5`, e.g.:
/// \bash
/// depends: [
/// 'tomlpp^2.2.0',
/// 'tomlpp^2.3.0',
/// ]
/// \ebash
///
Expand Down
12 changes: 6 additions & 6 deletions include/toml++/toml_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<void*>(&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<void*>(&storage)) parse_error{ std::move(err) };
}

/// \brief Move constructor.
Expand All @@ -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<void*>(&storage)) parse_error{ std::move(res).error() };
else
::new (&storage) toml::table{ std::move(res).table() };
::new (static_cast<void*>(&storage)) toml::table{ std::move(res).table() };
}

/// \brief Move-assignment operator.
Expand All @@ -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<void*>(&storage)) parse_error{ std::move(rhs).error() };
else
::new (&storage) toml::table{ std::move(rhs).table() };
::new (static_cast<void*>(&storage)) toml::table{ std::move(rhs).table() };
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion include/toml++/toml_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<void*>(&proxy)) proxy_type{ raw_->first, *raw_->second.get() };
proxy_instantiated = true;
return p;
}
Expand Down
2 changes: 1 addition & 1 deletion include/toml++/toml_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -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
Expand Down
18 changes: 9 additions & 9 deletions toml.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//----------------------------------------------------------------------------------------------------------------------
//
// toml++ v2.2.0
// toml++ v2.3.0
// https://github.com/marzer/tomlplusplus
// SPDX-License-Identifier: MIT
//
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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<void*>(&proxy)) proxy_type{ raw_->first, *raw_->second.get() };
proxy_instantiated = true;
return p;
}
Expand Down Expand Up @@ -7201,24 +7201,24 @@ TOML_NAMESPACE_START
explicit parse_result(toml::table&& tbl) noexcept
: is_err{ false }
{
::new (&storage) toml::table{ std::move(tbl) };
::new (static_cast<void*>(&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<void*>(&storage)) parse_error{ std::move(err) };
}

TOML_NODISCARD_CTOR
parse_result(parse_result&& res) noexcept
: is_err{ res.is_err }
{
if (is_err)
::new (&storage) parse_error{ std::move(res).error() };
::new (static_cast<void*>(&storage)) parse_error{ std::move(res).error() };
else
::new (&storage) toml::table{ std::move(res).table() };
::new (static_cast<void*>(&storage)) toml::table{ std::move(res).table() };
}

parse_result& operator=(parse_result&& rhs) noexcept
Expand All @@ -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<void*>(&storage)) parse_error{ std::move(rhs).error() };
else
::new (&storage) toml::table{ std::move(rhs).table() };
::new (static_cast<void*>(&storage)) toml::table{ std::move(rhs).table() };
}
else
{
Expand Down

0 comments on commit 4face4d

Please sign in to comment.