From aa50364b57a4df7600b6294aba034c25782e3311 Mon Sep 17 00:00:00 2001 From: John Jones Date: Fri, 22 Mar 2019 09:17:01 -0500 Subject: [PATCH] help compiler infer correct templated method --- include/fc/rpc/api_connection.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fc/rpc/api_connection.hpp b/include/fc/rpc/api_connection.hpp index 1345c45..9045207 100644 --- a/include/fc/rpc/api_connection.hpp +++ b/include/fc/rpc/api_connection.hpp @@ -146,7 +146,7 @@ namespace fc { return f(); } - template + template::value,Signature>::type* = nullptr> R call_generic( const std::function,Args...)>& f, variants::const_iterator a0, variants::const_iterator e, uint32_t max_depth ) { FC_ASSERT( a0 != e, "too few arguments passed to method" ); @@ -154,7 +154,7 @@ namespace fc { detail::callback_functor arg0( get_connection(), a0->as(1) ); return call_generic( this->bind_first_arg,Args...>( f, std::function(arg0) ), a0+1, e, max_depth - 1 ); } - template + template::value,Signature>::type* = nullptr> R call_generic( const std::function&,Args...)>& f, variants::const_iterator a0, variants::const_iterator e, uint32_t max_depth ) { FC_ASSERT( a0 != e, "too few arguments passed to method" );