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
20static_assert(std::is_execution_policy<std::execution::sequenced_policy>::value);
21static_assert(std::is_execution_policy_v<std::execution::sequenced_policy>);
22static_assert(std::is_execution_policy<std::execution::parallel_policy>::value);
23static_assert(std::is_execution_policy_v<std::execution::parallel_policy>);
24static_assert(std::is_execution_policy<std::execution::parallel_unsequenced_policy>::value);
25static_assert(std::is_execution_policy_v<std::execution::parallel_unsequenced_policy>);
26
27#if TEST_STD_VER >= 20
28static_assert(std::is_execution_policy<std::execution::unsequenced_policy>::value);
29static_assert(std::is_execution_policy_v<std::execution::unsequenced_policy>);
30#endif
31

source code of libcxx/test/std/utilities/expol/is_execution_policy.compile.pass.cpp