diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2015-11-11 10:08:23 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2015-11-11 10:08:23 +0000 |
commit | 832ca6ac7252f3dcde1fe4dbe8284a1961449e2b (patch) | |
tree | 648fbfb24202dfca549dbfd720664270c74cbfea | |
parent | 9a5571385680e5a7ea53268fb025399f9c861eb3 (diff) | |
download | gcc-832ca6ac7252f3dcde1fe4dbe8284a1961449e2b.zip gcc-832ca6ac7252f3dcde1fe4dbe8284a1961449e2b.tar.gz gcc-832ca6ac7252f3dcde1fe4dbe8284a1961449e2b.tar.bz2 |
re PR libstdc++/64651 (std::rethrow_exception not found by ADL)
PR libstdc++/64651
* libsupc++/exception_ptr.h (rethrow_exception): Add using-declaration
to __exception_ptr namespace.
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Test ADL.
Remove unnecessary test variables.
From-SVN: r230147
-rw-r--r-- | libstdc++-v3/ChangeLog | 8 | ||||
-rw-r--r-- | libstdc++-v3/libsupc++/exception_ptr.h | 2 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc | 14 |
3 files changed, 21 insertions, 3 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 5d41876a..960a56c 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,11 @@ +2015-11-11 Jonathan Wakely <jwakely@redhat.com> + + PR libstdc++/64651 + * libsupc++/exception_ptr.h (rethrow_exception): Add using-declaration + to __exception_ptr namespace. + * testsuite/18_support/exception_ptr/rethrow_exception.cc: Test ADL. + Remove unnecessary test variables. + 2015-11-10 Jonathan Wakely <jwakely@redhat.com> PR libstdc++/68190 diff --git a/libstdc++-v3/libsupc++/exception_ptr.h b/libstdc++-v3/libsupc++/exception_ptr.h index 8fbad1c..7821c14 100644 --- a/libstdc++-v3/libsupc++/exception_ptr.h +++ b/libstdc++-v3/libsupc++/exception_ptr.h @@ -68,6 +68,8 @@ namespace std namespace __exception_ptr { + using std::rethrow_exception; + /** * @brief An opaque pointer to an arbitrary exception. * @ingroup exceptions diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc index 31da2ec..7d39892 100644 --- a/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc +++ b/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc @@ -30,7 +30,6 @@ void test01() { - bool test __attribute__((unused)) = true; using namespace std; try { @@ -54,7 +53,6 @@ void test02() void test03() { - bool test __attribute__((unused)) = true; using namespace std; exception_ptr ep; @@ -71,7 +69,6 @@ void test03() void test04() { - bool test __attribute__((unused)) = true; using namespace std; // Weave the exceptions in an attempt to confuse the machinery. @@ -103,12 +100,23 @@ void test04() } } +void test05() +{ + // libstdc++/64651 std::rethrow_exception not found by ADL + // This is not required to work but is a conforming extension. + try { + rethrow_exception(std::make_exception_ptr(0)); + } catch(...) { + } +} + int main() { test01(); test02(); test03(); test04(); + test05(); return 0; } |