aboutsummaryrefslogtreecommitdiff
path: root/src/conditional/if.h
blob: 29aa6f080b129133af742a2b064d1f41955ad715 (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 IfBranch,
	typename ElseBranch
>
using If = typename std::conditional<
	Condition,
	IfBranch,
	ElseBranch
>::type;

}

#endif  // TYPEASVALUE_SRC_CONDITIONAL_IF_H_