tetl
0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
at.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSL-1.0
2
// SPDX-FileCopyrightText: Copyright (C) 2024 Tobias Hienzsch
3
4
#
ifndef
TETL_MPL_AT_HPP
5
#
define
TETL_MPL_AT_HPP
6
7
#
include
<
etl
/
_cstddef
/
size_t
.
hpp
>
8
#
include
<
etl
/
_mpl
/
list
.
hpp
>
9
10
namespace
etl
::
mpl
{
11
12
/// \ingroup mpl
13
/// @{
14
15
template
<
etl
::size_t I,
typename
List>
16
struct
at;
17
18
template
<
typename
Head,
typename
... Tail>
19
struct
at<0,
list
<Head, Tail...>> {
20
using
type = Head;
21
};
22
23
template
<
etl
::size_t I,
typename
Head,
typename
... Tail>
24
struct
at<I,
list
<Head, Tail...>> {
25
using
type =
typename
at<I - 1,
list
<Tail...>>::type;
26
};
27
28
template
<
etl
::size_t I,
typename
List>
29
using
at_t =
typename
at<I, List>::type;
30
31
/// @}
32
33
}
// namespace etl::mpl
34
35
#
endif
// TETL_MPL_AT_HPP
etl::mpl
Definition
at.hpp:10
etl
Definition
adjacent_find.hpp:9
etl::mpl::list
Definition
list.hpp:11
include
etl
_mpl
at.hpp
Generated on Sat Sep 20 2025 23:50:56 for tetl by
1.9.8