xref: /llvm-project/pstl/test/std/numerics/numeric.ops/scan.fail.cpp (revision 843c12d6a0cdfd64c5a92e24eb58ba9ee17ca1ee)
1 // -*- C++ -*-
2 //===-- scan.fail.cpp -----------------------------------------------------===//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
9 
10 // UNSUPPORTED: c++03, c++11, c++14
11 
12 #include <execution>
13 #include <numeric>
14 
15 struct CustomPolicy
16 {
17 } policy;
18 
19 int32_t
main()20 main()
21 {
22     int *first = nullptr, *last = nullptr, *result = nullptr;
23 
24     std::exclusive_scan(policy, first, last, result, 0); // expected-error {{no matching function for call to 'exclusive_scan'}}
25     std::exclusive_scan(policy, first, last, result, 0, std::plus<int>()); // expected-error {{no matching function for call to 'exclusive_scan'}}
26 
27     return 0;
28 }
29