Add noexcept to shared_ptr owner comparisons (LWG 2873)
authorJonathan Wakely <jwakely@redhat.com>
Mon, 5 Jun 2017 09:33:19 +0000 (10:33 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 5 Jun 2017 09:33:19 +0000 (10:33 +0100)
commitd08606ce6ceef0cb9fb2620e7dc2685867ce00df
treee8c75dfb574ebf28307c5c8ec019a80f59115c38
parentd91561cb51f04fceb0c71858503791edba424aac
Add noexcept to shared_ptr owner comparisons (LWG 2873)

* include/bits/shared_ptr_base.h (__shared_ptr::owner_before)
(__weak_ptr::owner_before, _Sp_owner_less::operator()): Add noexcept
specifiers as per LWG 2873 and LWG 2942.
* testsuite/20_util/owner_less/noexcept.cc: New.
* testsuite/20_util/shared_ptr/observers/owner_before.cc: Test
noexcept guarantees.
* testsuite/20_util/weak_ptr/observers/owner_before.cc: Likewise.

From-SVN: r248874
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/shared_ptr_base.h
libstdc++-v3/testsuite/20_util/owner_less/noexcept.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/shared_ptr/observers/owner_before.cc
libstdc++-v3/testsuite/20_util/weak_ptr/observers/owner_before.cc