allocate_shared
만든는 shared_ptr 개체에 할당 하 고 지정 된 할당자를 사용 하 여 특정된 형식에 대해 생성 됩니다.shared_ptr를 반환합니다.
template<class Type, class Allocator, class... Types>
shared_ptr<Type> allocate_shared(
Allocator _Alloc,
Types&&... _Args
);
매개 변수
_Alloc
할당 자가 개체를 만드는 데 사용 합니다._Args
개체 수는 0 개 이상의 인수입니다.
속성 값/반환 값
반환 된 shared_ptr 에 할당 된 개체를 가리킵니다.
설명
함수 개체를 만드는 shared_ptr<Type>, 포인터를 Type(_Args...) 할당 된 및에서 생성 된 _Alloc.
요구 사항
헤더: <memory>
네임 스페이스: std