diff --git a/test/parallel_api/ranges/std_ranges_sort.pass.cpp b/test/parallel_api/ranges/std_ranges_sort.pass.cpp index 7b86f106967..fd8f8e9cf39 100644 --- a/test/parallel_api/ranges/std_ranges_sort.pass.cpp +++ b/test/parallel_api/ranges/std_ranges_sort.pass.cpp @@ -21,18 +21,24 @@ main() #if _ENABLE_STD_RANGES_TESTING using namespace test_std_ranges; namespace dpl_ranges = oneapi::dpl::ranges; + auto sort_checker = +#if _ONEDPL_STD_RANGES_ALGO_CPP_FUN + [](auto&&... __args) { return std::ranges::sort(std::forward(__args)...); }; +#else + std::ranges::sort; +#endif - test_range_algo<0>{big_sz}(dpl_ranges::sort, std::ranges::sort); - test_range_algo<1>{}(dpl_ranges::sort, std::ranges::sort, std::ranges::less{}); + test_range_algo<0>{big_sz}(dpl_ranges::sort, sort_checker); + test_range_algo<1>{}(dpl_ranges::sort, sort_checker, std::ranges::less{}); - test_range_algo<2>{}(dpl_ranges::sort, std::ranges::sort, std::ranges::less{}, proj); - test_range_algo<3>{}(dpl_ranges::sort, std::ranges::sort, std::ranges::greater{}, proj); + test_range_algo<2>{}(dpl_ranges::sort, sort_checker, std::ranges::less{}, proj); + test_range_algo<3>{}(dpl_ranges::sort, sort_checker, std::ranges::greater{}, proj); - test_range_algo<4, P2>{}(dpl_ranges::sort, std::ranges::sort, std::ranges::less{}, &P2::x); - test_range_algo<5, P2>{}(dpl_ranges::sort, std::ranges::sort, std::ranges::greater{}, &P2::x); + test_range_algo<4, P2>{}(dpl_ranges::sort, sort_checker, std::ranges::less{}, &P2::x); + test_range_algo<5, P2>{}(dpl_ranges::sort, sort_checker, std::ranges::greater{}, &P2::x); - test_range_algo<6, P2>{}(dpl_ranges::sort, std::ranges::sort, std::ranges::less{}, &P2::proj); - test_range_algo<7, P2>{}(dpl_ranges::sort, std::ranges::sort, std::ranges::greater{}, &P2::proj); + test_range_algo<6, P2>{}(dpl_ranges::sort, sort_checker, std::ranges::less{}, &P2::proj); + test_range_algo<7, P2>{}(dpl_ranges::sort, sort_checker, std::ranges::greater{}, &P2::proj); #endif //_ENABLE_STD_RANGES_TESTING return TestUtils::done(_ENABLE_STD_RANGES_TESTING);