std::experimental::pmr::polymorphic_allocator<T>::construct

Constructs an object in allocated, but not initialized storage pointed to by p the provided constructor arguments. If the object is of type that itself uses allocators, or if it is std::pair, passes this->resource() down to the constructed object.

# Declarations

template< class U, class... Args >
void construct( U* p, Args&&... args );

(library fundamentals TS)

template< class T1, class T2, class... Args1, class... Args2 >
void construct( std::pair<T1, T2>* p,
std::piecewise_construct_t,
std::tuple<Args1...> x,
std::tuple<Args2...> y );

(library fundamentals TS)

template< class T1, class T2 >
void construct( std::pair<T1, T2>* p );

(library fundamentals TS)

template< class T1, class T2, class U, class V >
void construct( std::pair<T1, T2>* p, U&& x, V&& y );

(library fundamentals TS)

template< class T1, class T2, class U, class V >
void construct( std::pair<T1, T2>* p, const std::pair<U, V>& xy );

(library fundamentals TS)

template< class T1, class T2, class U, class V >
void construct( std::pair<T1, T2>* p, std::pair<U, V>&& xy );

(library fundamentals TS)

# Parameters

# Return value

(none)

# Notes

This function is called (through std::allocator_traits) by any allocator-aware object, such as std::vector, that was given a std::polymorphic_allocator as the allocator to use. Since memory_resource* implicitly converts to polymorphic_allocator, the memory resource pointer will propagate to any allocator-aware subobjects using polymorphic allocators.

# See also