Debian Codegraph @

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

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