diff options
| author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-04-24 22:00:16 +0000 |
|---|---|---|
| committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-04-24 22:00:16 +0000 |
| commit | 001c0d29c11a875ebaf61ffe3050be1a4ddaba27 (patch) | |
| tree | e2f44526ebfdbc4e96f7cc71152db007247579d7 /libstdc++-v3/libsupc++ | |
| parent | 74855d080d0657185317ae63bac158040908c3fe (diff) | |
| download | ppe42-gcc-001c0d29c11a875ebaf61ffe3050be1a4ddaba27.tar.gz ppe42-gcc-001c0d29c11a875ebaf61ffe3050be1a4ddaba27.zip | |
PR libstdc++/56905
* libsupc++/exception_ptr.h (copy_exception): Deprecate and
move implementation to make_exception_ptr.
* include/std/future (_State_base::_M_break_promise): Replace
copy_exception with make_exception_ptr.
* testsuite/18_support/exception_ptr/move.cc: Likewise.
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Likewise.
* testsuite/30_threads/future/members/get2.cc: Likewise.
* testsuite/30_threads/promise/members/set_exception.cc: Likewise.
* testsuite/30_threads/promise/members/set_exception2.cc: Likewise.
* testsuite/30_threads/promise/members/set_value2.cc: Likewise.
* testsuite/30_threads/shared_future/members/get2.cc: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198265 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/libsupc++')
| -rw-r--r-- | libstdc++-v3/libsupc++/exception_ptr.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/libstdc++-v3/libsupc++/exception_ptr.h b/libstdc++-v3/libsupc++/exception_ptr.h index bbf8f85d47b..effab347c85 100644 --- a/libstdc++-v3/libsupc++/exception_ptr.h +++ b/libstdc++-v3/libsupc++/exception_ptr.h @@ -166,7 +166,7 @@ namespace std /// Obtain an exception_ptr pointing to a copy of the supplied object. template<typename _Ex> exception_ptr - copy_exception(_Ex __ex) _GLIBCXX_USE_NOEXCEPT + make_exception_ptr(_Ex __ex) _GLIBCXX_USE_NOEXCEPT { __try { @@ -183,10 +183,15 @@ namespace std // _GLIBCXX_RESOLVE_LIB_DEFECTS // 1130. copy_exception name misleading /// Obtain an exception_ptr pointing to a copy of the supplied object. + /// This function is deprecated, use std::make_exception_ptr instead. template<typename _Ex> - exception_ptr - make_exception_ptr(_Ex __ex) _GLIBCXX_USE_NOEXCEPT - { return std::copy_exception<_Ex>(__ex); } + exception_ptr + copy_exception(_Ex __ex) _GLIBCXX_USE_NOEXCEPT _GLIBCXX_DEPRECATED; + + template<typename _Ex> + exception_ptr + copy_exception(_Ex __ex) _GLIBCXX_USE_NOEXCEPT + { return std::make_exception_ptr<_Ex>(__ex); } // @} group exceptions } // namespace std |

