tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
is_array.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_TYPE_TRAITS_IS_ARRAY_HPP
4#define TETL_TYPE_TRAITS_IS_ARRAY_HPP
5
8
9namespace etl {
10
16template <typename T>
17struct is_array : false_type { };
18
19template <typename T>
20struct is_array<T[]> : true_type { };
21
22template <typename T, size_t N>
23struct is_array<T[N]> : true_type { };
24
25template <typename T>
26inline constexpr bool is_array_v = is_array<T>::value;
27
28} // namespace etl
29
30#endif // TETL_TYPE_TRAITS_IS_ARRAY_HPP
Definition adjacent_find.hpp:8
constexpr bool is_array_v
Definition is_array.hpp:26
bool_constant< true > true_type
Definition bool_constant.hpp:13
bool_constant< false > false_type
Definition bool_constant.hpp:14
static constexpr bool value
Definition integral_constant.hpp:10
Checks whether T is an array type. Provides the member constant value which is equal to true,...
Definition is_array.hpp:17