From 69f7d63a7aa1e04dd77b281bffb5f2a3a3889a26 Mon Sep 17 00:00:00 2001 From: Matt Witherspoon <32485495+spoonincode@users.noreply.github.com> Date: Thu, 10 Jun 2021 16:50:02 -0400 Subject: [PATCH] replace is_callable_v workaround with is_invocable_v --- include/eosio/vm/function_traits.hpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/include/eosio/vm/function_traits.hpp b/include/eosio/vm/function_traits.hpp index 76a88181..2355643b 100644 --- a/include/eosio/vm/function_traits.hpp +++ b/include/eosio/vm/function_traits.hpp @@ -72,12 +72,6 @@ namespace eosio { namespace vm { inline constexpr U&& make_dependent(U&& u) { return static_cast(u); } } - template - inline constexpr static bool is_callable_v = EOS_VM_HAS_MEMBER(AUTO_PARAM_WORKAROUND(FN), operator()); - - template - constexpr bool is_callable(F&& fn) { return EOS_VM_HAS_MEMBER(fn, operator()); } - namespace detail { template constexpr auto get_types(R(Args...)) -> std::tuple, Args>...>>; template constexpr auto get_types(F&& fn) { - if constexpr (is_callable_v) + if constexpr (std::is_invocable_v) return get_types(&F::operator()); else return get_types(fn); @@ -144,7 +138,7 @@ namespace eosio { namespace vm { constexpr auto parameters_from_impl(R(Cls::*)(Args...)const &&) -> pack_from_t; template constexpr auto parameters_from_impl(F&& fn) { - if constexpr (is_callable_v) + if constexpr (std::is_invocable_v) return parameters_from_impl(&F::operator()); else return parameters_from_impl(fn);