tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
conditional.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_TYPE_TRAITS_CONDITIONAL_HPP
4#define TETL_TYPE_TRAITS_CONDITIONAL_HPP
5
6namespace etl {
7
10template <bool B, typename T, typename F>
12 using type = T;
13};
14
15template <typename T, typename F>
16struct conditional<false, T, F> {
17 using type = F;
18};
19
20template <bool B, typename T, typename F>
22
23} // namespace etl
24
25#endif // TETL_TYPE_TRAITS_CONDITIONAL_HPP
Definition adjacent_find.hpp:8
typename conditional< B, T, F >::type conditional_t
Definition conditional.hpp:21
F type
Definition conditional.hpp:17
Provides member typedef type, which is defined as T if B is true at compile time, or as F if B is fal...
Definition conditional.hpp:11
T type
Definition conditional.hpp:12