Add __is_nothrow_swappable and take it into use.
authorVille Voutilainen <ville.voutilainen@gmail.com>
Fri, 5 Jun 2015 14:44:26 +0000 (17:44 +0300)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 5 Jun 2015 14:44:26 +0000 (15:44 +0100)
commitddb63209a8dc059a7b2a137d7a1859222bb43dd6
tree3ceea62da88739a862bf476777be8b79b37f00a6
parentac59f9beec4e2f44bd3c04eb8f4fb9432feaea40
Add __is_nothrow_swappable and take it into use.

2015-06-04  Ville Voutilainen  <ville.voutilainen@gmail.com>

Add __is_nothrow_swappable and take it into use.
* include/bits/algorithmfwd.h (swap): Only declare for C++98 mode.
* include/bits/move.h (swap): Add constraints in C++11 and later.
* include/bits/stl_pair.h (swap): Use __is_nothrow_swappable
for the free swap function for pair.
* include/bits/stl_queue.h (swap): Use __is_nothrow_swappable
for the free swap functions for queue and priority_queue.
* include/bits/stl_stack.h (swap): Use __is_nothrow_swappable
for the free swap function for stack.
* include/debug/array (swap): Use __is_nothrow_swappable
for the free swap function for array.
* include/profile/array (swap): Likewise.
* include/std/array (swap): Likewise.
* include/std/tuple (_Tuple_impl::_M_swap): Use __is_nothrow_swappable.
* include/std/type_traits (__is_swappable_impl::__is_swappable,
__is_nothrow_swappable_impl, __is_nothrow_swappable): New.
* testsuite/20_util/is_nothrow_swappable/requirements/
explicit_instantiation.cc: New.
* testsuite/20_util/is_nothrow_swappable/requirements/typedefs.cc:
New.
* testsuite/20_util/is_nothrow_swappable/value.cc: New.

From-SVN: r224153
14 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/algorithmfwd.h
libstdc++-v3/include/bits/move.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/debug/array
libstdc++-v3/include/profile/array
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 [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_nothrow_swappable/requirements/typedefs.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_nothrow_swappable/value.cc [new file with mode: 0644]