|
5 | 5 | #define _NBL_BUILTIN_HLSL_CONCEPTS_INCLUDED_
|
6 | 6 |
|
7 | 7 |
|
| 8 | +#include <nbl/builtin/hlsl/concepts/impl/base.hlsl> |
8 | 9 | #include <nbl/builtin/hlsl/cpp_compat/vector.hlsl>
|
9 | 10 | #include <nbl/builtin/hlsl/cpp_compat/matrix.hlsl>
|
10 | 11 | #include <nbl/builtin/hlsl/utility.hlsl>
|
@@ -37,15 +38,9 @@ namespace concepts
|
37 | 38 | //! Now diverge
|
38 | 39 | #ifdef __cpp_concepts
|
39 | 40 |
|
40 |
| - |
41 |
| -// to define a concept using `concept Name = SomeContexprBoolCondition<T>;` |
42 |
| -#define NBL_BOOL_CONCEPT concept |
43 |
| - |
44 | 41 | // for struct definitions, use instead of closing `>` on the primary template parameter list
|
45 | 42 | #define NBL_PRIMARY_REQUIRES(...) > requires (__VA_ARGS__)
|
46 | 43 |
|
47 |
| -// to put right before the closing `>` of the primary template definition, otherwise `NBL_PARTIAL_REQUIRES` wont work on specializations |
48 |
| -#define NBL_STRUCT_CONSTRAINABLE |
49 | 44 | // NOTE: C++20 requires and C++11 enable_if have to be in different places! ITS OF UTTMOST IMPORTANCE YOUR REQUIRE CLAUSES ARE IDENTICAL FOR BOTH MACROS
|
50 | 45 | // put just after the closing `>` on the partial template specialization `template` declaration e.g. `template<typename U, typename V, typename T> NBL_PARTIAL_REQ_TOP(SomeCond<U>)
|
51 | 46 | #define NBL_PARTIAL_REQ_TOP(...) requires (__VA_ARGS__)
|
@@ -79,14 +74,9 @@ concept NBL_CONCEPT_NAME = requires BOOST_PP_EXPR_IF(LOCAL_PARAM_COUNT,(BOOST_PP
|
79 | 74 |
|
80 | 75 | #else
|
81 | 76 |
|
82 |
| -// to define a concept using `concept Name = SomeContexprBoolCondition<T>;` |
83 |
| -#define NBL_BOOL_CONCEPT NBL_CONSTEXPR bool |
84 |
| - |
85 | 77 | // for struct definitions, use instead of closing `>` on the primary template parameter list
|
86 | 78 | #define NBL_PRIMARY_REQUIRES(...) ,typename __requires=::nbl::hlsl::enable_if_t<(__VA_ARGS__),void> >
|
87 | 79 |
|
88 |
| -// to put right before the closing `>` of the primary template definition, otherwise `NBL_PARTIAL_REQUIRES` wont work on specializations |
89 |
| -#define NBL_STRUCT_CONSTRAINABLE ,typename __requires=void |
90 | 80 | // NOTE: C++20 requires and C++11 enable_if have to be in different places! ITS OF UTTMOST IMPORTANCE YOUR REQUIRE CLAUSES ARE IDENTICAL FOR BOTH MACROS
|
91 | 81 | // put just after the closing `>` on the partial template specialization `template` declaration e.g. `template<typename U, typename V, typename T> NBL_PARTIAL_REQ_TOP(SomeCond<U>)
|
92 | 82 | #define NBL_PARTIAL_REQ_TOP(...)
|
|
0 commit comments