1
0
forked from Alepha/Alepha

Add strip_last_t to type lisp.

This commit is contained in:
2024-08-09 03:31:34 -04:00
parent 2d26e70f6b
commit 1c80d27cf3

View File

@ -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