tetl
0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
is_arithmetic.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_IS_ARITHMETIC_HPP
5
#
define
TETL_TYPE_TRAITS_IS_ARITHMETIC_HPP
6
7
#
include
<
etl
/
_type_traits
/
bool_constant
.
hpp
>
8
#
include
<
etl
/
_type_traits
/
is_floating_point
.
hpp
>
9
#
include
<
etl
/
_type_traits
/
is_integral
.
hpp
>
10
11
namespace
etl
{
12
13
/// \brief If T is an arithmetic type (that is, an integral type or a
14
/// floating-point type) or a cv-qualified version thereof, provides the member
15
/// constant value equal true. For any other type, value is false. The behavior
16
/// of a program that adds specializations for is_arithmetic or is_arithmetic_v
17
/// (since C++17) is undefined.
18
template
<
typename
T>
19
struct
is_arithmetic : bool_constant<is_integral_v<T>
or
is_floating_point_v<T>> { };
20
21
template
<
typename
T
>
22
inline
constexpr
bool
is_arithmetic_v
=
is_integral_v
<
T
>
or
is_floating_point_v
<
T
>;
23
24
}
// namespace etl
25
26
#
endif
// TETL_TYPE_TRAITS_IS_ARITHMETIC_HPP
etl
Definition
adjacent_find.hpp:9
etl::is_arithmetic_v
constexpr bool is_arithmetic_v
Definition
is_arithmetic.hpp:22
include
etl
_type_traits
is_arithmetic.hpp
Generated on Sun Sep 7 2025 19:15:17 for tetl by
1.9.8