std:: uninitialized_construct_using_allocator
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
헤더에 정의됨
<memory>
|
||
|
template
<
class
T,
class
Alloc,
class
...
Args
>
constexpr
T
*
uninitialized_construct_using_allocator
(
T
*
p,
|
(C++20부터) | |
주어진 타입
T
의 객체를
uses-allocator construction
을 통해
p
로 표시된 초기화되지 않은 메모리 위치에 생성합니다.
다음과 동일함
return std::apply( [&]<class... Xs>(Xs&&...xs) { return std::construct_at(p, std::forward<Xs>(xs)...); }, std::uses_allocator_construction_args<T>(alloc, std::forward<Args>(args)...));
목차 |
매개변수
| p | - | 객체가 배치될 메모리 위치 |
| alloc | - | 사용할 할당자 |
| args | - | T의 생성자에 전달할 인수들 |
반환값
새로 생성된
T
타입 객체에 대한 포인터.
예외
T
의 생성자가 던질 수 있는 모든 예외를 던질 수 있으며, 일반적으로
std::bad_alloc
을 포함합니다.
예제
|
이 섹션은 불완전합니다
이유: 예제가 없음 |
참고 항목
|
(C++11)
|
지정된 타입이 uses-allocator construction을 지원하는지 확인합니다
(클래스 템플릿) |
|
(C++20)
|
uses-allocator construction 방식을 통해 주어진 타입의 객체를 생성합니다
(함수 템플릿) |