最終更新日時(UTC):
が更新

履歴 編集

function template
<execution>

std::execution::allocator-aware-forward(C++26)

template<class T, class Context>
decltype(auto) allocator-aware-forward(T&& obj, Context&& context);

概要

allocator-aware-forwardは、Senderアルゴリズム動作仕様定義で用いられる説明専用の関数テンプレートである。

アロケータの利用可否に応じて、objからT型の新規オブジェクトを作成するか、objを転送する。 contextに関連付けられた環境がアロケータを提供する(つまり、式get_allocator(get_env(context))が有効である)とき、同式の結果をalloc、型Premove_cvref_t<T>とする。

戻り値

バージョン

言語

  • C++26

関連項目

参照