1
0
forked from Alepha/Alepha

A few more meta programming bits.

This commit is contained in:
2021-07-03 01:21:48 -04:00
parent 741c0dcdcf
commit 2bbb612df1
5 changed files with 180 additions and 0 deletions

36
Meta/tuple_decay.h Normal file
View File

@ -0,0 +1,36 @@
static_assert( __cplusplus > 201700, "C++17 Required" );
#pragma once
#include <Alepha/Alepha.h>
#include <type_traits>
#include <Alepha/Stud/type_traits.h>
namespace Alepha::Hydrogen::Meta
{
inline namespace exports { inline namespace type_traits {} }
namespace detail::type_traits::tuple_decay
{
inline namespace exports
{
template< typename T > struct tuple_decay;
template< typename ... Args >
struct tuple_decay< std::tuple< T, Args... > >
{
using type= std::tuple< Stud::decay_t< Args >... >;
};
template< typename T >
using tuple_decay_t= typename tuple_decay< T >::type;
}
}
namespace exports::type_traits
{
using namespace detail::type_traits::tuple_decay;
}
}