tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
in_place.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_HPP
5#define TETL_UTILITY_IN_PLACE_HPP
6
7#include <etl/_cstddef/size_t.hpp>
8
9namespace etl {
10
11/// \brief Disambiguation tags that can be passed to the constructors of
12/// `optional`, `variant`, and `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/// The corresponding type/type templates `in_place_t`, `in_place_type_t`
17/// and `in_place_index_t` can be used in the constructor's parameter list to
18/// match the intended tag.
19///
20/// \headerfile etl/utility.hpp
21struct in_place_t {
22 explicit in_place_t() = default;
23};
24
25/// \relates in_place_t
26inline constexpr auto in_place = in_place_t{};
27
28} // namespace etl
29
30#endif // TETL_UTILITY_IN_PLACE_HPP
Definition adjacent_find.hpp:9
Disambiguation tags that can be passed to the constructors of optional, variant, and any to indicate ...
Definition in_place.hpp:21
in_place_t()=default
constexpr auto in_place
Definition in_place.hpp:26