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

Header: <utility>

1,3,5) The 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.

# Declarations

struct in_place_t { explicit in_place_t() = default; };

(since C++17)

inline constexpr std::in_place_t in_place {};

(since C++17)

template< class T >
struct in_place_type_t { explicit in_place_type_t() = default; };

(since C++17)

template< class T >
constexpr std::in_place_type_t<T> in_place_type {};

(since C++17)

template< std::size_t I >
struct in_place_index_t { explicit in_place_index_t() = default; };

(since C++17)

template< std::size_t I >
constexpr std::in_place_index_t<I> in_place_index {};

(since C++17)

# See also