tetl
0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
in_place_type.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSL-1.0
2
// SPDX-FileCopyrightText: Copyright (C) 2021 Tobias Hienzsch
3
4
#
ifndef
TETL_UTILITY_IN_PLACE_TYPE_HPP
5
#
define
TETL_UTILITY_IN_PLACE_TYPE_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
<
typename
T>
20
struct
in_place_type_t
{
21
explicit
in_place_type_t
() =
default
;
22
};
23
24
/// \relates in_place_type_t
25
template
<
typename
T
>
26
inline
constexpr
auto
in_place_type
=
in_place_type_t
<
T
>{};
27
28
}
// namespace etl
29
30
#
endif
// TETL_UTILITY_IN_PLACE_TYPE_HPP
etl
Definition
adjacent_find.hpp:9
etl::in_place_type_t
Disambiguation tags that can be passed to the constructors of etl::optional, etl::variant,...
Definition
in_place_type.hpp:20
etl::in_place_type_t::in_place_type_t
in_place_type_t()=default
etl::in_place_type_t::in_place_type
constexpr auto in_place_type
Definition
in_place_type.hpp:26
include
etl
_utility
in_place_type.hpp
Generated on Sun Sep 7 2025 19:15:18 for tetl by
1.9.8