Skip to content

Allocators

Method
AllocatorAwareContainer
allocator_type get_allocator() const noexcept;

Return value

The associated allocator.

Complexity

\[ O(1) \]

Notes

This function returns the allocator of the underlying container.

Info

See the section on spatial map allocators for more information.

Example

1
2
3
4
5
#include <pareto/front.h>
// ...
pareto::front<double, 3, unsigned> pf;
// Get a copy of the container allocator
auto alloc = pf.get_allocator();