Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/exec/detail/bit_cast.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#if __has_include(<bit>)
# include <bit>
# if __cpp_lib_bit_cast >= 2018'06L
# if __cpp_lib_bit_cast >= 201806L
# define STDEXEC_NO_STDCPP_BIT_CAST() 0
# else
# define STDEXEC_NO_STDCPP_BIT_CAST() 1
Expand All @@ -42,7 +42,7 @@ namespace experimental::execution
[[nodiscard]]
constexpr _To bit_cast(const _From& __from) noexcept
{
# if STDEXEC_HAS_BUILTIN(__builtin_bit_cast) || (STDEXEC_MSVC() && STDEXEC_MSVC_VERSION >= 19'26)
# if STDEXEC_HAS_BUILTIN(__builtin_bit_cast) || (STDEXEC_MSVC() && STDEXEC_MSVC_VERSION >= 1926)
return __builtin_bit_cast(_To, __from);
# else
_To __to;
Expand Down
2 changes: 1 addition & 1 deletion include/exec/detail/intrusive_heap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ STDEXEC_PRAGMA_IGNORE_EDG(not_used_in_partial_spec_arg_list)

namespace experimental::execution
{
#if defined(__cpp_lib_int_pow2) && __cpp_lib_int_pow2 >= 2020'02L
#if defined(__cpp_lib_int_pow2) && __cpp_lib_int_pow2 >= 202002L
namespace detail
{
using std::bit_ceil;
Expand Down
2 changes: 1 addition & 1 deletion include/exec/sequence/ignore_all_values.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ namespace experimental::execution
}

template <class _Receiver>
#if STDEXEC_NVHPC() && STDEXEC_NVHPC_VERSION <= 25'09
#if STDEXEC_NVHPC() && STDEXEC_NVHPC_VERSION <= 2509
// Avoid a codegen issue in NVHPC 25.9 and earlier
[[gnu::noinline]]
#endif
Expand Down
4 changes: 2 additions & 2 deletions include/exec/timed_scheduler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ namespace experimental::execution

struct schedule_after_t : __schedule_after_base_t
{
#if !STDEXEC_CLANG() || STDEXEC_CLANG_VERSION >= 16'00
#if !STDEXEC_CLANG() || STDEXEC_CLANG_VERSION >= 1600
using __schedule_after_base_t::operator();
#else
// clang prior to 16 is not able to find the correct overload in the
Expand Down Expand Up @@ -222,7 +222,7 @@ namespace experimental::execution

struct schedule_at_t : __schedule_at_base_t
{
#if !STDEXEC_CLANG() || STDEXEC_CLANG_VERSION >= 16'00
#if !STDEXEC_CLANG() || STDEXEC_CLANG_VERSION >= 1600
using __schedule_at_base_t::operator();
#else
// clang prior to 16 is not able to find the correct overload in the
Expand Down
2 changes: 1 addition & 1 deletion include/nvexec/detail/cuda_fwd.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "config.cuh"
#include <cuda/std/detail/__config>

#if _LIBCUDACXX_STD_VER > 17 && _LIBCUDACXX_CUDA_API_VERSION < 1'009'000
#if _LIBCUDACXX_STD_VER > 17 && _LIBCUDACXX_CUDA_API_VERSION < 1009000
# define STDEXEC_LIBCUDACXX_NEEDS_ATOMIC_WORKAROUND() 1
#else
# define STDEXEC_LIBCUDACXX_NEEDS_ATOMIC_WORKAROUND() 0
Expand Down
2 changes: 1 addition & 1 deletion include/nvexec/stream/common.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ namespace nv::execution

inline constexpr _strm::get_stream_t get_stream{};

#if CUDART_VERSION >= 13'00'0
#if CUDART_VERSION >= 13000
inline __host__ cudaError_t cudaMemPrefetchAsync(void const * dev_ptr,
size_t count,
int dst_device,
Expand Down
4 changes: 2 additions & 2 deletions include/stdexec/__detail/__any.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1508,7 +1508,7 @@ namespace STDEXEC::__any
struct __bad_any_cast : std::exception
{
[[nodiscard]]
#if __cpp_lib_constexpr_exceptions >= 2025'02L // constexpr support for std::exception
#if __cpp_lib_constexpr_exceptions >= 202502L // constexpr support for std::exception
constexpr
#endif
char const *what() const noexcept override
Expand All @@ -1517,7 +1517,7 @@ namespace STDEXEC::__any
}
};

#if defined(__cpp_exceptions) && __cpp_exceptions >= 1997'11L
#if defined(__cpp_exceptions) && __cpp_exceptions >= 199711L
[[noreturn]]
inline void __throw_bad_any_cast()
{
Expand Down
8 changes: 4 additions & 4 deletions include/stdexec/__detail/__atomic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ namespace STDEXEC::__std
using std::atomic_thread_fence;
using std::atomic_signal_fence;

# if __cpp_lib_atomic_ref >= 2018'06L
# if __cpp_lib_atomic_ref >= 201806L
using std::atomic_ref;
# else
inline constexpr int __atomic_flag_map[] = {
Expand Down Expand Up @@ -109,7 +109,7 @@ namespace STDEXEC::__std
__atomic_store_n(__ptr_, __desired, __map_memory_order(__order));
}
};
# endif // ^^^ __cpp_lib_atomic_ref < 2018'06L
# endif // ^^^ __cpp_lib_atomic_ref < 201806L

#endif // ^^^ !STDEXEC_HAS_CUDA_STD_ATOMIC()

Expand All @@ -120,7 +120,7 @@ namespace STDEXEC::__std
: __order;
}

#if __cpp_lib_atomic_shared_ptr >= 2017'11L && !STDEXEC_HAS_CUDA_STD_ATOMIC()
#if __cpp_lib_atomic_shared_ptr >= 201711L && !STDEXEC_HAS_CUDA_STD_ATOMIC()
template <class _Ty>
using __atomic_shared_ptr = std::atomic<std::shared_ptr<_Ty>>;
#else
Expand Down Expand Up @@ -240,7 +240,7 @@ namespace STDEXEC::__std
template <typename _Ty>
__atomic_shared_ptr(std::shared_ptr<_Ty>) -> __atomic_shared_ptr<_Ty>;

#endif // ^^^ __cpp_lib_atomic_shared_ptr < 2017'11L
#endif // ^^^ __cpp_lib_atomic_shared_ptr < 201711L

} // namespace STDEXEC::__std

Expand Down
2 changes: 1 addition & 1 deletion include/stdexec/__detail/__concepts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
#pragma once

#if __cpp_concepts < 2019'07L
#if __cpp_concepts < 201907L
# error This library requires support for C++20 concepts
#endif

Expand Down
46 changes: 23 additions & 23 deletions include/stdexec/__detail/__config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

// IWYU pragma: always_keep

#if __cplusplus < 2020'02L
#if __cplusplus < 202002L
# if defined(_MSC_VER) && !defined(__clang__)
# error This library requires the use of C++20. Use /Zc:__cplusplus to enable __cplusplus conformance.
# else
Expand Down Expand Up @@ -114,8 +114,8 @@

// Not all supported compilers have implemented the resolution of CWG 2428 yet.
// https://cplusplus.github.io/CWG/issues/2428.html
#if (STDEXEC_CLANG_VERSION >= 19'00) || (STDEXEC_GCC_VERSION >= 13'00) \
|| (STDEXEC_MSVC_VERSION >= 19'44)
#if (STDEXEC_CLANG_VERSION >= 1900) || (STDEXEC_GCC_VERSION >= 1300) \
|| (STDEXEC_MSVC_VERSION >= 1944)
# define STDEXEC_DEPRECATE_CONCEPT(_MSG) [[deprecated(_MSG)]]
#else
# define STDEXEC_DEPRECATE_CONCEPT(_MSG)
Expand Down Expand Up @@ -232,7 +232,7 @@ STDEXEC_NAMESPACE_STD_END
// clang-format on

////////////////////////////////////////////////////////////////////////////////////////////////////
#if __cpp_impl_coroutine >= 2019'02L && __cpp_lib_coroutine >= 2019'02L
#if __cpp_impl_coroutine >= 201902L && __cpp_lib_coroutine >= 201902L
# include <coroutine> // IWYU pragma: keep
# define STDEXEC_NO_STDCPP_COROUTINES() 0
namespace STDEXEC::__std
Expand Down Expand Up @@ -292,22 +292,22 @@ namespace STDEXEC::__std

#if STDEXEC_NVHPC()
// NVBUG #4067067: NVHPC does not fully support [[no_unique_address]]
# if STDEXEC_NVHPC_VERSION < 23'05
# if STDEXEC_NVHPC_VERSION < 2305
# define STDEXEC_ATTR_WHICH_3(_ATTR) /*nothing*/
# else
# define STDEXEC_ATTR_WHICH_3(_ATTR) [[no_unique_address]]
# endif
#elif STDEXEC_CLANG_CL()
// clang-cl does not support [[no_unique_address]]: https://reviews.llvm.org/D110485
// TODO: Find the version that started supporting [[msvc::no_unique_address]]
# if STDEXEC_CLANG_VERSION < 18'01
# if STDEXEC_CLANG_VERSION < 1801
# define STDEXEC_ATTR_WHICH_3(_ATTR) /*nothing*/
# else
# define STDEXEC_ATTR_WHICH_3(_ATTR) [[msvc::no_unique_address]]
# endif
#elif STDEXEC_MSVC()
// MSVCBUG https://developercommunity.visualstudio.com/t/Incorrect-codegen-when-using-msvc::no_/10452874
# if STDEXEC_MSVC_VERSION < 19'43
# if STDEXEC_MSVC_VERSION < 1943
# define STDEXEC_ATTR_WHICH_3(_ATTR) /*nothing*/
# else
# define STDEXEC_ATTR_WHICH_3(_ATTR) [[msvc::no_unique_address]]
Expand Down Expand Up @@ -438,7 +438,7 @@ namespace STDEXEC::__std
# define STDEXEC_IS_TRIVIALLY_COPYABLE(...) std::is_trivially_copyable_v<__VA_ARGS__>
#endif

#if STDEXEC_HAS_BUILTIN(__is_base_of) || (STDEXEC_MSVC_VERSION >= 19'14)
#if STDEXEC_HAS_BUILTIN(__is_base_of) || (STDEXEC_MSVC_VERSION >= 1914)
# define STDEXEC_IS_BASE_OF(...) __is_base_of(__VA_ARGS__)
#else
# define STDEXEC_IS_BASE_OF(...) std::is_base_of_v<__VA_ARGS__>
Expand Down Expand Up @@ -535,7 +535,7 @@ namespace STDEXEC
inline constexpr bool __same_as_v<_Ap, _Ap> = true;
} // namespace STDEXEC

#if defined(__cpp_lib_unreachable) && __cpp_lib_unreachable >= 2022'02L
#if defined(__cpp_lib_unreachable) && __cpp_lib_unreachable >= 202202L
# define STDEXEC_UNREACHABLE() std::unreachable()
#elif STDEXEC_HAS_BUILTIN(__builtin_unreachable)
# define STDEXEC_UNREACHABLE() __builtin_unreachable()
Expand Down Expand Up @@ -577,7 +577,7 @@ namespace STDEXEC
// available. Pack indexing is disabled for clang < 20 because of:
// https://github.com/llvm/llvm-project/issues/116105
#if defined(__cpp_pack_indexing) && !STDEXEC_NVCC() \
&& !(STDEXEC_CLANG() && STDEXEC_CLANG_VERSION < 20'00)
&& !(STDEXEC_CLANG() && STDEXEC_CLANG_VERSION < 2000)
# define STDEXEC_NO_STDCPP_PACK_INDEXING() 0
#else // ^^^ has pack indexing ^^^ / vvv no pack indexing vvv
# define STDEXEC_NO_STDCPP_PACK_INDEXING() 1
Expand All @@ -591,8 +591,8 @@ namespace STDEXEC

// Before clang-16, clang did not like libstdc++'s ranges implementation
#if __has_include(<ranges>) && \
(defined(__cpp_lib_ranges) && __cpp_lib_ranges >= 2019'11L) && \
(!STDEXEC_CLANG() || STDEXEC_CLANG_VERSION >= 16'00 || defined(_LIBCPP_VERSION))
(defined(__cpp_lib_ranges) && __cpp_lib_ranges >= 201911L) && \
(!STDEXEC_CLANG() || STDEXEC_CLANG_VERSION >= 1600 || defined(_LIBCPP_VERSION))
# define STDEXEC_NO_STDCPP_RANGES() 0
#else
# define STDEXEC_NO_STDCPP_RANGES() 1
Expand All @@ -605,31 +605,31 @@ namespace STDEXEC
# define STDEXEC_NO_STDCPP_MEMORY_RESOURCE() 1
#endif

#if defined(__cpp_lib_execution) && __cpp_lib_execution >= 2016'03L
#if defined(__cpp_lib_execution) && __cpp_lib_execution >= 201603L
# define STDEXEC_NO_STDCPP_EXECUTION_POLICY() 0
#else
# define STDEXEC_NO_STDCPP_EXECUTION_POLICY() 1
#endif

#if defined(__cpp_lib_execution) && __cpp_lib_execution >= 2019'02L
#if defined(__cpp_lib_execution) && __cpp_lib_execution >= 201902L
# define STDEXEC_NO_STDCPP_UNSEQUENCED_EXECUTION_POLICY() 0
#else
# define STDEXEC_NO_STDCPP_UNSEQUENCED_EXECUTION_POLICY() 1
#endif

#if defined(__cpp_lib_parallel_algorithm) && __cpp_lib_parallel_algorithm >= 2016'03L
#if defined(__cpp_lib_parallel_algorithm) && __cpp_lib_parallel_algorithm >= 201603L
# define STDEXEC_NO_STDCPP_PARALLEL_ALGORITHMS() 0
#else
# define STDEXEC_NO_STDCPP_PARALLEL_ALGORITHMS() 1
#endif

#if defined(__cpp_explicit_this_parameter) && (__cpp_explicit_this_parameter >= 2021'10L)
#if defined(__cpp_explicit_this_parameter) && (__cpp_explicit_this_parameter >= 202110L)
# define STDEXEC_NO_STDCPP_EXPLICIT_THIS_PARAMETER() 0
#else
# define STDEXEC_NO_STDCPP_EXPLICIT_THIS_PARAMETER() 1
#endif

#if defined(__cpp_rtti) && __cpp_rtti >= 1997'11L
#if defined(__cpp_rtti) && __cpp_rtti >= 199711L
# define STDEXEC_NO_STDCPP_RTTI() 0
#else
# define STDEXEC_NO_STDCPP_RTTI() 1
Expand All @@ -643,13 +643,13 @@ namespace STDEXEC
#endif

// Perhaps the stdlib lacks support for concepts
#if __has_include(<concepts>) && __cpp_lib_concepts >= 2020'02L
#if __has_include(<concepts>) && __cpp_lib_concepts >= 202002L
# define STDEXEC_NO_STDCPP_CONCEPTS_HEADER() 0
#else
# define STDEXEC_NO_STDCPP_CONCEPTS_HEADER() 1
#endif

#if defined(__cpp_if_consteval) && __cpp_if_consteval >= 2021'06L
#if defined(__cpp_if_consteval) && __cpp_if_consteval >= 202106L
# define STDEXEC_IF_CONSTEVAL if consteval
# define STDEXEC_IF_NOT_CONSTEVAL if !consteval
#else
Expand Down Expand Up @@ -679,7 +679,7 @@ namespace STDEXEC
}

// GCC 13 implements lexical friendship, but it is incomplete. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111018
#if STDEXEC_CLANG() // || (STDEXEC_GCC() && STDEXEC_GCC_VERSION >= 13'00)
#if STDEXEC_CLANG() // || (STDEXEC_GCC() && STDEXEC_GCC_VERSION >= 1300)
# define STDEXEC_FRIENDSHIP_IS_LEXICAL() 1
#else
# define STDEXEC_FRIENDSHIP_IS_LEXICAL() 0
Expand All @@ -701,7 +701,7 @@ namespace STDEXEC
# define STDEXEC_NO_STDCPP_EXCEPTIONS() (__EXCEPTIONS == 0)
#endif

#if defined(__cpp_constexpr_exceptions) && __cpp_constexpr_exceptions >= 2024'11L
#if defined(__cpp_constexpr_exceptions) && __cpp_constexpr_exceptions >= 202411L
# if !STDEXEC_NO_STDCPP_EXCEPTIONS()
// https://wg21.link/p3068
# define STDEXEC_NO_STDCPP_CONSTEXPR_EXCEPTIONS() 0
Expand Down Expand Up @@ -872,7 +872,7 @@ namespace STDEXEC

////////////////////////////////////////////////////////////////////////////////////////////////////
#if STDEXEC_MSVC()
# if _MSC_VER >= 19'35
# if _MSC_VER >= 1935
# define STDEXEC_PRETTY_FUNCTION() __builtin_FUNCSIG()
# else
# define STDEXEC_PRETTY_FUNCTION() __FUNCSIG__
Expand All @@ -881,7 +881,7 @@ namespace STDEXEC
# define STDEXEC_PRETTY_FUNCTION() __PRETTY_FUNCTION__
#endif

#if __cplusplus >= 2022'11L
#if __cplusplus >= 202211L
# define STDEXEC_CONSTEXPR_CXX23 constexpr
# define STDEXEC_CONSTEXPR_LOCAL static constexpr
#else
Expand Down
4 changes: 2 additions & 2 deletions include/stdexec/__detail/__cpo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
#define STDEXEC_MEMFN_FRIEND(_TAG) \
using STDEXEC_PP_CAT(_TAG, _t) = STDEXEC_PP_CAT(STDEXEC::_TAG, _t)

#if STDEXEC_GCC() || (STDEXEC_CLANG() && STDEXEC_CLANG_VERSION < 14'00)
#if STDEXEC_GCC() || (STDEXEC_CLANG() && STDEXEC_CLANG_VERSION < 1400)
# define STDEXEC_CUSTOM \
_Pragma("GCC warning \"STDEXEC_CUSTOM is deprecated.\"") STDEXEC_MEMFN_DECL_IMPL
# define STDEXEC_MEMFN_DECL \
Expand All @@ -94,7 +94,7 @@
# define STDEXEC_MEMFN_DECL STDEXEC_MEMFN_DECL_IMPL
#endif

#if STDEXEC_CLANG() && STDEXEC_CLANG_VERSION >= 14'00
#if STDEXEC_CLANG() && STDEXEC_CLANG_VERSION >= 1400
# pragma clang deprecated(STDEXEC_CUSTOM)
# pragma clang deprecated(STDEXEC_MEMFN_DECL)
#endif
Expand Down
7 changes: 3 additions & 4 deletions include/stdexec/__detail/__diagnostics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,11 @@ namespace STDEXEC
_WITH_PRETTY_SENDER_<_Sender>,
_WITH_ENVIRONMENT_(_Env)...>;

#if __cpp_lib_constexpr_exceptions \
>= 2025'02L // constexpr exception types, https://wg21.link/p3378
#if __cpp_lib_constexpr_exceptions >= 202502L // constexpr exception types, https://wg21.link/p3378

using __exception = ::std::exception;

#elif __cpp_constexpr >= 2024'11L // constexpr virtual functions
#elif __cpp_constexpr >= 202411L // constexpr virtual functions

struct __exception
{
Expand All @@ -176,7 +175,7 @@ namespace STDEXEC
}
};

#endif // __cpp_lib_constexpr_exceptions >= 2025'02L
#endif // __cpp_lib_constexpr_exceptions >= 202502L

template <class _Derived>
struct __compile_time_error : __exception
Expand Down
2 changes: 1 addition & 1 deletion include/stdexec/__detail/__sender_introspection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ namespace STDEXEC
static constexpr type value = _Apply;
};

#if defined(__cpp_structured_bindings) && __cpp_structured_bindings >= 2024'11L
#if defined(__cpp_structured_bindings) && __cpp_structured_bindings >= 202411L

// Structured bindings can introduce a pack, so the implementation of
// __structured_apply is simple.
Expand Down
6 changes: 3 additions & 3 deletions include/stdexec/__detail/__stop_token.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include "__concepts.hpp"

#if defined(__cpp_lib_jthread) && __cpp_lib_jthread >= 2019'11L
#if defined(__cpp_lib_jthread) && __cpp_lib_jthread >= 201911L
# include <stop_token> // IWYU pragma: export
#endif

Expand All @@ -42,7 +42,7 @@ STDEXEC_P2300_NAMESPACE_BEGIN()
typename __check_type_alias_exists<_StopToken::template callback_type>;
};

#if defined(__cpp_lib_jthread) && __cpp_lib_jthread >= 2019'11L
#if defined(__cpp_lib_jthread) && __cpp_lib_jthread >= 201911L
template <>
inline constexpr bool __has_stop_callback_v<std::stop_token> = true;
#endif
Expand All @@ -54,7 +54,7 @@ STDEXEC_P2300_NAMESPACE_BEGIN()
using __f = _Token::template callback_type<_Callback>;
};

#if defined(__cpp_lib_jthread) && __cpp_lib_jthread >= 2019'11L
#if defined(__cpp_lib_jthread) && __cpp_lib_jthread >= 201911L
template <>
struct __stop_callback_for<std::stop_token>
{
Expand Down
Loading
Loading