C++ concepts: CopyInsertable
From cppreference.com
Specifies that an instance of the type can be copy-constructed in-place, in uninitialized storage.
[edit] Requirements
The type T
is CopyInsertable
into the container X
if, given
A
|
the allocator type defined as X::allocator_type
|
m
|
the lvalue of type A obtained from X::get_allocator()
|
p
|
the pointer of type T* prepared by the container
|
v
|
expression of type T , provided as the argument to push_back(), etc
|
- The type
T
satisfiesMoveInsertable
, and the following expression is well-formed:
std::allocator_traits<A>::construct(m, p, v);
And after evaluation, the value of *p is equivalent to the value of v. The value of v is unchanged.
[edit] Notes
If A
is std::allocator<T>, then this will call placement-new, as by ::new((void*)p) T(v)