gcc/libstdc++-v3/include/std
Ville Voutilainen a2863bde75 Implement LWG 2766,
Swapping non-swappable types and LWG 2749,
swappable traits for variants.
* include/bits/move.h (swap(_Tp&, _Tp&)): Constrain
with __is_tuple_like.
* include/bits/stl_pair.h (swap(pair<_T1, _T2>&, pair<_T1, _T2>&)):
Add a deleted overload.
* include/bits/unique_ptr.h
(swap(unique_ptr<_Tp, _Dp>&, unique_ptr<_Tp, _Dp>&)): Likewise.
* include/std/array
(swap(array<_Tp, _Nm>&, array<_Tp, _Nm>&)): Likewise.
* include/std/optional
(swap(optional<_Tp>&, optional<_Tp>&)): Likewise.
* include/std/tuple (__is_tuple_like_impl, __is_tuple_like):
Move to type_traits.
(swap(tuple<_Elements...>&, tuple<_Elements...>&)): Add a deleted
overload.
* include/std/type_traits (__is_tuple_like_impl, __is_tuple_like):
New.
(swap(_Tp&, _Tp&)): Constrain with __is_tuple_like.
* include/std/utility (__is_tuple_like_impl): Move to type_traits.
* include/std/variant
(swap(variant<_Types...>&, variant<_Types...>&)):
Add a deleted overload.
* testsuite/20_util/optional/swap/2.cc: Add tests for disabled
swaps.
* testsuite/20_util/pair/swap_cxx17.cc: New.
* testsuite/20_util/tuple/swap_cxx17.cc: Likewise.
* testsuite/20_util/unique_ptr/specialized_algorithms/swap_cxx17.cc:
Likewise.
* testsuite/20_util/variant/compile.cc: Add tests for disabled
swaps.
* testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
New.
* testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust.
* testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
Likewise.

From-SVN: r243120
2016-12-01 18:23:21 +02:00
..
algorithm Update copyright years. 2016-01-04 15:30:50 +01:00
any Implement P0504R0 (Revisiting in-place tag types for any/optional/variant). 2016-11-14 22:47:44 +02:00
array Implement LWG 2766, 2016-12-01 18:23:21 +02:00
atomic Define std::atomic<T>::is_always_lock_free for C++17 2016-08-19 16:42:27 +01:00
bitset Remove trailing whitespace from libstdc++ headers 2016-06-16 14:47:35 +01:00
chrono Replace non-constexpr decrement in std::chrono::floor 2016-10-13 15:42:09 +01:00
codecvt Update copyright years. 2016-01-04 15:30:50 +01:00
complex Fix libstdc++ versioned namespace build 2016-10-03 15:35:28 +01:00
condition_variable Remove trailing whitespace from libstdc++ headers 2016-06-16 14:47:35 +01:00
deque Update copyright years. 2016-01-04 15:30:50 +01:00
forward_list Update copyright years. 2016-01-04 15:30:50 +01:00
fstream Remove trailing whitespace from libstdc++ headers 2016-06-16 14:47:35 +01:00
functional Split <functional> into smaller pieces 2016-10-21 16:32:25 +01:00
future Make std::future::share() noexcept (LWG 2556) 2016-11-14 03:44:53 +00:00
iomanip Remove trailing whitespace from libstdc++ headers 2016-06-16 14:47:35 +01:00
ios Update copyright years. 2016-01-04 15:30:50 +01:00
iosfwd Remove trailing whitespace from libstdc++ headers 2016-06-16 14:47:35 +01:00
iostream Update copyright years. 2016-01-04 15:30:50 +01:00
istream The convertible_to traits need to use a variadic catch-all for the false-cases. 2016-12-01 09:14:19 +02:00
iterator Update copyright years. 2016-01-04 15:30:50 +01:00
limits Remove trailing whitespace from libstdc++ headers 2016-06-16 14:47:35 +01:00
list Update copyright years. 2016-01-04 15:30:50 +01:00
locale Update copyright years. 2016-01-04 15:30:50 +01:00
map Update copyright years. 2016-01-04 15:30:50 +01:00
memory Avoid #include <functional> in other headers 2016-10-13 17:59:19 +01:00
mutex Split <functional> into smaller pieces 2016-10-21 16:32:25 +01:00
numeric LWG 2733, LWG 2759 reject bool in gcd and lcm 2016-10-10 13:17:34 +01:00
optional Implement LWG 2766, 2016-12-01 18:23:21 +02:00
ostream The convertible_to traits need to use a variadic catch-all for the false-cases. 2016-12-01 09:14:19 +02:00
queue Update copyright years. 2016-01-04 15:30:50 +01:00
random Update copyright years. 2016-01-04 15:30:50 +01:00
ratio Implement C++17 variable templates for type traits. 2016-07-29 22:01:39 +03:00
regex Split <functional> into smaller pieces 2016-10-21 16:32:25 +01:00
scoped_allocator Avoid copies in std::scoped_allocator_adaptor piecewise construction 2016-10-14 17:12:21 +01:00
set Update copyright years. 2016-01-04 15:30:50 +01:00
shared_mutex Define C++17 feature-test macros 2016-08-03 19:11:10 +01:00
sstream Remove trailing whitespace from libstdc++ headers 2016-06-16 14:47:35 +01:00
stack Update copyright years. 2016-01-04 15:30:50 +01:00
stdexcept Remove trailing whitespace from libstdc++ headers 2016-06-16 14:47:35 +01:00
streambuf Update copyright years. 2016-01-04 15:30:50 +01:00
string Remove trailing whitespace from libstdc++ headers 2016-06-16 14:47:35 +01:00
string_view Implement P0403R1, Literal suffixes for basic_string_view. 2016-11-13 22:54:27 +02:00
system_error Implement C++17 variable templates for type traits. 2016-07-29 22:01:39 +03:00
thread PR77998 Remove std:🧵:_Invoker::result_type 2016-10-17 13:23:09 +01:00
tuple Implement LWG 2766, 2016-12-01 18:23:21 +02:00
type_traits Implement LWG 2766, 2016-12-01 18:23:21 +02:00
typeindex Update copyright years. 2016-01-04 15:30:50 +01:00
unordered_map Update copyright years. 2016-01-04 15:30:50 +01:00
unordered_set Update copyright years. 2016-01-04 15:30:50 +01:00
utility Implement LWG 2766, 2016-12-01 18:23:21 +02:00
valarray Remove trailing whitespace from libstdc++ headers 2016-06-16 14:47:35 +01:00
variant Implement LWG 2766, 2016-12-01 18:23:21 +02:00
vector Remove trailing whitespace from libstdc++ headers 2016-06-16 14:47:35 +01:00