FC Updates from BitShares and myself #21

Closed
nathanielhourt wants to merge 687 commits from dapp-support into latest-fc
Showing only changes of commit 7b07f84f51 - Show all commits

View file

@ -146,21 +146,27 @@ namespace fc {
return f();
}
template<typename R, typename Signature, typename ... Args, typename std::enable_if<std::is_function<Signature>::value,Signature>::type* = nullptr>
R call_generic( const std::function<R(std::function<Signature>,Args...)>& f, variants::const_iterator a0, variants::const_iterator e, uint32_t max_depth )
template<typename R, typename Signature, typename ... Args,
typename std::enable_if<std::is_function<Signature>::value,Signature>::type* = nullptr>
R call_generic( const std::function<R(std::function<Signature>,Args...)>& f,
variants::const_iterator a0, variants::const_iterator e, uint32_t max_depth )
{
FC_ASSERT( a0 != e, "too few arguments passed to method" );
FC_ASSERT( max_depth > 0, "Recursion depth exceeded!" );
detail::callback_functor<Signature> arg0( get_connection(), a0->as<uint64_t>(1) );
return call_generic<R,Args...>( this->bind_first_arg<R,std::function<Signature>,Args...>( f, std::function<Signature>(arg0) ), a0+1, e, max_depth - 1 );
return call_generic<R,Args...>( this->bind_first_arg<R,std::function<Signature>,Args...>( f,
std::function<Signature>(arg0) ), a0+1, e, max_depth - 1 );
}
template<typename R, typename Signature, typename ... Args, typename std::enable_if<std::is_function<Signature>::value,Signature>::type* = nullptr>
R call_generic( const std::function<R(const std::function<Signature>&,Args...)>& f, variants::const_iterator a0, variants::const_iterator e, uint32_t max_depth )
template<typename R, typename Signature, typename ... Args,
typename std::enable_if<std::is_function<Signature>::value,Signature>::type* = nullptr>
R call_generic( const std::function<R(const std::function<Signature>&,Args...)>& f,
variants::const_iterator a0, variants::const_iterator e, uint32_t max_depth )
{
FC_ASSERT( a0 != e, "too few arguments passed to method" );
FC_ASSERT( max_depth > 0, "Recursion depth exceeded!" );
detail::callback_functor<Signature> arg0( get_connection(), a0->as<uint64_t>(1) );
return call_generic<R,Args...>( this->bind_first_arg<R,const std::function<Signature>&,Args...>( f, arg0 ), a0+1, e, max_depth - 1 );
return call_generic<R,Args...>( this->bind_first_arg<R,const std::function<Signature>&,Args...>( f,
arg0 ), a0+1, e, max_depth - 1 );
}
template<typename R, typename Arg0, typename ... Args>