This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, libstdc++/68877] Reimplement __is_[nothrow_]swappable
- From: Daniel KrÃgler <daniel dot kruegler at gmail dot com>
- To: Jonathan Wakely <jwakely at redhat dot com>
- Cc: "libstdc++" <libstdc++ at gcc dot gnu dot org>, gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 22 Dec 2015 22:58:22 +0100
- Subject: Re: [Patch, libstdc++/68877] Reimplement __is_[nothrow_]swappable
- Authentication-results: sourceware.org; auth=none
- References: <CAGNvRgB=KXLJ+Ppug_HE+09-i5OCR72JCA3OYUV5MoZ6paye8w at mail dot gmail dot com> <CAGNvRgC44=onghtfr5AqnuH56jUx1-sn2bMp5j7YpW5S27mWPQ at mail dot gmail dot com> <20151222214257 dot GI5356 at redhat dot com>
2015-12-22 22:42 GMT+01:00 Jonathan Wakely <jwakely@redhat.com>:
> On 21/12/15 12:45 +0100, Daniel KrÃgler wrote:
>>
>> 2015-12-14 21:48 GMT+01:00 Daniel KrÃgler <daniel.kruegler@gmail.com>:
>>>
>>> This is a reimplementation of __is_swappable and
>>> __is_nothrow_swappable according to
>>>
>>> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4511.html
>>>
>>> and also adds a missing usage of __is_nothrow_swappable in the swap
>>> overload for arrays. Strictly speaking the latter change differs from
>>> the Standard specification which requires the expression
>>> noexcept(swap(*a, *b)) to be used. On the other hand the Standard is
>>> broken in this regard, as pointed out by
>>>
>>> http://cplusplus.github.io/LWG/lwg-active.html#2554
>
>
> The patch doesn't apply cleanly because it repeats some of the new
> files either twice or three times (and also has some trailing
> whitespace that shouldn't be there). After fixing the patch to only
> create new files once it applies, but then I get some FAILs:
>
> FAIL: 20_util/is_nothrow_swappable/value.cc (test for excess errors)
> FAIL: 20_util/is_swappable/value.cc (test for excess errors)
>
> I don't have time to analyse these today, so I'll wait until you're
> able to do so. There's no great rush to fix this, as long as it's in
> stage 3.
Thanks for looking at this. When will stage 3 end?
Thanks,
- Daniel