Skip to content

Commit e06d185

Browse files
authored
avoid digit separators in preprocessing directives (#2008)
* avoid digit separators in preprocessing directives fixes #1934, fixes #1638
1 parent 8e32727 commit e06d185

25 files changed

+61
-62
lines changed

include/exec/detail/bit_cast.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
#if __has_include(<bit>)
2222
# include <bit>
23-
# if __cpp_lib_bit_cast >= 2018'06L
23+
# if __cpp_lib_bit_cast >= 201806L
2424
# define STDEXEC_NO_STDCPP_BIT_CAST() 0
2525
# else
2626
# define STDEXEC_NO_STDCPP_BIT_CAST() 1
@@ -42,7 +42,7 @@ namespace experimental::execution
4242
[[nodiscard]]
4343
constexpr _To bit_cast(const _From& __from) noexcept
4444
{
45-
# if STDEXEC_HAS_BUILTIN(__builtin_bit_cast) || (STDEXEC_MSVC() && STDEXEC_MSVC_VERSION >= 19'26)
45+
# if STDEXEC_HAS_BUILTIN(__builtin_bit_cast) || (STDEXEC_MSVC() && STDEXEC_MSVC_VERSION >= 1926)
4646
return __builtin_bit_cast(_To, __from);
4747
# else
4848
_To __to;

include/exec/detail/intrusive_heap.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ STDEXEC_PRAGMA_IGNORE_EDG(not_used_in_partial_spec_arg_list)
2828

2929
namespace experimental::execution
3030
{
31-
#if defined(__cpp_lib_int_pow2) && __cpp_lib_int_pow2 >= 2020'02L
31+
#if defined(__cpp_lib_int_pow2) && __cpp_lib_int_pow2 >= 202002L
3232
namespace detail
3333
{
3434
using std::bit_ceil;

include/exec/sequence/ignore_all_values.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ namespace experimental::execution
7373
}
7474

7575
template <class _Receiver>
76-
#if STDEXEC_NVHPC() && STDEXEC_NVHPC_VERSION <= 25'09
76+
#if STDEXEC_NVHPC() && STDEXEC_NVHPC_VERSION <= 2509
7777
// Avoid a codegen issue in NVHPC 25.9 and earlier
7878
[[gnu::noinline]]
7979
#endif

include/exec/timed_scheduler.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ namespace experimental::execution
143143

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

223223
struct schedule_at_t : __schedule_at_base_t
224224
{
225-
#if !STDEXEC_CLANG() || STDEXEC_CLANG_VERSION >= 16'00
225+
#if !STDEXEC_CLANG() || STDEXEC_CLANG_VERSION >= 1600
226226
using __schedule_at_base_t::operator();
227227
#else
228228
// clang prior to 16 is not able to find the correct overload in the

include/nvexec/detail/cuda_fwd.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include "config.cuh"
2222
#include <cuda/std/detail/__config>
2323

24-
#if _LIBCUDACXX_STD_VER > 17 && _LIBCUDACXX_CUDA_API_VERSION < 1'009'000
24+
#if _LIBCUDACXX_STD_VER > 17 && _LIBCUDACXX_CUDA_API_VERSION < 1009000
2525
# define STDEXEC_LIBCUDACXX_NEEDS_ATOMIC_WORKAROUND() 1
2626
#else
2727
# define STDEXEC_LIBCUDACXX_NEEDS_ATOMIC_WORKAROUND() 0

include/nvexec/stream/common.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ namespace nv::execution
982982

983983
inline constexpr _strm::get_stream_t get_stream{};
984984

985-
#if CUDART_VERSION >= 13'00'0
985+
#if CUDART_VERSION >= 13000
986986
inline __host__ cudaError_t cudaMemPrefetchAsync(void const * dev_ptr,
987987
size_t count,
988988
int dst_device,

include/stdexec/__detail/__any.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1508,7 +1508,7 @@ namespace STDEXEC::__any
15081508
struct __bad_any_cast : std::exception
15091509
{
15101510
[[nodiscard]]
1511-
#if __cpp_lib_constexpr_exceptions >= 2025'02L // constexpr support for std::exception
1511+
#if __cpp_lib_constexpr_exceptions >= 202502L // constexpr support for std::exception
15121512
constexpr
15131513
#endif
15141514
char const *what() const noexcept override
@@ -1517,7 +1517,7 @@ namespace STDEXEC::__any
15171517
}
15181518
};
15191519

1520-
#if defined(__cpp_exceptions) && __cpp_exceptions >= 1997'11L
1520+
#if defined(__cpp_exceptions) && __cpp_exceptions >= 199711L
15211521
[[noreturn]]
15221522
inline void __throw_bad_any_cast()
15231523
{

include/stdexec/__detail/__atomic.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ namespace STDEXEC::__std
6464
using std::atomic_thread_fence;
6565
using std::atomic_signal_fence;
6666

67-
# if __cpp_lib_atomic_ref >= 2018'06L
67+
# if __cpp_lib_atomic_ref >= 201806L
6868
using std::atomic_ref;
6969
# else
7070
inline constexpr int __atomic_flag_map[] = {
@@ -109,7 +109,7 @@ namespace STDEXEC::__std
109109
__atomic_store_n(__ptr_, __desired, __map_memory_order(__order));
110110
}
111111
};
112-
# endif // ^^^ __cpp_lib_atomic_ref < 2018'06L
112+
# endif // ^^^ __cpp_lib_atomic_ref < 201806L
113113

114114
#endif // ^^^ !STDEXEC_HAS_CUDA_STD_ATOMIC()
115115

@@ -120,7 +120,7 @@ namespace STDEXEC::__std
120120
: __order;
121121
}
122122

123-
#if __cpp_lib_atomic_shared_ptr >= 2017'11L && !STDEXEC_HAS_CUDA_STD_ATOMIC()
123+
#if __cpp_lib_atomic_shared_ptr >= 201711L && !STDEXEC_HAS_CUDA_STD_ATOMIC()
124124
template <class _Ty>
125125
using __atomic_shared_ptr = std::atomic<std::shared_ptr<_Ty>>;
126126
#else
@@ -240,7 +240,7 @@ namespace STDEXEC::__std
240240
template <typename _Ty>
241241
__atomic_shared_ptr(std::shared_ptr<_Ty>) -> __atomic_shared_ptr<_Ty>;
242242

243-
#endif // ^^^ __cpp_lib_atomic_shared_ptr < 2017'11L
243+
#endif // ^^^ __cpp_lib_atomic_shared_ptr < 201711L
244244

245245
} // namespace STDEXEC::__std
246246

include/stdexec/__detail/__concepts.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
#pragma once
1717

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

include/stdexec/__detail/__config.hpp

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
// IWYU pragma: always_keep
1919

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

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

234234
////////////////////////////////////////////////////////////////////////////////////////////////////
235-
#if __cpp_impl_coroutine >= 2019'02L && __cpp_lib_coroutine >= 2019'02L
235+
#if __cpp_impl_coroutine >= 201902L && __cpp_lib_coroutine >= 201902L
236236
# include <coroutine> // IWYU pragma: keep
237237
# define STDEXEC_NO_STDCPP_COROUTINES() 0
238238
namespace STDEXEC::__std
@@ -292,22 +292,22 @@ namespace STDEXEC::__std
292292

293293
#if STDEXEC_NVHPC()
294294
// NVBUG #4067067: NVHPC does not fully support [[no_unique_address]]
295-
# if STDEXEC_NVHPC_VERSION < 23'05
295+
# if STDEXEC_NVHPC_VERSION < 2305
296296
# define STDEXEC_ATTR_WHICH_3(_ATTR) /*nothing*/
297297
# else
298298
# define STDEXEC_ATTR_WHICH_3(_ATTR) [[no_unique_address]]
299299
# endif
300300
#elif STDEXEC_CLANG_CL()
301301
// clang-cl does not support [[no_unique_address]]: https://reviews.llvm.org/D110485
302302
// TODO: Find the version that started supporting [[msvc::no_unique_address]]
303-
# if STDEXEC_CLANG_VERSION < 18'01
303+
# if STDEXEC_CLANG_VERSION < 1801
304304
# define STDEXEC_ATTR_WHICH_3(_ATTR) /*nothing*/
305305
# else
306306
# define STDEXEC_ATTR_WHICH_3(_ATTR) [[msvc::no_unique_address]]
307307
# endif
308308
#elif STDEXEC_MSVC()
309309
// MSVCBUG https://developercommunity.visualstudio.com/t/Incorrect-codegen-when-using-msvc::no_/10452874
310-
# if STDEXEC_MSVC_VERSION < 19'43
310+
# if STDEXEC_MSVC_VERSION < 1943
311311
# define STDEXEC_ATTR_WHICH_3(_ATTR) /*nothing*/
312312
# else
313313
# define STDEXEC_ATTR_WHICH_3(_ATTR) [[msvc::no_unique_address]]
@@ -438,7 +438,7 @@ namespace STDEXEC::__std
438438
# define STDEXEC_IS_TRIVIALLY_COPYABLE(...) std::is_trivially_copyable_v<__VA_ARGS__>
439439
#endif
440440

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

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

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

608-
#if defined(__cpp_lib_execution) && __cpp_lib_execution >= 2016'03L
608+
#if defined(__cpp_lib_execution) && __cpp_lib_execution >= 201603L
609609
# define STDEXEC_NO_STDCPP_EXECUTION_POLICY() 0
610610
#else
611611
# define STDEXEC_NO_STDCPP_EXECUTION_POLICY() 1
612612
#endif
613613

614-
#if defined(__cpp_lib_execution) && __cpp_lib_execution >= 2019'02L
614+
#if defined(__cpp_lib_execution) && __cpp_lib_execution >= 201902L
615615
# define STDEXEC_NO_STDCPP_UNSEQUENCED_EXECUTION_POLICY() 0
616616
#else
617617
# define STDEXEC_NO_STDCPP_UNSEQUENCED_EXECUTION_POLICY() 1
618618
#endif
619619

620-
#if defined(__cpp_lib_parallel_algorithm) && __cpp_lib_parallel_algorithm >= 2016'03L
620+
#if defined(__cpp_lib_parallel_algorithm) && __cpp_lib_parallel_algorithm >= 201603L
621621
# define STDEXEC_NO_STDCPP_PARALLEL_ALGORITHMS() 0
622622
#else
623623
# define STDEXEC_NO_STDCPP_PARALLEL_ALGORITHMS() 1
624624
#endif
625625

626-
#if defined(__cpp_explicit_this_parameter) && (__cpp_explicit_this_parameter >= 2021'10L)
626+
#if defined(__cpp_explicit_this_parameter) && (__cpp_explicit_this_parameter >= 202110L)
627627
# define STDEXEC_NO_STDCPP_EXPLICIT_THIS_PARAMETER() 0
628628
#else
629629
# define STDEXEC_NO_STDCPP_EXPLICIT_THIS_PARAMETER() 1
630630
#endif
631631

632-
#if defined(__cpp_rtti) && __cpp_rtti >= 1997'11L
632+
#if defined(__cpp_rtti) && __cpp_rtti >= 199711L
633633
# define STDEXEC_NO_STDCPP_RTTI() 0
634634
#else
635635
# define STDEXEC_NO_STDCPP_RTTI() 1
@@ -643,13 +643,13 @@ namespace STDEXEC
643643
#endif
644644

645645
// Perhaps the stdlib lacks support for concepts
646-
#if __has_include(<concepts>) && __cpp_lib_concepts >= 2020'02L
646+
#if __has_include(<concepts>) && __cpp_lib_concepts >= 202002L
647647
# define STDEXEC_NO_STDCPP_CONCEPTS_HEADER() 0
648648
#else
649649
# define STDEXEC_NO_STDCPP_CONCEPTS_HEADER() 1
650650
#endif
651651

652-
#if defined(__cpp_if_consteval) && __cpp_if_consteval >= 2021'06L
652+
#if defined(__cpp_if_consteval) && __cpp_if_consteval >= 202106L
653653
# define STDEXEC_IF_CONSTEVAL if consteval
654654
# define STDEXEC_IF_NOT_CONSTEVAL if !consteval
655655
#else
@@ -679,7 +679,7 @@ namespace STDEXEC
679679
}
680680

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

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

873873
////////////////////////////////////////////////////////////////////////////////////////////////////
874874
#if STDEXEC_MSVC()
875-
# if _MSC_VER >= 19'35
875+
# if _MSC_VER >= 1935
876876
# define STDEXEC_PRETTY_FUNCTION() __builtin_FUNCSIG()
877877
# else
878878
# define STDEXEC_PRETTY_FUNCTION() __FUNCSIG__
@@ -881,7 +881,7 @@ namespace STDEXEC
881881
# define STDEXEC_PRETTY_FUNCTION() __PRETTY_FUNCTION__
882882
#endif
883883

884-
#if __cplusplus >= 2022'11L
884+
#if __cplusplus >= 202211L
885885
# define STDEXEC_CONSTEXPR_CXX23 constexpr
886886
# define STDEXEC_CONSTEXPR_LOCAL static constexpr
887887
#else

0 commit comments

Comments
 (0)