File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818// The oneAPI Specification version this implementation is compliant with
1919#define ONEDPL_SPEC_VERSION 104
2020
21+ // -- Check for C++ standard library feature macros --
2122#if __has_include(<version>)
22- # include < version> // The standard C++20 header
23+ # include < version>
2324# define _ONEDPL_STD_FEATURE_MACROS_PRESENT 1
24- // Clang 15 and older do not support range adaptors, see https://bugs.llvm.org/show_bug.cgi?id=44833
25- # define _ONEDPL_CPP20_RANGES_PRESENT ((__cpp_lib_ranges >= 201911L ) && !(__clang__ && __clang_major__ < 16 ))
25+ # define _ONEDPL_CPP20_CONCEPTS_PRESENT (__cpp_concepts >= 201907L && __cpp_lib_concepts >= 202002L )
2626#else
2727# define _ONEDPL_STD_FEATURE_MACROS_PRESENT 0
28+ # define _ONEDPL_CPP20_CONCEPTS_PRESENT 0
29+ #endif
30+
31+ // -- Check for C++20 Ranges support --
32+ #if _ONEDPL_CPP20_CONCEPTS_PRESENT
33+ // Ranges library is available if the standard library provides it and concepts are supported
34+ // Clang 15 and older do not support range adaptors, see https://bugs.llvm.org/show_bug.cgi?id=44833
35+ # define _ONEDPL_CPP20_RANGES_PRESENT \
36+ ((__cpp_lib_ranges >= 201911L ) && !(_LIBCPP_VERSION && _LIBCPP_VERSION < 16000 ))
37+ #else
2838# define _ONEDPL_CPP20_RANGES_PRESENT 0
2939#endif
3040
3545# define _PSTL_VERSION_PATCH (_PSTL_VERSION % 10 )
3646#endif
3747
38- // Feature macros
48+ // -- Define oneDPL feature macros --
3949#define ONEDPL_HAS_RANDOM_NUMBERS 202409L
4050#if _ONEDPL_CPP20_RANGES_PRESENT
4151# define ONEDPL_HAS_RANGE_ALGORITHMS 202509L
Original file line number Diff line number Diff line change 271271 (_ONEDPL___cplusplus >= 202002L && (_MSC_VER >= 1921 || _GLIBCXX_RELEASE >= 10))
272272
273273#if _ONEDPL_STD_FEATURE_MACROS_PRESENT
274- # define _ONEDPL_CPP20_CONCEPTS_PRESENT (__cpp_concepts >= 201907L && __cpp_lib_concepts >= 202002L)
275274# define _ONEDPL_CPP23_TUPLE_LIKE_COMMON_REFERENCE_PRESENT \
276275 (_ONEDPL___cplusplus >= 202302L && __cpp_lib_tuple_like >= 202207L)
277276# define _ONEDPL_CPP23_RANGES_ZIP_PRESENT (_ONEDPL___cplusplus >= 202302L && __cpp_lib_ranges_zip >= 202110L)
278277# define _ONEDPL_CPP26_DEFAULT_VALUE_TYPE_PRESENT (__cpp_lib_algorithm_default_value_type >= 202403L)
279278#else
280- # define _ONEDPL_CPP20_CONCEPTS_PRESENT 0
281279# define _ONEDPL_CPP23_TUPLE_LIKE_COMMON_REFERENCE_PRESENT 0
282280# define _ONEDPL_CPP23_RANGES_ZIP_PRESENT 0
283281# define _ONEDPL_CPP26_DEFAULT_VALUE_TYPE_PRESENT 0
You can’t perform that action at this time.
0 commit comments