1 | //===----------------------------------------------------------------------===// |
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | // template<class T> struct is_execution_policy; |
10 | // template<class T> constexpr bool is_execution_policy_v = is_execution_policy<T>::value; |
11 | |
12 | // UNSUPPORTED: c++03, c++11, c++14 |
13 | |
14 | // UNSUPPORTED: libcpp-has-no-incomplete-pstl |
15 | |
16 | #include <execution> |
17 | |
18 | #include "test_macros.h" |
19 | |
20 | static_assert(std::is_execution_policy<std::execution::sequenced_policy>::value); |
21 | static_assert(std::is_execution_policy_v<std::execution::sequenced_policy>); |
22 | static_assert(std::is_execution_policy<std::execution::parallel_policy>::value); |
23 | static_assert(std::is_execution_policy_v<std::execution::parallel_policy>); |
24 | static_assert(std::is_execution_policy<std::execution::parallel_unsequenced_policy>::value); |
25 | static_assert(std::is_execution_policy_v<std::execution::parallel_unsequenced_policy>); |
26 | |
27 | #if TEST_STD_VER >= 20 |
28 | static_assert(std::is_execution_policy<std::execution::unsequenced_policy>::value); |
29 | static_assert(std::is_execution_policy_v<std::execution::unsequenced_policy>); |
30 | #endif |
31 | |