Namespaces
Variants

std:: make_obj_using_allocator

From cppreference.net
Memory management library
( exposition only* )
Allocators
Uninitialized memory algorithms
Constrained uninitialized memory algorithms
Memory resources
Uninitialized storage (until C++20)
( until C++20* )
( until C++20* )
( until C++20* )

Garbage collector support (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
헤더 파일에 정의됨 <memory>
template < class T, class Alloc, class ... Args >
constexpr T make_obj_using_allocator ( const Alloc & alloc, Args && ... args ) ;
(C++20 이후)

주어진 타입 T 의 객체를 uses-allocator construction 을 통해 생성합니다.

다음과 동일함

목차

매개변수

alloc - 사용할 할당자
args - T의 생성자에 전달할 인수들

반환값

새로 생성된 T 타입의 객체입니다.

예외

T 의 생성자가 던질 수 있는 모든 예외를 던질 수 있으며, 일반적으로 std::bad_alloc 을 포함합니다.

예제

참고 항목

주어진 타입에 필요한 uses-allocator construction 방식에 맞는 인수 목록을 준비합니다
(function template)
지정된 메모리 위치에서 uses-allocator construction 방식을 통해 주어진 타입의 객체를 생성합니다
(function template)