std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>:: outermost , outermost-construct , outermost-destroy
From cppreference.net
<
cpp
|
memory
|
scoped allocator adaptor
C++
Memory management library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::scoped_allocator_adaptor
| Member functions | ||||
|
scoped_allocator_adaptor::outermost
scoped_allocator_adaptor::outermost-construct scoped_allocator_adaptor::outermost-destroy |
||||
| Non-member functions | ||||
|
(until C++20)
|
||||
| Deduction guides (C++17) |
|
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]
|
割り当てられたストレージに格納されたオブジェクトを破棄する
(関数テンプレート) |