Provide swappable traits (p0185r1)
authorDaniel Kruegler <daniel.kruegler@gmail.com>
Thu, 16 Jun 2016 15:07:19 +0000 (15:07 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 16 Jun 2016 15:07:19 +0000 (16:07 +0100)
commit6b9539e2aa811e84847db2deb1adfc288c7157b7
treed9c81b59eb0c9725f8f69924f452f5c2575a9472
parentb6ca982f5108c5982762eb2e7c361a88c082bc5d
Provide swappable traits (p0185r1)

2016-06-16  Daniel Kruegler  <daniel.kruegler@gmail.com>

Provide swappable traits (p0185r1)
* include/std/type_traits (is_swappable, is_nothrow_swappable,
is_swappable_with, is_nothrow_swappable_with, is_swappable_v,
is_nothrow_swappable_v, is_swappable_with_v,
is_nothrow_swappable_with_v): New.
* include/bits/stl_pair.h: Use it as per p0185r1.
* include/bits/stl_queue.h: Likewise.
* include/bits/stl_stack.h: Likewise.
* include/bits/unique_ptr.h: Likewise.
* include/std/tuple: Likewise.
* include/std/array: Likewise. Fix zero-size member swap.
* include/bits/hashtable.h: Use __and_.
* testsuite/20_util/is_nothrow_swappable/requirements/
explicit_instantiation.cc: Change test options to std=gnu++17.
* testsuite/20_util/is_nothrow_swappable/requirements/typedefs.cc:
Likewise.
* testsuite/20_util/is_nothrow_swappable/value.cc: Likewise.
* testsuite/20_util/is_swappable/requirements/
explicit_instantiation.cc: Likewise.
* testsuite/20_util/is_swappable/requirements/typedefs.cc: Likewise.
* testsuite/20_util/is_swappable/value.cc: Likewise.
* testsuite/20_util/is_nothrow_swappable/requirements/
explicit_instantiation_ext.cc: New.
* testsuite/20_util/is_nothrow_swappable/requirements/typedefs_ext.cc:
New.
* testsuite/20_util/is_nothrow_swappable/value.h: New.
* testsuite/20_util/is_nothrow_swappable/value_ext.cc: New.
* testsuite/20_util/is_nothrow_swappable_with/requirements/
explicit_instantiation.cc: New.
* testsuite/20_util/is_nothrow_swappable_with/requirements/typedefs.cc:
New.
* testsuite/20_util/is_nothrow_swappable_with/value.cc: New.
* testsuite/20_util/is_swappable/requirements/
explicit_instantiation_ext.cc: New.
* testsuite/20_util/is_swappable/requirements/typedefs_ext.cc: New.
* testsuite/20_util/is_swappable/value.h: New.
* testsuite/20_util/is_swappable/value_ext.cc: New.
* testsuite/20_util/is_swappable_with/requirements/
explicit_instantiation.cc: New.
* testsuite/20_util/is_swappable_with/requirements/typedefs.cc: New.
* testsuite/20_util/is_swappable_with/value.cc: New.
* testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust
dg-error line numbers.
* testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
Likewise.

From-SVN: r237531
31 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/hashtable.h
libstdc++-v3/include/bits/stl_pair.h
libstdc++-v3/include/bits/stl_queue.h
libstdc++-v3/include/bits/stl_stack.h
libstdc++-v3/include/bits/unique_ptr.h
libstdc++-v3/include/std/array
libstdc++-v3/include/std/tuple
libstdc++-v3/include/std/type_traits
libstdc++-v3/testsuite/20_util/is_nothrow_swappable/requirements/explicit_instantiation.cc
libstdc++-v3/testsuite/20_util/is_nothrow_swappable/requirements/explicit_instantiation_ext.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_nothrow_swappable/requirements/typedefs.cc
libstdc++-v3/testsuite/20_util/is_nothrow_swappable/requirements/typedefs_ext.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_nothrow_swappable/value.cc
libstdc++-v3/testsuite/20_util/is_nothrow_swappable/value.h [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_nothrow_swappable/value_ext.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_nothrow_swappable_with/requirements/explicit_instantiation.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_nothrow_swappable_with/requirements/typedefs.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_nothrow_swappable_with/value.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_swappable/requirements/explicit_instantiation.cc
libstdc++-v3/testsuite/20_util/is_swappable/requirements/explicit_instantiation_ext.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_swappable/requirements/typedefs.cc
libstdc++-v3/testsuite/20_util/is_swappable/requirements/typedefs_ext.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_swappable/value.cc
libstdc++-v3/testsuite/20_util/is_swappable/value.h [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_swappable/value_ext.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_swappable_with/requirements/explicit_instantiation.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_swappable_with/requirements/typedefs.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_swappable_with/value.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/array/tuple_interface/get_neg.cc
libstdc++-v3/testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc