tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
is_bounded_array.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_BOUNDED_ARRAY_HPP
5#define TETL_TYPE_TRAITS_IS_BOUNDED_ARRAY_HPP
6
7#include <etl/_cstddef/size_t.hpp>
8#include <etl/_type_traits/bool_constant.hpp>
9
10namespace etl {
11
12/// \brief Checks whether T is an array type of known bound. Provides the member
13/// constant value which is equal to true, if T is an array type of known bound.
14/// Otherwise, value is equal to false.
15///
16/// \ingroup type_traits
17template <typename T>
18struct is_bounded_array : false_type { };
19
20template <typename T, size_t N>
21struct is_bounded_array<T[N]> : true_type { };
22
23/// \ingroup type_traits
24template <typename T>
25inline constexpr bool is_bounded_array_v = is_bounded_array<T>::value;
26
27} // namespace etl
28
29#endif // TETL_TYPE_TRAITS_IS_BOUNDED_ARRAY_HPP
constexpr bool is_bounded_array_v
Definition is_bounded_array.hpp:25
Definition adjacent_find.hpp:9
Checks whether T is an array type of known bound. Provides the member constant value which is equal t...
Definition is_bounded_array.hpp:18