From 72ee8caf09ba7a6d79827614611ddd20001cf4b0 Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Fri, 14 May 2021 15:53:34 +0900 Subject: [PATCH] refactor: use has_specialized_from to check if toml::from exists for a specific T --- toml/get.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/toml/get.hpp b/toml/get.hpp index 5095caf..9a5a855 100644 --- a/toml/get.hpp +++ b/toml/get.hpp @@ -255,9 +255,9 @@ get(const basic_value&); // toml::from::from_toml(v) template class M, template class V, - std::size_t S = sizeof(::toml::from)> -T get(const basic_value&); + template class M, template class V> +detail::enable_if_t::value, T> +get(const basic_value&); // T(const toml::value&) and T is not toml::basic_value template& v) return ud; } template class M, template class V, - std::size_t> -T get(const basic_value& v) + template class M, template class V> +detail::enable_if_t::value, T> +get(const basic_value& v) { return ::toml::from::from_toml(v); }