tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
remove_all_extents.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_REMOVE_ALL_EXTENTS_HPP
5#define TETL_TYPE_TRAITS_REMOVE_ALL_EXTENTS_HPP
6
7#include <etl/_cstddef/size_t.hpp>
8
9namespace etl {
10
11/// \brief If T is a multidimensional array of some type X, provides the member
12/// typedef type equal to X, otherwise type is T. The behavior of a program that
13/// adds specializations for remove_all_extents is undefined.
14template <typename T>
16 using type = T;
17};
18
19template <typename T>
20struct remove_all_extents<T[]> {
21 using type = typename remove_all_extents<T>::type;
22};
23
24template <typename T, size_t N>
25struct remove_all_extents<T[N]> {
26 using type = typename remove_all_extents<T>::type;
27};
28
29template <typename T>
30using remove_all_extents_t = typename remove_all_extents<T>::type;
31
32} // namespace etl
33
34#endif // TETL_TYPE_TRAITS_REMOVE_ALL_EXTENTS_HPP
Definition adjacent_find.hpp:9
If T is a multidimensional array of some type X, provides the member typedef type equal to X,...
Definition remove_all_extents.hpp:15