Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

GCC 16 build fails due to -Wsfinae-incomplete in start_detached test

Open
#2,278 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
cmake, cpp

Research direction

Reproduce the failure with GCC 16 and start in test/exec/test_start_detached.cpp around custom_scheduler::sender::get_env(), then inspect the referenced __get_env_member_result_t in include/stdexec/__detail/__env.hpp. Check the test and its CMake target, and consider the issue complete when the start_detached test builds successfully with the reported warning-as-error settings.

Written by the indexing model from the issue text.

Description

Build fails with g++ 16 due to -Wsfinae-incomplete

Error Description:

[1/3] Building CXX object test/exec/CMakeFiles/test.exec.dir/test_start_detached.cpp.o
FAILED: [code=1] test/exec/CMakeFiles/test.exec.dir/test_start_detached.cpp.o
/usr/bin/c++ -DSTDEXEC_NAMESPACE=std::execution -I/home/dane/src/stdexec/build/_deps/catch2-src/src/catch2/.. -I/home/dane/src/stdexec/build/_deps/catch2-build/generated-includes -I/home/dane/src/stdexec/test -isystem /home/dane/src/stdexec/include -isystem /home/dane/src/stdexec/build/include -O3 -DNDEBUG -Wall -Wextra -Wpedantic -Werror -Wno-c2y-extensions -fcoroutines -fconcepts-diagnostics-depth=10 -Werror=unused-parameter -Wno-non-template-friend -Wno-maybe-uninitialized -MD -MT test/exec/CMakeFiles/test.exec.dir/test_start_detached.cpp.o -MF test/exec/CMakeFiles/test.exec.dir/test_start_detached.cpp.o.d -o test/exec/CMakeFiles/test.exec.dir/test_start_detached.cpp.o -c /home/dane/src/stdexec/test/exec/test_start_detached.cpp
/home/dane/src/stdexec/test/exec/test_start_detached.cpp: In member function ‘auto {anonymous}::custom_scheduler::sender::get_env() const’:
/home/dane/src/stdexec/test/exec/test_start_detached.cpp:148:7: error: defining ‘auto {anonymous}::custom_scheduler::sender::get_env() const’, which previously failed to be deduced in a SFINAE context [-Werror=sfinae-incomplete=]
148 | }
| ^
In file included from /home/dane/src/stdexec/include/exec/start_detached.hpp:20,
from /home/dane/src/stdexec/test/exec/test_start_detached.cpp:17:
/home/dane/src/stdexec/include/stdexec/__detail/__env.hpp:277:81: note: here. Use ‘-Wsfinae-incomplete=2’ for a diagnostic at that point
277 | using __get_env_member_result_t = decltype(__declval<_EnvProvider>().get_env());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-c2y-extensions’ may have been intended to silence earlier diagnostics
cc1plus: all warnings being treated as errors
ninja: build stopped: subcommand failed.

Environment:
g++ -v:
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/16/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,m2,cobol,algol68,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugzilla.redhat.com/ --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --enable-libstdcxx-backtrace --with-libstdcxx-zoneinfo=/usr/share/zoneinfo --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none,amdgcn-amdhsa --enable-offload-defaulted --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-tls=gnu2 --with-arch_32=i686 --build=x86_64-redhat-linux --with-build-config=bootstrap-lto --enable-link-serialization=1 --disable-libssp
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.2.1 20260819 (Red Hat 16.2.1-2) (GCC)

/etc/os-release:
NAME="Fedora Linux"
VERSION="44 (Workstation Edition)"
RELEASE_TYPE=stable
ID=fedora
VERSION_ID=44
VERSION_CODENAME=""
PRETTY_NAME="Fedora Linux 44 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:44"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f44/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=44
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=44
SUPPORT_END=2027-05-19
VARIANT="Workstation Edition"
VARIANT_ID=workstation

Dominant language
C++
Stars
2.4k
Forks
270
Avg merge
2d 17h
Merged PRs (30d)
37

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NVIDIA/stdexec

All issues in NVIDIA/stdexec

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.