Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template17.C

raw
1 // PR c++/97582
2 // { dg-do compile { target c++11 } }
3
4 struct C1 { void operator+(); };
5 struct C2 { void operator+(); };
6 struct C3 : C1, C2 {
7 template <class T> void get() { [] (T x) { +x; }; } // { dg-error "ambiguous" }
8 };
9
10 template void C3::get<C1>(); // { dg-bogus "" }
11 template void C3::get<C2>(); // { dg-bogus "" }
12 template void C3::get<C3>(); // { dg-message "required from here" }