aboutsummaryrefslogtreecommitdiff
path: root/src/conditional/if.h
blob: 9be1a503e53696c1613072e36f74afe7dc320d8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef TYPEASVALUE_SRC_CONDITIONAL_IF_H_
#define TYPEASVALUE_SRC_CONDITIONAL_IF_H_

#include <type_traits>

namespace tav {

template <
	typename Condition,
	typename TrueBranch,
	typename FalseBranch
>
using If = Eval<std::conditional<
	Condition::value,
	TrueBranch,
	FalseBranch
>>;

}

#endif  // TYPEASVALUE_SRC_CONDITIONAL_IF_H_