1
0
forked from Alepha/Alepha

I think this makes capabilities much simpler and more reliable.

But the capabilities are now limited to a single param -- Time to change that?
This commit is contained in:
2024-01-27 04:21:27 -05:00
parent e8b41a0116
commit 9c9ed65312
5 changed files with 57 additions and 81 deletions

View File

@ -6,6 +6,9 @@ static_assert( __cplusplus > 2020'99 );
#include <Alepha/Testing/TableTest.h>
#include <Alepha/Utility/evaluation_helpers.h>
#include <Alepha/Meta/find.h>
#include <Alepha/Meta/Container/vector.h>
namespace
{
using Alepha::Hydrogen::exports::types_m::argcnt_t;
@ -19,8 +22,8 @@ namespace
<
typename= int,
typename= Capabilities< comparable >,
typename= float,
typename= Capabilities< short >
typename= float//,
//typename= Capabilities< short >
>
struct Date_core
{
@ -43,8 +46,8 @@ namespace
static_assert( Meta::find_if( begin( vec ), end( vec ), Meta::bind1st( Meta::is_same, Meta::type_value< int >{} ) ) );
static_assert( not Meta::find_if( begin( vec ), end( vec ), Meta::bind1st( Meta::is_same, Meta::type_value< double >{} ) ) );
static_assert( detail::is_capability_list_v< Capabilities< comparable > > );
static_assert( Alepha::has_capability( Meta::type_value< Date >{}, comparable_capability ) );
//static_assert( detail::is_capability_list_v< Capabilities< comparable > > );
static_assert( Alepha::HasCapability< Date, Alepha::comparable > );
template< template< typename > class op, typename T >
constexpr bool