You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As it stands, I think the logic in the above is backwards and the first 0 should be a 1, and the resulting build failure is a separate bug.
However, this is on the right lines. A little digging in case it helps:
STDEXEC_HAS_FEATURE is used twice in stdexec: 1) to detect thread_sanitizer, and 2) to detect __cpp_lib_execution.
In 1), that is precisely to detect a compiler feature. In 2), it is used to check whether the compiler has implemented a C++ library feature.
The use in 2) was standardised in c++20 with the advent of the <version> header, in P0754R2.
Using STDEXEC_HAS_FEATURE for case 2) has been replaced by including <version> and testing for __cpp_lib... macros directly.
The nit is that execution policies first arrived in c++17, so predates this checking system. On the other hand, I think both execution and version landed in gcc 9, so I think testing for __cpp_lib_execution should work no matter what.
I don't know the clang situation, and the 1) use has to remain, as I think it is clang specific, and gcc's compatibility __has_feature is intended to work with it.
I think 0242ad9 broke NVIDIA/stdexec for at least gcc-15 and gcc-trunk (https://godbolt.org/z/9ez66G7vv).
it checks
__has_feature(__cpp_lib_execution)
, but in libstdc++ is a macro defined at https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/include/bits/version.h#L672.should perhaps guard with
@lucteo
The text was updated successfully, but these errors were encountered: