`sender_in` fails with GCC 13.1 due to `const completion_signatures` in `__constant_completion_signatures_v`
まだ誰も着手していません。
評価
調査の方向性
stdexec/__detail/__sender_concepts.hpp から始め、特に __constant_completion_signatures_v とその GCC バージョン分岐を確認します。提供された reproducer.cpp を GCC 11.4 および GCC 13.1 で C++20 としてビルドし、その後 sender_in 制約の評価を追跡します。reproducer が GCC 13.1 でコンパイルでき、古いコンパイラのパスにリグレッションがないことをもって完了とします。
索引モデルが issue の本文から書いたものです。
説明
Summary
A sender that compiles successfully with GCC 11.4 fails to compile with GCC 13.1 when passed to exec::start_detached.
The failure appears to come from the sender_in constraint. GCC 13.1 evaluates:
__constant_completion_signatures_v<STDEXEC::get_completion_signatures<_Sender, _Env...>()>
as false, apparently because decltype(_Completions) is const completion_signatures<...>.
GCC 11 succeeds because stdexec has a GCC < 13 workaround that removes const:
std::remove_const_t<decltype(_Completions)>
GCC 13 takes the other branch and does not remove const.
Reproducer
// reproducer.cpp
#include <stdexec/execution.hpp>
using S = decltype(stdexec::just());
static_assert(stdexec::sender_in<S, stdexec::__root_env>);
int main(){}
/* my usage:
#include <stdexec/execution.hpp>
#include <exec/start_detached.hpp>
int main(){
stdexec::inline_scheduler sch;
auto sender = stdexec::schedule(sch) | stdexec::then([]() noexcept { });
exec::start_detached(std::move(sender));
}
*/
cmake_minimum_required(VERSION 3.21)
project(issue_stdexec
VERSION 0.0.1
LANGUAGES CXX)
include(CPM.cmake)
CPMAddPackage(
NAME stdexec
GITHUB_REPOSITORY NVIDIA/stdexec
GIT_TAG 6d7ad68
)
add_executable(reproducer reproducer.cpp)
target_link_libraries(reproducer PUBLIC STDEXEC::stdexec)
Environment
Linux GCC 11.4: compiles successfully
Linux GCC 13.1: fails
C++ mode: -std=gnu++20
Possible Cause
The issue may be related to stdexec/__detail/__sender_concepts.hpp #2027 :
#if STDEXEC_GCC() && STDEXEC_GCC_VERSION < 1300
template <auto _Completions>
inline constexpr bool __constant_completion_signatures_v =
__valid_completion_signatures<std::remove_const_t<decltype(_Completions)>>;
#else
template <auto _Completions>
inline constexpr bool __constant_completion_signatures_v =
__valid_completion_signatures<decltype(_Completions)>;
#endif
On GCC 13.1, the remove_const_t workaround still seems necessary.
- 主要言語
- C++
- スター
- 2.4k
- フォーク
- 270
- 平均マージ
- 2日 17時間
- マージ済み PR(30日)
- 37
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/stdexec のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 66/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 74/100
似ている issue
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
QuantStack/git2cpp#187 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
AXERA-TECH/ax-llm#77 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
games-on-whales/wolf#509 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100