Created
July 12, 2015 22:52
-
-
Save SammyJames/23ec91d08201340eed79 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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