template< typename X, typename EmptyList > struct Append { using T = TypeList< X >; }; template< typename _X, typename _T, typename... _Ts > struct Append< _X, TypeList< _T, _Ts... > > { using T = TypeList< _X, _T, _Ts... >; }; template< template< typename > class Cond, typename List > struct Filter : public std::conditional< Cond< typename List::Head >::value, Filter< Cond, typename List::Tail >, Append< typename List::Head, typename Filter< Cond, typename List::Tail >::T > >::type { }; template< template< typename > class Cond > struct Filter< Cond, TypeList<> > { using T = TypeList<>; }; template< typename List > struct Last : public Last< typename List::Tail > { }; template< typename _T > struct Last< TypeList< _T > > { using T = _T; };