From fe8a909213b43452789535b341af1058424d22c5 Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Sun, 2 Jun 2019 22:09:26 +0900 Subject: [PATCH] fix: correctly put references --- toml/get.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(