aboutsummaryrefslogtreecommitdiff
path: root/src/conditional/if.h
blob: b99f3995c4bce024e8543761fdb52be6714e98e1 (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 = std::conditional<
	Condition::value,
	TrueBranch,
	FalseBranch
>;

}

#endif  // TYPEASVALUE_SRC_CONDITIONAL_IF_H_