std::pmr::polymorphic_allocator<T>::allocate_object

Allocates storage for n objects of type U using the underlying memory resource.

# Declarations

template< class U >
U* allocate_object( std::size_t n = 1 );

(since C++20)

# Parameters

# Return value

A pointer to the allocated storage.

# Notes

This function was introduced for use with the fully-specialized allocator std::pmr::polymorphic_allocator<>, but it may be useful in any specialization as a shortcut to avoid having to rebind from std::pmr::polymorphic_allocator to std::pmr::polymorphic_allocator.

Since U is not deduced, it must be provided as a template argument when calling this function.

# See also