std:: allocator_arg, std:: allocator_arg_t
From cppreference.net
C++
Memory management library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
定義済みヘッダー
<memory>
|
||
|
struct
allocator_arg_t
{
explicit
allocator_arg_t
(
)
=
default
;
}
;
|
(1) | (C++11以降) |
|
constexpr
std::
allocator_arg_t
allocator_arg
{
}
;
|
(2) |
(C++11以降)
(C++17以降インライン) |
1)
std::allocator_arg_t
は、アロケータ対応オブジェクトのコンストラクタおよびメンバ関数のオーバーロードを区別するために使用される空のクラス型です。これには、
std::tuple
、
std::function
、
std::packaged_task
、
(C++17まで)
および
std::promise
が含まれます。
欠陥報告
以下の動作変更の欠陥報告書は、以前に公開されたC++規格に対して遡及的に適用されました。
| DR | Applied to | Behavior as published | Correct behavior |
|---|---|---|---|
| LWG 2510 | C++11 | デフォルトコンストラクタが非explicitであり、曖昧さを引き起こす可能性があった | explicitに変更 |
関連項目
|
(C++11)
|
指定された型がuses-allocator構築をサポートするかどうかをチェックする
(クラステンプレート) |