forked from Alepha/Alepha
Clang warned about this -- Clang's variadic template argument handling seems to significantly differ from GCC's. I should test this out on godbolt sometime.
35 lines
661 B
C++
35 lines
661 B
C++
static_assert( __cplusplus > 2020'99 );
|
|
|
|
#pragma once
|
|
|
|
#include <Alepha/Alepha.h>
|
|
|
|
#include <type_traits>
|
|
#include <optional>
|
|
|
|
namespace Alepha::Hydrogen::Meta
|
|
{
|
|
inline namespace exports { inline namespace type_traits {} }
|
|
|
|
namespace detail::type_traits::is_optional
|
|
{
|
|
inline namespace exports
|
|
{
|
|
template< typename T >
|
|
struct is_optional : std::false_type {};
|
|
|
|
template< typename T >
|
|
struct is_optional< std::optional< T > > : std::true_type {};
|
|
|
|
template< typename T >
|
|
constexpr bool is_optional_v= is_optional< T >::value;
|
|
}
|
|
}
|
|
|
|
namespace exports::type_traits
|
|
{
|
|
using namespace detail::type_traits::is_optional::exports;
|
|
}
|
|
|
|
}
|