diff --git a/include/fc/rpc/api_connection.hpp b/include/fc/rpc/api_connection.hpp index 737a224..a4781c9 100644 --- a/include/fc/rpc/api_connection.hpp +++ b/include/fc/rpc/api_connection.hpp @@ -75,6 +75,15 @@ namespace fc { }; } + template + std::function to_generic( const std::function& f )const + { + return [=]( const variants& args ) { + call_generic( f, args.begin(), args.end() ); + return variant(); + }; + } + template void operator()( const char* name, std::function& memb )const { api._methods.emplace_back( to_generic( memb ) );