std::in_place,std::in_place_type,std::in_place_index,std::in_place_t, (3) - Linux Manuals
std::in_place,std::in_place_type,std::in_place_index,std::in_place_t,: std::in_place,std::in_place_type,std::in_place_index,std::in_place_t,
NAME
std::in_place,std::in_place_type,std::in_place_index,std::in_place_t, - std::in_place,std::in_place_type,std::in_place_index,std::in_place_t,
Synopsis
Defined in header
struct in_place_t
explicit in_place_t()
};
inline constexpr in_place_t in_place{};
template
explicit in_place_type_t()
};
template
inline constexpr in_place_type_t<T>
template
explicit in_place_index_t()
};
template
inline constexpr in_place_index_t<I>
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
latter two)
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.
See also
optional a wrapper that may or may not hold an object
(C++17)
variant
(C++17)
any
(C++17)