tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
is_fundamental.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_FUNDAMENTAL_HPP
5#define TETL_TYPE_TRAITS_IS_FUNDAMENTAL_HPP
6
7#include <etl/_type_traits/bool_constant.hpp>
8#include <etl/_type_traits/is_arithmetic.hpp>
9#include <etl/_type_traits/is_null_pointer.hpp>
10#include <etl/_type_traits/is_void.hpp>
11
12namespace etl {
13
14/// \brief If T is a fundamental type (that is, arithmetic type, void, or
15/// nullptr_t), provides the member constant value equal true. For any other
16/// type, value is false.
17template <typename T>
18struct is_fundamental : bool_constant<is_arithmetic_v<T> or is_void_v<T> or is_null_pointer_v<T>> { };
19
20template <typename T>
21inline constexpr bool is_fundamental_v = is_fundamental<T>::value;
22
23} // namespace etl
24
25#endif // TETL_TYPE_TRAITS_IS_FUNDAMENTAL_HPP
Definition adjacent_find.hpp:9
constexpr bool is_fundamental_v
Definition is_fundamental.hpp:21