get_allocator
描述 (Description)
它返回用于构造容器的allocator对象。
声明 (Declaration)
以下是std :: unordered_set :: get_allocator的声明。
C++11
allocator_type get_allocator() const noexcept;
参数 (Parameters)
没有
返回值
它返回分配器。
异常 (Exceptions)
如果任何元素比较对象抛出异常,则抛出异常。
请注意,无效参数会导致未定义的行为。
时间复杂
恒定时间。