Debian Codegraph @

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

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