blob: c543449d94f3edfec7ba40847d30e443db204a0e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#ifndef TYPEASVALUE_SRC_CONDITIONAL_COND_H_
#define TYPEASVALUE_SRC_CONDITIONAL_COND_H_
#include "type.h"
#include "list/cons.h"
#include "list/detail/find_variadic.h"
namespace tav {
namespace detail {
template <typename Pair>
using cond_predicate = IsTrue<Car<Pair>>;
}
template <typename... Branches>
using Cond = Cdr<Eval<
detail::find_variadic<detail::cond_predicate, Branches...>
>>;
}
#endif // TYPEASVALUE_SRC_CONDITIONAL_COND_H_
|