Given an allocator type A
and given a container type X having a value_type identical to T
and an allocator_type identical to allocator_traits<A>::rebind_alloc<T>
and given an lvalue m of type A,
a pointer p of type T*,
an expression v of type T or const T,
and an rvalue rv of type T,
the following terms are defined.
If X
is not allocator-aware or is a specialization of basic_string,
the terms below are defined as if A were
allocator<T> — no allocator object needs to be created
and user specializations of allocator<T> are not instantiated:
An element of X is default-inserted if it is initialized
by evaluation of the expression
allocator_traits<A>::construct(m, p)
where p is the address of the uninitialized storage for the element
allocated within X.
T is Cpp17MoveInsertable into X
means that the following expression
is well-formed:
allocator_traits<A>::construct(m, p, rv)
and its evaluation causes the following postcondition to hold: The value
of *p is equivalent to the value of rv before the evaluation.
T is Cpp17CopyInsertable into X
means that, in addition to T being Cpp17MoveInsertable into
X, the following expression is well-formed:
allocator_traits<A>::construct(m, p, v)
and its evaluation causes the following postcondition to hold:
The value of v is unchanged and is equivalent to *p.
T is
Cpp17EmplaceConstructible into X from args,
for zero
or more arguments args, means that the following expression is well-formed:
allocator_traits<A>::construct(m, p, args)
A type X meets the allocator-aware container requirements
if X meets the container requirements and
the following types, statements, and expressions are well-formed and have
the specified semantics.
Postconditions: u has the same elements as rv had before this construction;
the value of u.get_allocator() is the same as
the value of rv.get_allocator() before this construction.
Preconditions: If
allocator_traits<allocator_type>::propagate_on_container_move_assignment::value
is false,
T is Cpp17MoveInsertable into X and
Cpp17MoveAssignable.