testsuite: Add dg-require-effective-target scheduling for some tests that set -fsched...
[official-gcc.git] / gcc / testsuite / g++.dg / lookup / operator-5.C
blob2bbb2c41618c0ccfe674a90e19c6887566d20d78
1 // PR c++/51577
2 // { dg-do compile { target c++17 } }
3 // Like operator-4.C but for binary fold expressions.
5 namespace N { struct A { }; }
7 template <class... Ts> void f (Ts... xs) {
8   (xs->*...->*N::A{}); // { dg-error "no match" }
9   (N::A{}->*...->*xs); // { dg-error "no match" }
10   (xs / ... / N::A{}); // { dg-error "no match" }
11   (N::A{} / ... / xs); // { dg-error "no match" }
12   (xs * ... * N::A{}); // { dg-error "no match" }
13   (N::A{} * ... * xs); // { dg-error "no match" }
14   (xs + ... + N::A{}); // { dg-error "no match" }
15   (N::A{} + ... + xs); // { dg-error "no match" }
16   (xs - ... - N::A{}); // { dg-error "no match" }
17   (N::A{} - ... - xs); // { dg-error "no match" }
18   (xs % ... % N::A{}); // { dg-error "no match" }
19   (N::A{} % ... % xs); // { dg-error "no match" }
20   (xs & ... & N::A{}); // { dg-error "no match" }
21   (N::A{} & ... & xs); // { dg-error "no match" }
22   (xs | ... | N::A{}); // { dg-error "no match" }
23   (N::A{} | ... | xs); // { dg-error "no match" }
24   (xs ^ ... ^ N::A{}); // { dg-error "no match" }
25   (N::A{} ^ ... ^ xs); // { dg-error "no match" }
26   (xs << ... << N::A{}); // { dg-error "no match" }
27   (N::A{} << ... << xs); // { dg-error "no match" }
28   (xs >> ... >> N::A{}); // { dg-error "no match" }
29   (N::A{} >> ... >> xs); // { dg-error "no match" }
30   (xs && ... && N::A{}); // { dg-error "no match" }
31   (N::A{} && ... && xs); // { dg-error "no match" }
32   (xs || ... || N::A{}); // { dg-error "no match" }
33   (N::A{} || ... || xs); // { dg-error "no match" }
34   (xs , ... , N::A{});
35   (N::A{} , ... , xs);
37   (xs == ... == N::A{}); // { dg-error "no match" }
38   (N::A{} == ... == xs); // { dg-error "no match" }
39   (xs != ... != N::A{}); // { dg-error "no match" }
40   (N::A{} != ... != xs); // { dg-error "no match" }
41   (xs < ... < N::A{}); // { dg-error "no match" }
42   (N::A{} < ... < xs); // { dg-error "no match" }
43   (xs > ... > N::A{}); // { dg-error "no match" }
44   (N::A{} > ... > xs); // { dg-error "no match" }
45   (xs <= ... <= N::A{}); // { dg-error "no match" }
46   (N::A{} <= ... <= xs); // { dg-error "no match" }
47   (xs >= ... >= N::A{}); // { dg-error "no match" }
48   (N::A{} >= ... >= xs); // { dg-error "no match" }
50   (xs += ... += N::A{}); // { dg-error "no match" }
51   (N::A{} += ... += xs); // { dg-error "no match" }
52   (xs -= ... -= N::A{}); // { dg-error "no match" }
53   (N::A{} -= ... -= xs); // { dg-error "no match" }
54   (xs *= ... *= N::A{}); // { dg-error "no match" }
55   (N::A{} *= ... *= xs); // { dg-error "no match" }
56   (xs /= ... /= N::A{}); // { dg-error "no match" }
57   (N::A{} /= ... /= xs); // { dg-error "no match" }
58   (xs %= ... %= N::A{}); // { dg-error "no match" }
59   (N::A{} %= ... %= xs); // { dg-error "no match" }
60   (xs |= ... |= N::A{}); // { dg-error "no match" }
61   (N::A{} |= ... |= xs); // { dg-error "no match" }
62   (xs ^= ... ^= N::A{}); // { dg-error "no match" }
63   (N::A{} ^= ... ^= xs); // { dg-error "no match" }
64   (xs <<= ... <<= N::A{}); // { dg-error "no match" }
65   (N::A{} <<= ... <<= xs); // { dg-error "no match" }
66   (xs >>= ... >>= N::A{}); // { dg-error "no match" }
67   (N::A{} >>= ... >>= xs); // { dg-error "no match" }
70 #include "operator-3-ops.h"
72 int main() {
73   f(N::A());