Namespaces
Variants

std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>:: scoped_allocator_adaptor

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)
헤더에 정의됨 <scoped_allocator>
scoped_allocator_adaptor ( ) ;
(1) (C++11부터)
template < class OuterA2 >

scoped_allocator_adaptor (
OuterA2 && outerAlloc, const InnerAllocs & ... innerAllocs

) noexcept ;
(2) (C++11부터)
scoped_allocator_adaptor (

const scoped_allocator_adaptor & other

) noexcept ;
(3) (C++11부터)
scoped_allocator_adaptor (

scoped_allocator_adaptor && other

) noexcept ;
(4) (C++11부터)
template < class OuterA2 >

scoped_allocator_adaptor (
const scoped_allocator_adaptor < OuterA2, InnerAllocs... > & other

) noexcept ;
(5) (C++11부터)
template < class OuterA2 >

scoped_allocator_adaptor (
scoped_allocator_adaptor < OuterA2, InnerAllocs... > && other

) noexcept ;
(6) (C++11부터)
1) 기본 생성자: 값 초기화를 수행하여 OuterAlloc 기본 클래스와 구현에서 사용되는 경우 내부 할당자 멤버 객체를 초기화합니다.
2) 기본 클래스 OuterAlloc std:: forward < OuterA2 > ( outerAlloc ) 에서 구성하고, 내부 할당자를 innerAllocs... 로 구성합니다. 이 오버로드는 std:: is_constructible < OuterAlloc, OuterA2 > :: value true 인 경우에만 오버로드 해결에 참여합니다.
3) 복사 생성자: 각 할당자를 other 의 해당 할당자로부터 초기화합니다.
4) 이동 생성자: 각 할당자를 other 의 해당 할당자로부터 * this 로 이동합니다.
5) 각 할당자를 other 의 해당 할당자로부터 초기화합니다. 이 오버로드는 std:: is_constructible < OuterAlloc, const OuterA2 & > :: value true 인 경우에만 오버로드 해결에 참여합니다.
6) 각 할당자를 other 의 해당 할당자로부터 이동 의미론을 사용하여 초기화합니다. 이 오버로드는 std:: is_constructible < OuterAlloc, OuterA2 > :: value true 인 경우에만 오버로드 해결에 참여합니다.

매개변수

outerAlloc - 외부 할당자에 대한 생성자 인수
innerAllocs... - 내부 할당자들에 대한 생성자 인수들
other - 다른 std::scoped_allocator_adaptor

결함 보고서

다음의 동작 변경 결함 보고서들은 이전에 발표된 C++ 표준에 소급 적용되었습니다.

DR 적용 대상 게시된 동작 올바른 동작
LWG 2782 C++11 OuterA2 를 취하는 생성자가 제약되지 않아 메타프로그래밍에 간섭함 제약 조건 추가됨

참고 항목

외부 할당자를 사용하여 초기화되지 않은 저장 공간을 할당합니다
(public member function)
할당된 저장 공간에 객체를 생성하며, 적절한 경우 내부 할당자를 해당 생성자에 전달합니다
(public member function)