std::allocator<T>::construct

Header: <memory>

Constructs an object of type T in allocated uninitialized storage pointed to by p, using global placement-new.

# Declarations

void construct( pointer p, const_reference val );

(until C++11)

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

(since C++11) (deprecated in C++17) (removed in C++20)

# Parameters

# Return value

(none)

# Defect reports

DRApplied toBehavior as publishedCorrect behavior
LWG 402C++98if T::operator new exists, the program might be ill-formeduses global replacement-new instead

# See also