diff --git a/toml/get.hpp b/toml/get.hpp index c2327a4..42ba7ba 100644 --- a/toml/get.hpp +++ b/toml/get.hpp @@ -34,7 +34,7 @@ template>::value, T> && get(basic_value&& v) { - return v.template cast>::value>(); + return std::move(v).template cast>::value>(); } // ============================================================================ @@ -532,7 +532,7 @@ template(std::declval&>())) find(basic_value& v, const key& ky) { - const auto& tab = v.template cast(); + auto& tab = v.template cast(); if(tab.count(ky) == 0) { throw std::out_of_range(detail::format_underline(concat_to_string(