12 #include <type_traits>
15 namespace ActsFatras {
19 template <
bool Initial,
typename Combine,
typename... Selectors>
21 static_assert(0
u <
sizeof...(Selectors),
22 "Must combine at least one selector");
31 template <
typename... Ts>
34 (
true && ... && std::is_same_v<
bool, decltype(Selectors()(things...))>),
35 "Not all selectors conform to the expected interface (bool)(const "
37 return impl(std::index_sequence_for<Selectors...>(), things...);
42 std::tuple_element_t<
I, std::tuple<Selectors...>> &
get() {
46 template <
typename Selector>
54 template <std::size_t... Is,
typename... Ts>
55 bool impl(std::index_sequence<Is...> ,
const Ts &...things)
const {
61 for (
bool value : status) {
62 ret = combine(ret,
value);