C++ Unordered_set Library - get_allocator



Description

It returns the allocator object used to construct the container.

Declaration

Following is the declaration for std::unordered_set::get_allocator.

C++11

allocator_type get_allocator() const noexcept;

Parameters

none

Return value

It returns the allocator.

Exceptions

Exception is thrown if any element comparison object throws exception.

Please note that invalid arguments cause undefined behavior.

Time complexity

constant time.

unordered_set.htm
Advertisements