diff --git a/toml/get.hpp b/toml/get.hpp index bbc9a09..fbecd60 100644 --- a/toml/get.hpp +++ b/toml/get.hpp @@ -421,48 +421,6 @@ T get(const basic_value& v) // ============================================================================ // find and get -// for toml::table. -template -detail::enable_if_t, - detail::is_basic_value>::value, - decltype(::toml::get(std::declval()))> -find(Table& tab, const toml::key& ky, std::string tn = "unknown table") -{ - if(tab.count(ky) == 0) - { - throw std::out_of_range(concat_to_string( - "[error] key \"", ky, "\" not found in ", tn)); - } - return ::toml::get(tab.at(ky)); -} -template -detail::enable_if_t, - detail::is_basic_value>::value, - decltype(::toml::get(std::declval()))> -find(Table const& tab, const toml::key& ky, std::string tn = "unknown table") -{ - if(tab.count(ky) == 0) - { - throw std::out_of_range(concat_to_string( - "[error] key \"", ky, "\" not found in ", tn)); - } - return ::toml::get(tab.at(ky)); -} -template -detail::enable_if_t, - detail::is_basic_value>::value, - decltype(::toml::get(std::declval()))> -find(typename std::remove_reference&& tab, const toml::key& ky, - std::string tn = "unknown table") -{ - if(tab.count(ky) == 0) - { - throw std::out_of_range(concat_to_string( - "[error] key \"", ky, "\" not found in ", tn)); - } - return ::toml::get(std::move(tab.at(ky))); -} - // ---------------------------------------------------------------------------- // these overloads do not require to set T. and returns value itself. template