Debian Codegraph @

gcc/testsuite/g++.dg/lookup/operator-2.C

raw
1 // { dg-do compile { target c++11 } }
2
3 struct R{};
4 bool operator! (R); // { dg-message "candidate .:" }
5
6 template <typename T> bool Foo (T x)
7 {
8 return [](T x)
9 { return !x; }(x); // { dg-error "no match for 'operator!'" }
10 }
11
12 namespace X
13 {
14 struct S {};
15 }
16
17 // not found by adl :)
18 bool operator! (X::S);
19
20 int main ()
21 {
22 Foo (X::S{});
23 }