diff --git a/toml/value.hpp b/toml/value.hpp index 013920f..9fa7b9c 100644 --- a/toml/value.hpp +++ b/toml/value.hpp @@ -27,16 +27,10 @@ inline region_base const* get_region(const Value& v) return v.region_info_.get(); } -template -void change_region(Value& v, Region&& reg) +template +void change_region(Value& v, region reg) { - using region_type = typename std::remove_reference< - typename std::remove_cv::type - >::type; - - std::shared_ptr new_reg = - std::make_shared(std::forward(reg)); - v.region_info_ = new_reg; + v.region_info_ = std::make_shared(std::move(reg)); return; } @@ -1709,8 +1703,8 @@ class basic_value template friend region_base const* detail::get_region(const Value& v); - template - friend void detail::change_region(Value& v, Region&& reg); + template + friend void detail::change_region(Value& v, region reg); private: