diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/rv-copy1.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/rv-copy1.C | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-copy1.C b/gcc/testsuite/g++.dg/cpp0x/rv-copy1.C new file mode 100644 index 00000000000..70d3d719222 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/rv-copy1.C @@ -0,0 +1,10 @@ +// PR c++/55017 +// { dg-do compile { target c++11 } } + +struct S { // { dg-error "rvalue ref" } + int&& rr; + S(int&& rr) : rr(static_cast<int&&>(rr)) {} +}; + +S s1(13); +S s2 = s1; // { dg-error "deleted" } |