set_get_allocator

set_get_allocator (std::set::get_allocator — 할당자 반환)

std::set에 연결된 할당자(allocator)를 반환하는 멤버 함수예요.

출처: cppreference

본문

시그니처는 다음과 같아요.

allocator_type get_allocator() const noexcept;

컨테이너에 연결된 할당자를 반환해요.

반환값

연결된 할당자.

복잡도

상수(constant)예요.

예제

#include <set>
int main()
{
    std::set<int> s;
    auto a = s.get_allocator();
}

더 알아보기 (Learn more)

cppreference