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.
15template <typename T>
16struct is_bounded_array : false_type { };
17
18template <typename T, size_t N>
19struct is_bounded_array<T[N]> : true_type { };
20
21template <typename T>
22inline constexpr bool is_bounded_array_v = is_bounded_array<T>::value;
23
24} // namespace etl
25
26#endif // TETL_TYPE_TRAITS_IS_BOUNDED_ARRAY_HPP
Definition adjacent_find.hpp:9
constexpr bool is_bounded_array_v
Definition is_bounded_array.hpp:22
Checks whether T is an array type of known bound. Provides the member constant value which is equal t...
Definition is_bounded_array.hpp:16