]>
Commit | Line | Data |
---|---|---|
f0673555 | 1 | // PR c++/39866 |
4b2e63de | 2 | // { dg-do compile { target c++11 } } |
f0673555 JM |
3 | |
4 | struct A { | |
5 | A& operator=(const A&) = delete; // { dg-bogus "" } | |
6 | ||
7 | void operator=(int) {} // { dg-message "" } | |
8 | void operator=(char) {} // { dg-message "" } | |
9 | }; | |
10 | ||
11 | struct B {}; | |
12 | ||
13 | int main() | |
14 | { | |
15 | A a; | |
16 | a = B(); // { dg-error "no match" } | |
17 | a = 1.0; // { dg-error "ambiguous" } | |
18 | } |