[Patch, libstdc++/68877] Reimplement __is_[nothrow_]swappable
Daniel Krügler
daniel.kruegler@gmail.com
Mon Dec 21 11:45:00 GMT 2015
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
Jonathan explained to me that changelog entries should not be send as
diff, but just as plain text with the recommended addition, therefore
resending with that change applied.
Thanks,
- Daniel
-------------- next part --------------
2015-12-14 Daniel Kruegler <daniel.kruegler@gmail.com>
PR libstdc++/68877
* include/std/type_traits: Following N4511, reimplement __is_swappable and
__is_nothrow_swappable. Move __is_swappable to namespace std, adjust
callers. Use __is_nothrow_swappable in swap.
* include/bits/move.h: Use __is_nothrow_swappable in swap.
* testsuite/20_util/is_nothrow_swappable/value.cc: Extend; remove
__is_swappable related tests.
* testsuite/20_util/is_swappable/value.cc: New.
* testsuite/20_util/is_swappable/requirements/explicit_instantiation.cc:
New.
* testsuite/20_util/is_swappable/requirements/typedefs.cc: New.
* testsuite/25_algorithms/swap/68877.cc: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 68877.patch
Type: application/octet-stream
Size: 39839 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20151221/25c1254a/attachment.obj>
More information about the Libstdc++
mailing list