forked from Alepha/Alepha
Added Sequence and optional detection.
This is part of the larger `Meta` library. Need to implement tuple-for-each and more.
This commit is contained in:
34
Meta/is_forward_list.h
Normal file
34
Meta/is_forward_list.h
Normal file
@ -0,0 +1,34 @@
|
||||
static_assert( __cplusplus > 201700, "C++17 Required" );
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Alepha/Alepha.h>
|
||||
|
||||
#include <type_traits>
|
||||
#include <forward_list>
|
||||
|
||||
namespace Alepha::Hydrogen::Meta
|
||||
{
|
||||
inline namespace exports { inline namespace type_traits {} }
|
||||
|
||||
namespace detail::type_traits::is_forward_list
|
||||
{
|
||||
inline namespace exports
|
||||
{
|
||||
template< typename T >
|
||||
struct is_forward_list : std::false_type {};
|
||||
|
||||
template< typename T, typename ... Args >
|
||||
struct is_forward_list< std::forward_list< T, Args... > > : std::true_type {};
|
||||
|
||||
template< typename T >
|
||||
constexpr bool is_forward_list_v= is_forward_list< T >::value;
|
||||
}
|
||||
}
|
||||
|
||||
namespace exports::type_traits
|
||||
{
|
||||
using namespace detail::type_traits::is_forward_list::exports;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user