Namespaces
Variants

std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>:: outermost , outermost-construct , outermost-destroy

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)
template < class Alloc >
/* 未指定 */ /*outermost*/ ( Alloc && alloc = * this ) ;
(1) ( 説明専用* )
template < class T, class ... Args >
void /*outermost-construct*/ ( T * p, Args && ... args ) ;
(2) ( 説明専用* )
template < class T >
void /*outermost-destroy*/ ( T * p ) ;
(3) ( 説明専用* )

これらの説明専用のヘルパーメンバー関数テンプレートは、メンバー関数 construct() および destroy() で使用されます。

1) alloc の最外側アロケータを取得する。
  • alloc. outer_allocator ( ) が有効な場合、 outermost  ( alloc. outer_allocator ( ) ) を返す。
  • それ以外の場合、 alloc を返す。
2,3) オブジェクトを * this の最外層アロケータを使用して構築または破棄します。
std:: allocator_traits < std:: remove_reference_t < decltype ( outermost  ( ) ) >> outermost_traits として与えられた場合:
2) 次と等価: outermost_traits :: construct ( outermost  ( ) , p, std:: forward < Args > ( args ) ... ) ;
3) 次と同等: outermost_traits :: destroy ( outermost  ( ) , p ) ; .

欠陥報告

以下の動作変更の欠陥報告書は、以前に公開されたC++規格に対して遡及的に適用されました。

DR 適用対象 公開時の動作 正しい動作
LWG 3116 C++11 outermost の再帰条件は「 alloc
がメンバ関数 outer_allocator() を持つ」であった
「式
alloc. outer_allocator ( ) が有効である」に変更

関連項目

[static]
割り当てられたストレージ内でオブジェクトを構築する
(関数テンプレート)
[static]
割り当てられたストレージに格納されたオブジェクトを破棄する
(関数テンプレート)