std::allocator_arg, std::allocator_arg_t
From cppreference.com
| ヘッダ <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 | 適用対象 | 公開された動作 | 正しい動作 |
|---|---|---|---|
| LWG 2510 | C++11 | デフォルトコンストラクタが非明示的であり、曖昧さを引き起こす可能性がありました | 明示的にされました |
[編集] 関連項目
| (C++11) |
指定された型が uses-allocator 構築をサポートしているかどうかをチェックします (クラステンプレート) |