Skip to content

Commit

Permalink
refactor: add explicit to ctors of internal types
Browse files Browse the repository at this point in the history
  • Loading branch information
ToruNiina committed Jan 24, 2020
1 parent b2bb21a commit 49fdb61
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions toml/storage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ struct storage
{
using value_type = T;

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 const& v): ptr(toml::make_unique<T>(v)) {}
explicit storage(value_type&& v): ptr(toml::make_unique<T>(std::move(v))) {}
~storage() = default;

storage(const storage& rhs): ptr(toml::make_unique<T>(*rhs.ptr)) {}
storage& operator=(const storage& rhs)
{
Expand Down

0 comments on commit 49fdb61

Please sign in to comment.