std:: make_obj_using_allocator
From cppreference.net
C++
Memory management library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
헤더 파일에 정의됨
<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
을 통해 생성합니다.
다음과 동일함
return std::make_from_tuple<T>( std::uses_allocator_construction_args<T>(alloc, std::forward<Args>(args)...) );
목차 |
매개변수
| alloc | - | 사용할 할당자 |
| args | - | T의 생성자에 전달할 인수들 |
반환값
새로 생성된
T
타입의 객체입니다.
예외
T
의 생성자가 던질 수 있는 모든 예외를 던질 수 있으며, 일반적으로
std::bad_alloc
을 포함합니다.
예제
|
이 섹션은 불완전합니다
이유: 예제 없음 |
참고 항목
|
(C++20)
|
주어진 타입에 필요한 uses-allocator construction 방식에 맞는 인수 목록을 준비합니다
(function template) |
|
지정된 메모리 위치에서 uses-allocator construction 방식을 통해 주어진 타입의 객체를 생성합니다
(function template) |