mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-12-16 03:08:52 +08:00
refactor: add explicit to ctors of internal types
This commit is contained in:
@@ -16,10 +16,9 @@ struct storage
|
|||||||
{
|
{
|
||||||
using value_type = T;
|
using value_type = T;
|
||||||
|
|
||||||
storage(value_type const& v): ptr(toml::make_unique<T>(v)) {}
|
explicit storage(value_type const& v): ptr(toml::make_unique<T>(v)) {}
|
||||||
storage(value_type&& v): ptr(toml::make_unique<T>(std::move(v))) {}
|
explicit storage(value_type&& v): ptr(toml::make_unique<T>(std::move(v))) {}
|
||||||
~storage() = default;
|
~storage() = default;
|
||||||
|
|
||||||
storage(const storage& rhs): ptr(toml::make_unique<T>(*rhs.ptr)) {}
|
storage(const storage& rhs): ptr(toml::make_unique<T>(*rhs.ptr)) {}
|
||||||
storage& operator=(const storage& rhs)
|
storage& operator=(const storage& rhs)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user