tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
enable_if.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_TYPE_TRAITS_ENABLE_IF_HPP
4#define TETL_TYPE_TRAITS_ENABLE_IF_HPP
5
6namespace etl {
10template <bool, typename Type = void>
11struct enable_if { };
12
13template <typename Type>
14struct enable_if<true, Type> {
15 using type = Type;
16};
17
18template <bool B, typename T = void>
20
21} // namespace etl
22
23#endif // TETL_TYPE_TRAITS_ENABLE_IF_HPP
Definition adjacent_find.hpp:8
typename enable_if< B, T >::type enable_if_t
Definition enable_if.hpp:19
Type type
Definition enable_if.hpp:15
Define a member typedef only if a boolean constant is true.
Definition enable_if.hpp:11