From 9948549b6270575fc21ce034ff89a9fc3939c660 Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Sat, 8 Jun 2019 19:53:50 +0900 Subject: [PATCH] fix: add missing template parameters --- toml/get.hpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/toml/get.hpp b/toml/get.hpp index 86158ee..40f4a93 100644 --- a/toml/get.hpp +++ b/toml/get.hpp @@ -483,7 +483,7 @@ template class M, template class V> basic_value& 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( @@ -571,14 +571,16 @@ find(const basic_value& v, const ::toml::key& ky, Ts&& ... keys) return ::toml::find(::toml::find(v, ky), std::forward(keys)...); } template class M, template class V> + template class M, template class V, + typename ... Ts> basic_value& find(basic_value& v, const ::toml::key& ky, Ts&& ... keys) { return ::toml::find(::toml::find(v, ky), std::forward(keys)...); } template class M, template class V> + template class M, template class V, + typename ... Ts> basic_value&& find(basic_value&& v, const ::toml::key& ky, Ts&& ... keys) { @@ -594,14 +596,16 @@ find(const basic_value& v, const ::toml::key& ky, Ts&& ... keys) return ::toml::find(::toml::find(v, ky), std::forward(keys)...); } template class M, template class V> + template class M, template class V, + typename ... Ts> decltype(::toml::get(std::declval&>())) find(basic_value& v, const ::toml::key& ky, Ts&& ... keys) { return ::toml::find(::toml::find(v, ky), std::forward(keys)...); } template class M, template class V> + template class M, template class V, + typename ... Ts> decltype(::toml::get(std::declval&&>())) find(basic_value&& v, const ::toml::key& ky, Ts&& ... keys) {