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
/// \ingroup type_traits
12
template
<
bool
,
typename
Type =
void
>
13
struct
enable_if
{ };
14
15
template
<
typename
Type>
16
struct
enable_if
<
true
, Type> {
17
using
type = Type;
18
};
19
20
/// \ingroup type_traits
21
template
<
bool
B,
typename
T =
void
>
22
using
enable_if_t =
typename
enable_if
<B, T>::type;
23
24
}
// namespace etl
25
26
#
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:13
include
etl
_type_traits
enable_if.hpp
Generated on Sat Sep 20 2025 23:50:58 for tetl by
1.9.8