ECSTASY
All in the name
Loading...
Searching...
No Matches
Condition.hpp
Go to the documentation of this file.
1
11
12#ifndef ECSTASY_QUERY_CONCEPTS_CONDITION_HPP_
13#define ECSTASY_QUERY_CONCEPTS_CONDITION_HPP_
14
16
18{
34 template <typename C>
35 concept QCondition = requires(C &condition) { requires std::derived_from<C, ecstasy::query::ConditionBase>; };
36
46 template <typename C>
47 concept QConditionConst = requires(C &condition) {
48 requires QCondition<C>;
49
50 // clang-format off
51 { C::test() } -> std::same_as<bool>;
52 // clang-format on
53 };
54
64 template <typename C>
65 concept QConditionLeft = requires(C &condition, const typename C::Left &left) {
66 requires QCondition<C>;
67
68 typename C::Left;
69
70 // clang-format off
71 { C::test(left) } -> std::same_as<bool>;
72 // clang-format on
73 };
74
84 template <typename C>
85 concept QConditionRight = requires(C &condition, const typename C::Right &right) {
86 requires QCondition<C>;
87
88 typename C::Right;
89
90 // clang-format off
91 { C::test(right) } -> std::same_as<bool>;
92 // clang-format on
93 };
94
104 template <typename C>
105 concept QConditionLeftRight = requires(C &condition, const typename C::Left &left, const typename C::Right &right) {
106 requires QCondition<C>;
107
108 typename C::Left;
109 typename C::Right;
110
111 // clang-format off
112 { C::test(left, right) } -> std::same_as<bool>;
113 // clang-format on
114 };
115} // namespace ecstasy::query
116
117#endif /* !ECSTASY_QUERY_CONCEPTS_CONDITION_HPP_ */
Condition with two constant operands.
Definition Condition.hpp:47
Query Condition concept.
Definition Condition.hpp:35
Condition with a runtime left operand and a constant right operand.
Definition Condition.hpp:65
Condition with two runtime operands.
Condition with a constant left operand and a runtime right operand.
Definition Condition.hpp:85
Contains the condition resolution structures.
Namespace regrouping the internal ecstasy query system.
Definition Condition.hpp:18