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