diff --git a/toml/find.hpp b/toml/find.hpp index 6399e2c..5291546 100644 --- a/toml/find.hpp +++ b/toml/find.hpp @@ -109,7 +109,8 @@ find(basic_value&& v, const key& ky) template class M, template class V, typename ... Ts> -const basic_value& +detail::enable_if_t... + >::value, const basic_value&> find(const basic_value& v, const ::toml::key& ky, Ts&& ... keys) { return ::toml::find(::toml::find(v, ky), std::forward(keys)...); @@ -117,7 +118,8 @@ find(const basic_value& v, const ::toml::key& ky, Ts&& ... keys) template class M, template class V, typename ... Ts> -basic_value& +detail::enable_if_t... + >::value, basic_value&> find(basic_value& v, const ::toml::key& ky, Ts&& ... keys) { return ::toml::find(::toml::find(v, ky), std::forward(keys)...); @@ -125,7 +127,8 @@ find(basic_value& v, const ::toml::key& ky, Ts&& ... keys) template class M, template class V, typename ... Ts> -basic_value&& +detail::enable_if_t... + >::value, basic_value&&> find(basic_value&& v, const ::toml::key& ky, Ts&& ... keys) { return ::toml::find(::toml::find(std::move(v), ky), std::forward(keys)...); @@ -134,7 +137,8 @@ find(basic_value&& v, const ::toml::key& ky, Ts&& ... keys) template class M, template class V, typename ... Ts> -decltype(::toml::get(std::declval&>())) +detail::enable_if_t... + >::value, decltype(get(std::declval&>()))> find(const basic_value& v, const ::toml::key& ky, Ts&& ... keys) { return ::toml::find(::toml::find(v, ky), std::forward(keys)...); @@ -142,7 +146,8 @@ find(const basic_value& v, const ::toml::key& ky, Ts&& ... keys) template class M, template class V, typename ... Ts> -decltype(::toml::get(std::declval&>())) +detail::enable_if_t... + >::value, decltype(get(std::declval&>()))> find(basic_value& v, const ::toml::key& ky, Ts&& ... keys) { return ::toml::find(::toml::find(v, ky), std::forward(keys)...); @@ -150,7 +155,8 @@ find(basic_value& v, const ::toml::key& ky, Ts&& ... keys) template class M, template class V, typename ... Ts> -decltype(::toml::get(std::declval&&>())) +detail::enable_if_t... + >::value, decltype(get(std::declval&&>()))> find(basic_value&& v, const ::toml::key& ky, Ts&& ... keys) { return ::toml::find(::toml::find(std::move(v), ky), std::forward(keys)...);