diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/implicit-copy.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/implicit-copy.C | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/implicit-copy.C b/gcc/testsuite/g++.dg/cpp0x/implicit-copy.C new file mode 100644 index 000000000..861fe201f --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/implicit-copy.C @@ -0,0 +1,15 @@ +// { dg-options "--std=c++0x" } +struct S +{ + S(); +private: + S(S const &&); // { dg-error "" } + S & operator=(S const &&); // { dg-error "" } +}; + +void f() +{ + S a; + S b(a); // { dg-error "" } + a = b; // { dg-error "" } +} |