This is the mail archive of the
mailing list for the libstdc++ project.
Re: [PATCH] Add noexcept to shared_ptr owner comparisons (LWG 2873)
- From: Christophe Lyon <christophe dot lyon at linaro dot org>
- To: Jonathan Wakely <jwakely at redhat dot com>
- Cc: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 5 Sep 2017 08:30:38 +0200
- Subject: Re: [PATCH] Add noexcept to shared_ptr owner comparisons (LWG 2873)
- Authentication-results: sourceware.org; auth=none
- References: <20170605093423.GA11607@redhat.com>
On 5 June 2017 at 11:34, Jonathan Wakely <email@example.com> wrote:
> C++17 requires these to be noexcept, and there's no reason not to do
> it for earlier standard modes too.
> * 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.
> Tested powerpc64le-linux, committed to trunk.
I've noticed you have backported this patch to gcc-6-branch (r251673).
The new test testsuite/20_util/owner_less/noexcept.cc fails with:
aggregate 'const std::owner_less<void> ov' has incomplete type and
cannot be defined