Skip to content

Instantly share code, notes, and snippets.

@SammyJames
Created July 12, 2015 22:52
Show Gist options
  • Save SammyJames/23ec91d08201340eed79 to your computer and use it in GitHub Desktop.
Save SammyJames/23ec91d08201340eed79 to your computer and use it in GitHub Desktop.
template< typename T >
static void Test( T&& Arg )
{
}
template< typename T, typename... TS >
static void Test( T&& Arg, TS&&... Args )
{
Test( std::forward< T >( Arg ) );
Test( std::forward< TS... >( Args )... );
}
template< typename... TS >
static void ShushYou( TS&&... Args )
{
Test( std::forward< TS... >( Args )... );
}
template< typename FN, typename Tuple, size_t... Index >
static void Helper( FN&& Func, Tuple&& Tup, std::index_sequence< Index... > )
{
Func( std::get< Index >( std::forward< Tuple >( Tup ) )... );
}
static void Work()
{
using SetAlpha = TLuaFunction< decltype( &UIObject::SetAlpha ) >;
SetAlpha::Args::Type Tuple;
Helper( ShushYou, Tuple, std::make_index_sequence< std::tuple_size< SetAlpha::Args::Type >::value >{} );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment