forked from Alepha/Alepha
Capabilities clauses can now be repeated.
This commit is contained in:
27
Capabilities.test/0.cc
Normal file
27
Capabilities.test/0.cc
Normal file
@ -0,0 +1,27 @@
|
||||
static_assert( __cplusplus > 2020'99 );
|
||||
|
||||
#include "../Capabilities.h"
|
||||
|
||||
#include <Alepha/Testing/test.h>
|
||||
#include <Alepha/Testing/TableTest.h>
|
||||
|
||||
|
||||
namespace
|
||||
{
|
||||
using namespace Alepha::exports::Capabilities_m;
|
||||
|
||||
struct capability_demo {};
|
||||
struct missing_capability_demo {};
|
||||
template< typename= Capabilities< capability_demo > >
|
||||
struct Example_base {};
|
||||
using Example= Example_base<>;
|
||||
static_assert( HasCapability< Example, capability_demo > == true );
|
||||
static_assert( HasCapability< Example, missing_capability_demo > == false );
|
||||
template< HasCapability< missing_capability_demo > C >
|
||||
void f( C ) {}
|
||||
}
|
||||
|
||||
|
||||
static auto init= Alepha::Utility::enroll <=[]
|
||||
{
|
||||
};
|
1
Capabilities.test/CMakeLists.txt
Normal file
1
Capabilities.test/CMakeLists.txt
Normal file
@ -0,0 +1 @@
|
||||
unit_test( 0 )
|
Reference in New Issue
Block a user