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

履歴 編集

function template
<execution>

std::execution::call-with-default(C++26)

template<class Fn, class Default, class... Args>
  constexpr decltype(auto) call-with-default(
    Fn&& fn, Default&& value, Args&&... args) noexcept(see below);

概要

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

説明用の式exprを、適格であるならばstd::forward<Fn>(fn)(std::forward<Args>(args)...)とする。そうでなければ、static_cast<Default>(std::forward<Default>(value))とする。

戻り値

exprを返す。

備考

noexcept節の式はnoexcept(expr)となる。

バージョン

言語

  • C++26

関連項目

参照