1
0
forked from Alepha/Alepha

Add a template binding gadget for type lists.

This commit is contained in:
2024-06-14 11:28:13 -04:00
parent 500ad866eb
commit fa33154064
4 changed files with 61 additions and 0 deletions

21
make_template.test/0.cc Normal file
View File

@ -0,0 +1,21 @@
static_assert( __cplusplus > 2023'00 );
#include "../make_template.h"
#include <tuple>
#include <variant>
namespace
{
#define ALL_TYPES int, float, char, double, std::nullptr_t, void
using MyTypes= Alepha::TypeList
<
ALL_TYPES
>;
using MyTuple= Alepha::make_template_t< std::tuple, MyTypes >;
static_assert( std::is_same_v< MyTuple, std::tuple< ALL_TYPES > > );
using MyVariant= Alepha::make_template_t< std::variant, MyTypes >;
static_assert( std::is_same_v< MyVariant, std::variant< ALL_TYPES > > );
}

View File

@ -0,0 +1 @@
unit_test( 0 )