Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

let_value does not propagate nothrow-connect-ness

オープン
#1,442 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
cpp

調査の方向性

Godbolt の例を再現し、let_value、__connectable、__nothrow_connectable 周辺の stdexec/execution.hpp を調査する。示されている noexcept ラムダと just() sender が nothrow アサーションを満たさない理由を追跡し、その挙動が意図されたものかどうかを判断して、変更が必要な場合はリグレッションテストのカバレッジを追加または更新する。

索引モデルが issue の本文から書いたものです。

説明

Consider this code:

#include <stdexec/execution.hpp>
void test() {
    auto s1 = stdexec::let_value(
        stdexec::just(),
        []() noexcept {
            return stdexec::just();
        }
    );
    static_assert(stdexec::__detail::__connectable<decltype(s1), stdexec::__sync_wait::__receiver_t<decltype(s1)>>);    
    static_assert(stdexec::__nothrow_connectable<decltype(s1), stdexec::__sync_wait::__receiver_t<decltype(s1)>>);  // <                    
}

(Godbolt link: https://godbolt.org/z/hn5MG7dqe)

Compilation fails on the line marked with <, which suggests than s1 is a valid sender, but its connect CPO is declared as throwing.
This is surprising: as fas as I can see, there is no room for an exception in this code, since just() returns nothrow-connectable sender, and lambda itself is declared as non-throwing. let_value internal implementation is hard to follow (in particular, while reading [exec] I wasn't able to find what domain really is), so I can't pinpoint source of confusion any further.

Is this behavior intended?

主要言語
C++
スター
2.4k
フォーク
270
平均マージ
2日 16時間
マージ済み PR(30日)
43

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NVIDIA/stdexec のほかの issue

NVIDIA/stdexec の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。