std::in_place, std::in_place_type, std::in_place_index, std::in_place_t, std::in_place_type_t, std::in_place_index_t
| Defined in header <utility>
|
||
| struct in_place_t { explicit in_place_t() = default; |
(since C++17) | |
| template< class T > struct in_place_type_t { |
(since C++17) | |
| template< std::size_t I > struct in_place_index_t { |
(since C++17) | |
std::in_place, std::in_place_type, and std::in_place_index are disambiguation tags that can be passed to the constructors of std::optional, std::variant, and std::any to indicate that the contained object should be constructed in-place, and (for the latter two) the type of the object to be constructed.
The corresponding type/type templates std::in_place_t, std::in_place_type_t and std::in_place_index_t can be used in the constructor's parameter list to match the intended tag.
[edit] See also
| (C++17) |
a wrapper that may or may not hold an object (class template) |
| (C++17) |
a type-safe discriminated union (class template) |
| (C++17) |
Objects that hold instances of any CopyConstructible type. (class) |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
