summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template17.C
blob: ac6c2e2d4bc17afa9a12b5fc088269bb5d177130 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// PR c++/97582
// { dg-do compile { target c++11 } }

struct C1 { void operator+(); };
struct C2 { void operator+(); };
struct C3 : C1, C2 {
  template <class T> void get() { [] (T x) { +x; }; } // { dg-error "ambiguous" }
};

template void C3::get<C1>(); // { dg-bogus "" }
template void C3::get<C2>(); // { dg-bogus "" }
template void C3::get<C3>(); // { dg-message "required from here" }