Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/rv-conv5.C

raw
1 // PR c++/113064
2 // { dg-do compile { target c++11 } }
3
4 struct no_copy {
5 no_copy() = default;
6
7 no_copy(const no_copy&) = delete;
8 no_copy(no_copy&&);
9
10 no_copy& operator=(const no_copy&) = delete;
11 no_copy& operator=(no_copy&&);
12 };
13
14 struct A {
15 operator no_copy() &;
16 operator no_copy&&() && = delete;
17 };
18
19 int main() {
20 no_copy nc;
21 A a;
22 nc = a;
23 }