Debian Codegraph @

gcc/testsuite/g++.dg/lookup/operator-5a.C

raw
1 // PR c++/51577
2 // { dg-do compile { target c++17 } }
3 // Like operator-5.C but also containing a partial instantiation step.
4
5 namespace N { struct A { }; }
6
7 template <class...> auto f () {
8 return [] (auto... xs) {
9 (xs->*...->*N::A{}); // { dg-error "no match" }
10 (N::A{}->*...->*xs); // { dg-error "no match" }
11 (xs / ... / N::A{}); // { dg-error "no match" }
12 (N::A{} / ... / xs); // { dg-error "no match" }
13 (xs * ... * N::A{}); // { dg-error "no match" }
14 (N::A{} * ... * xs); // { dg-error "no match" }
15 (xs + ... + N::A{}); // { dg-error "no match" }
16 (N::A{} + ... + xs); // { dg-error "no match" }
17 (xs - ... - N::A{}); // { dg-error "no match" }
18 (N::A{} - ... - xs); // { dg-error "no match" }
19 (xs % ... % N::A{}); // { dg-error "no match" }
20 (N::A{} % ... % xs); // { dg-error "no match" }
21 (xs & ... & N::A{}); // { dg-error "no match" }
22 (N::A{} & ... & xs); // { dg-error "no match" }
23 (xs | ... | N::A{}); // { dg-error "no match" }
24 (N::A{} | ... | xs); // { dg-error "no match" }
25 (xs ^ ... ^ N::A{}); // { dg-error "no match" }
26 (N::A{} ^ ... ^ xs); // { dg-error "no match" }
27 (xs << ... << N::A{}); // { dg-error "no match" }
28 (N::A{} << ... << xs); // { dg-error "no match" }
29 (xs >> ... >> N::A{}); // { dg-error "no match" }
30 (N::A{} >> ... >> xs); // { dg-error "no match" }
31 (xs && ... && N::A{}); // { dg-error "no match" }
32 (N::A{} && ... && xs); // { dg-error "no match" }
33 (xs || ... || N::A{}); // { dg-error "no match" }
34 (N::A{} || ... || xs); // { dg-error "no match" }
35 (xs , ... , N::A{});
36 (N::A{} , ... , xs);
37
38 (xs == ... == N::A{}); // { dg-error "no match" }
39 (N::A{} == ... == xs); // { dg-error "no match" }
40 (xs != ... != N::A{}); // { dg-error "no match" }
41 (N::A{} != ... != xs); // { dg-error "no match" }
42 (xs < ... < N::A{}); // { dg-error "no match" }
43 (N::A{} < ... < xs); // { dg-error "no match" }
44 (xs > ... > N::A{}); // { dg-error "no match" }
45 (N::A{} > ... > xs); // { dg-error "no match" }
46 (xs <= ... <= N::A{}); // { dg-error "no match" }
47 (N::A{} <= ... <= xs); // { dg-error "no match" }
48 (xs >= ... >= N::A{}); // { dg-error "no match" }
49 (N::A{} >= ... >= xs); // { dg-error "no match" }
50
51 (xs += ... += N::A{}); // { dg-error "no match" }
52 (N::A{} += ... += xs); // { dg-error "no match" }
53 (xs -= ... -= N::A{}); // { dg-error "no match" }
54 (N::A{} -= ... -= xs); // { dg-error "no match" }
55 (xs *= ... *= N::A{}); // { dg-error "no match" }
56 (N::A{} *= ... *= xs); // { dg-error "no match" }
57 (xs /= ... /= N::A{}); // { dg-error "no match" }
58 (N::A{} /= ... /= xs); // { dg-error "no match" }
59 (xs %= ... %= N::A{}); // { dg-error "no match" }
60 (N::A{} %= ... %= xs); // { dg-error "no match" }
61 (xs |= ... |= N::A{}); // { dg-error "no match" }
62 (N::A{} |= ... |= xs); // { dg-error "no match" }
63 (xs ^= ... ^= N::A{}); // { dg-error "no match" }
64 (N::A{} ^= ... ^= xs); // { dg-error "no match" }
65 (xs <<= ... <<= N::A{}); // { dg-error "no match" }
66 (N::A{} <<= ... <<= xs); // { dg-error "no match" }
67 (xs >>= ... >>= N::A{}); // { dg-error "no match" }
68 (N::A{} >>= ... >>= xs); // { dg-error "no match" }
69 };
70 }
71
72 #include "operator-3-ops.h"
73
74 int main() {
75 f()(N::A());
76 }