description | title | ms.date | f1_keywords | helpviewer_keywords | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Learn more about: in_place_t Struct, in_place_type_t Struct, in_place_index_t Struct |
in_place_t Struct, in_place_type_t Struct, in_place_index_t Struct |
11/04/2016 |
|
|
The empty structure type in_place_t
can be passed into constructors of expected
class, optional
class or single_view
class for in-place construction of the contained type. The empty structure type in_place_type_t
can be passed into constructors of any
class or variant
class to specify the type of the object. The empty structure type in_place_index_t
can be passed into constructors of variant
class to specify the index of the object.
struct in_place_t {
explicit in_place_t() = default;
};
inline constexpr in_place_t in_place{};
template <class T>
struct in_place_type_t {
explicit in_place_type_t() = default;
};
template <class T>
inline constexpr in_place_type_t<T> in_place_type{};
template <size_t I>
struct in_place_index_t {
explicit in_place_index_t() = default;
};
template <size_t I>
inline constexpr in_place_index_t<I> in_place_index{};