//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef TEST_SUPPORT_TEST_EXECUTION_POLICIES #define TEST_SUPPORT_TEST_EXECUTION_POLICIES #include #include #include #include #include #include "test_macros.h" #define EXECUTION_POLICY_SFINAE_TEST(function) \ template \ struct sfinae_test_##function##_impl : std::true_type {}; \ \ template \ struct sfinae_test_##function##_impl()...))>, Args...> \ : std::false_type {}; \ \ template \ constexpr bool sfinae_test_##function = sfinae_test_##function##_impl::value; template bool test_execution_policies(Functor func) { func(std::execution::seq); #if TEST_STD_VER >= 20 func(std::execution::unseq); #endif func(std::execution::par); func(std::execution::par_unseq); return true; } template