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
// SPDX-FileCopyrightText: Copyright (C) 2019 Tobias Hienzsch
3
4
#
ifndef
TETL_TYPE_TRAITS_ENABLE_IF_HPP
5
#
define
TETL_TYPE_TRAITS_ENABLE_IF_HPP
6
7
namespace
etl
{
8
/// Define a member typedef only if a boolean constant is true.
9
///
10
/// \include type_traits.cpp
11
template
<
bool
,
typename
Type =
void
>
12
struct
enable_if
{ };
13
14
template
<
typename
Type>
15
struct
enable_if
<
true
, Type> {
16
using
type = Type;
17
};
18
19
template
<
bool
B,
typename
T =
void
>
20
using
enable_if_t =
typename
enable_if
<B, T>::type;
21
22
}
// namespace etl
23
24
#
endif
// TETL_TYPE_TRAITS_ENABLE_IF_HPP
etl
Definition
adjacent_find.hpp:9
etl::enable_if
Define a member typedef only if a boolean constant is true.
Definition
enable_if.hpp:12
include
etl
_type_traits
enable_if.hpp
Generated on Sun Sep 7 2025 19:15:17 for tetl by
1.9.8