constexpr auto uses_allocator_construction_args( const Alloc& alloc,
constexpr auto uses_allocator_construction_args( const Alloc& alloc,
template< class T, class Alloc >
constexpr auto uses_allocator_construction_args( const Alloc& alloc ) noexcept;
constexpr auto uses_allocator_construction_args( const Alloc& alloc,
constexpr auto uses_allocator_construction_args( const Alloc& alloc,
constexpr auto uses_allocator_construction_args( const Alloc& alloc,
constexpr auto uses_allocator_construction_args( const Alloc& alloc,
constexpr auto uses_allocator_construction_args( const Alloc& alloc,
constexpr auto uses_allocator_construction_args( const Alloc& alloc,
Prepares the argument list needed to create an object of the given type T
by means of uses-allocator construction.
This overload participates in overload resolution only if
T
is not a specialization of
std::pair. Returns
std::tupledetermined as follows:
This overload participates in overload resolution only if
T
is a specialization of
std::pair. For
T
that is
std::pair<T1, T2>, equivalent to
3)This overload participates in overload resolution only if
T
is a specialization of
std::pair. Equivalent to
4)This overload participates in overload resolution only if
T
is a specialization of
std::pair. Equivalent to
5,6)This overload participates in overload resolution only if
T
is a specialization of
std::pair. Equivalent to
7,8)This overload participates in overload resolution only if
T
is a specialization of
std::pair. Equivalent to
9)This overload participates in overload resolution only if
T
is a specialization of
std::pair, and given the exposition-only function template
template<class A, class B> void /*deduce-as-pair*/(const std::pair<A, B>&);
, /*deduce-as-pair*/(non_pair) is ill-formed when considered as an unevaluated operand.
Let the exposition-only class pair-constructor
be defined as
This overload is equivalent to
return std::make_tuple(pair_construction);, where
pair_construction
is a value of type
pair-constructor
whose
alloc_
and
u_
members are
alloc
and
non_pair
respectively.
[edit] Parameters alloc - the allocator to use args - the arguments to pass toT
's constructor x - tuple of arguments to pass to the constructors of T
's first
data member y - tuple of arguments to pass to the constructors of T
's second
data member u - single argument to pass to the constructor of T
's first
data member v - single argument to pass to the constructor of T
's second
data member pr - a pair whose first
data member will be passed to the constructor of T
's first
data member and second
data member will be passed to the constructor of T
's second
data member non_pair - single argument to convert to a std::pair for further construction [edit] Return value
std::tuple of arguments suitable for passing to the constructor of T
.
The overloads (2-9) provide allocator propagation into std::pair, which supports neither leading-allocator nor trailing-allocator calling conventions (unlike, e.g. std::tuple, which uses leading-allocator convention).
When used in uses-allocator construction, the conversion function of pair-constructor
converts the provided argument to std::pair at first, and then constructs the result from that std::pair by uses-allocator construction.
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
DR Applied to Behavior as published Correct behavior LWG 3525 C++20 no overload could handle non-pair
types convertible to pair
reconstructing overload added [edit] See also
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4