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

履歴 編集

class template
<execution>

std::execution::product-type(C++26)

template<class T0, class T1, ..., class Tn>
struct product-type {  // exposition only
  T0 t0;  // exposition only
  T1 t1;  // exposition only
  // ...
  Tn tn;  // exposition only

  template<size_t I, class Self>
  constexpr decltype(auto) get(this Self&& self) noexcept;  // exposition only

  template<class Self, class Fn>
  constexpr decltype(auto) apply(this Self&& self, Fn&& fn) // exposition only
    noexcept(see below);
};

概要

product-typeは、Senderアルゴリズム動作仕様定義で用いられる説明専用のクラステンプレートである。

product-type型の式は構造化束縛における初期化子として利用できる。

クラス仕様

template<size_t I, class Self>
constexpr decltype(auto) get(this Self&& self) noexcept;

  • 効果 : 下記と等価

    auto& [...ts] = self;
    return std::forward_like<Self>(ts...[I]);
    

template<class Self, class Fn>
constexpr decltype(auto) apply(this Self&& self, Fn&& fn) noexcept(see below);

バージョン

言語

  • C++26

関連項目

参照