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
11namespace 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.
18template <typename T>
19struct is_arithmetic : bool_constant<is_integral_v<T> or is_floating_point_v<T>> { };
20
21template <typename T>
23
24} // namespace etl
25
26#endif // TETL_TYPE_TRAITS_IS_ARITHMETIC_HPP
Definition adjacent_find.hpp:9
constexpr bool is_arithmetic_v
Definition is_arithmetic.hpp:22