[Patch] Implement is_[nothrow_]swappable (p0185r1) - 2nd try

Jonathan Wakely jwakely@redhat.com
Thu Jun 16 15:08:00 GMT 2016


On 16/06/16 14:08 +0100, Jonathan Wakely wrote:
>/home/jwakely/src/gcc/gcc/libstdc++-v3/testsuite/20_util/is_nothrow_swappable/./value.h:285:3:
>error: static assertion failed
>/home/jwakely/src/gcc/gcc/libstdc++-v3/testsuite/20_util/is_nothrow_swappable/./value.h:287:3:
>error: static assertion failed
>/home/jwakely/src/gcc/gcc/libstdc++-v3/testsuite/20_util/is_nothrow_swappable/./value.h:289:3:
>error: static assertion failed
>
>Those assertions fail for both 20_util/is_nothrow_swappable/value.cc
>and 20_util/is_nothrow_swappable/value_ext.cc

Those assertions should be changed because with your patch queue,
priority_queue and stack are nothrow swappable, because they don't
depend on the value_type's swappable trait, but the sequence's.

The other problems are that some tests need their dg-error lines
adjusting, and <type_traits> says #ifdef __cplusplus >= 201402L which
should be #if.

Here's the patch I've tested and committed, thanks for working on
this!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 87707 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20160616/e0584060/attachment.bin>


More information about the Libstdc++ mailing list