diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-21 16:18:38 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-21 16:18:38 +0000 |
commit | e88a1fbf6bb65809452216f99f9357c8d7a1c187 (patch) | |
tree | 33a80a666b17715e8060cd31b2e1722080dc01e2 /gcc/testsuite/g++.dg/ext/has_nothrow_copy-2.C | |
parent | 4718112e4979ecd3b8cc8abbb7628b4303dfbf76 (diff) | |
download | gcc-e88a1fbf6bb65809452216f99f9357c8d7a1c187.tar.gz |
/cp
2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/36871
PR c++/36872
* semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
copy constructors and copy assignment operators proper.
/testsuite
2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/36871
PR c++/36872
* g++.dg/ext/has_nothrow_copy.C: Rename to...
* g++.dg/ext/has_nothrow_copy-1.C: ... this.
* g++.dg/ext/has_nothrow_copy-2.C: New.
* g++.dg/ext/has_nothrow_copy-3.C: Likewise.
* g++.dg/ext/has_nothrow_copy-4.C: Likewise.
* g++.dg/ext/has_nothrow_copy-5.C: Likewise.
* g++.dg/ext/has_nothrow_copy-6.C: Likewise.
* g++.dg/ext/has_nothrow_copy-7.C: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138034 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg/ext/has_nothrow_copy-2.C')
-rw-r--r-- | gcc/testsuite/g++.dg/ext/has_nothrow_copy-2.C | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ext/has_nothrow_copy-2.C b/gcc/testsuite/g++.dg/ext/has_nothrow_copy-2.C new file mode 100644 index 00000000000..276b11d574c --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/has_nothrow_copy-2.C @@ -0,0 +1,12 @@ +// PR c++/36871 +// { dg-do "run" } +#include <cassert> + +struct A { template <class T> A (T) throw (int); }; +struct B { B (B&) throw (); template <class T> B (T) throw (int); }; + +int main () +{ + assert (__has_nothrow_copy (A)); + assert (__has_nothrow_copy (B)); +} |