Skip to content

Commit 2c31306

Browse files
committed
🚸 Add concept for runtime predicate
1 parent a987782 commit 2c31306

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

include/cib/detail/runtime_conditional.hpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <cib/detail/extend.hpp>
66

77
#include <stdx/compiler.hpp>
8+
#include <stdx/concepts.hpp>
89
#include <stdx/ct_format.hpp>
910
#include <stdx/tuple.hpp>
1011
#include <stdx/tuple_algorithms.hpp>
@@ -47,7 +48,11 @@ struct runtime_conditional : config_item {
4748
}
4849
};
4950

50-
template <stdx::ct_string Name, typename... Ps> // FIXME: concept for Ps
51+
template <typename T>
52+
concept runtime_predicate =
53+
std::default_initializable<T> and stdx::predicate<T>;
54+
55+
template <stdx::ct_string Name, runtime_predicate... Ps>
5156
struct runtime_condition {
5257
constexpr static auto predicates = stdx::make_tuple(Ps{}...);
5358

0 commit comments

Comments
 (0)