forked from Alepha/Alepha
Add strip_last_t
to type lisp.
This commit is contained in:
22
type_lisp.h
22
type_lisp.h
@ -162,6 +162,28 @@ namespace Alepha::Hydrogen ::detail:: type_lisp_m
|
||||
{
|
||||
using type= Nil;
|
||||
};
|
||||
|
||||
|
||||
template< TypeListType list >
|
||||
struct strip_last;
|
||||
|
||||
namespace exports
|
||||
{
|
||||
template< typename list >
|
||||
using strip_last_t= tuple_from_list_t< typename strip_last< list_from_tuple_t< list > >::type >;
|
||||
}
|
||||
|
||||
template< TypeListType list >
|
||||
struct strip_last
|
||||
{
|
||||
using type= cons_t< car_t< list >, typename strip_last< cdr_t< list > >::type >;
|
||||
};
|
||||
|
||||
template< typename last >
|
||||
struct strip_last< TypeList< last > >
|
||||
{
|
||||
using type= Nil;
|
||||
};
|
||||
}
|
||||
|
||||
namespace Alepha::Hydrogen::inline exports::inline type_lisp_m
|
||||
|
Reference in New Issue
Block a user