tetl
0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
in_place_index.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_UTILITY_IN_PLACE_INDEX_HPP
5
#
define
TETL_UTILITY_IN_PLACE_INDEX_HPP
6
7
#
include
<
etl
/
_cstddef
/
size_t
.
hpp
>
8
9
namespace
etl
{
10
11
/// \brief Disambiguation tags that can be passed to the constructors of
12
/// etl::optional, etl::variant, and etl::any to indicate that the contained
13
/// object should be constructed in-place, and (for the latter two) the type of
14
/// the object to be constructed.
15
///
16
/// \details The corresponding type/type templates etl::in_place_t,
17
/// etl::in_place_type_t and etl::in_place_index_t can be used in the
18
/// constructor's parameter list to match the intended tag.
19
template
<size_t I>
20
struct
in_place_index_t
{
21
explicit
in_place_index_t
() =
default
;
22
};
23
24
/// \relates in_place_index_t
25
template
<
size_t
I
>
26
inline
constexpr
auto
in_place_index
=
in_place_index_t
<
I
>{};
27
28
}
// namespace etl
29
30
#
endif
// TETL_UTILITY_IN_PLACE_INDEX_HPP
etl
Definition
adjacent_find.hpp:9
etl::in_place_index_t
Disambiguation tags that can be passed to the constructors of etl::optional, etl::variant,...
Definition
in_place_index.hpp:20
etl::in_place_index_t::in_place_index
constexpr auto in_place_index
Definition
in_place_index.hpp:26
etl::in_place_index_t::in_place_index_t
in_place_index_t()=default
include
etl
_utility
in_place_index.hpp
Generated on Sun Sep 7 2025 19:15:18 for tetl by
1.9.8