aboutsummaryrefslogtreecommitdiff
path: root/src/conditional/if.h
blob: b9568f6206e02e807054a0ebcdd4ea5ee11a214d (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 <
	bool     Condition,
	typename TrueBranch,
	typename FalseBranch
>
using If = typename std::conditional<
	Condition,
	TrueBranch,
	FalseBranch
>::type;

}

#endif  // TYPEASVALUE_SRC_CONDITIONAL_IF_H_