list_get_allocator
list_get_allocator (std::list::get_allocator — 할당자 반환)
std::list에 연결된 할당자(allocator)를 반환하는 멤버 함수예요.
출처: cppreference
본문
시그니처는 다음과 같아요.
allocator_type get_allocator() const noexcept;
컨테이너에 연결된 할당자를 반환해요.
반환값
연결된 할당자.
복잡도
상수(constant)예요.
예제
#include <list>
int main()
{
std::list<int> l;
auto a = l.get_allocator();
// a로 원소 메모리를 할당할 수 있어요
}