Commit 7672ab25 by Jonathan Wakely Committed by Jonathan Wakely

tuple (__is_tuple_like_impl): Disambiguate array in debug and profile modes.

	* include/std/tuple (__is_tuple_like_impl): Disambiguate array in
	debug and profile modes.
	* testsuite/25_algorithms/headers/algorithm/synopsis.cc: Adjust tests
	for swap in C++11 and later.

From-SVN: r224397
parent 3ab604d5
2015-06-12 Jonathan Wakely <jwakely@redhat.com>
* include/std/tuple (__is_tuple_like_impl): Disambiguate array in
debug and profile modes.
* testsuite/25_algorithms/headers/algorithm/synopsis.cc: Adjust tests
for swap in C++11 and later.
2015-06-09 Jonathan Wakely <jwakely@redhat.com> 2015-06-09 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/66030 PR libstdc++/66030
......
...@@ -989,7 +989,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -989,7 +989,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ }; { };
template<typename _Tp, std::size_t _Nm> template<typename _Tp, std::size_t _Nm>
struct __is_tuple_like_impl<array<_Tp, _Nm>> : true_type struct __is_tuple_like_impl<_GLIBCXX_STD_C::array<_Tp, _Nm>> : true_type
{ }; { };
// Internal type trait that allows us to sfinae-protect tuple_cat. // Internal type trait that allows us to sfinae-protect tuple_cat.
......
...@@ -136,14 +136,18 @@ namespace std ...@@ -136,14 +136,18 @@ namespace std
copy_backward (_BIter1, _BIter1, _BIter2); copy_backward (_BIter1, _BIter1, _BIter2);
// 25.2.2, swap: // 25.2.2, swap:
#if __cplusplus < 201103L
template<typename _Tp> template<typename _Tp>
void void
swap(_Tp&, _Tp& b); swap(_Tp&, _Tp& b);
#if __cplusplus >= 201103L
template<typename _Tp, size_t _Nm> template<typename _Tp, size_t _Nm>
void void
swap(_Tp (&)[_Nm], _Tp (&)[_Nm]); swap(_Tp (&)[_Nm], _Tp (&)[_Nm]);
#else
// C++11 swap() has complicated SFINAE constraints, test signatures like so:
void (*swap_scalars)(int&, int&) = &swap;
void (*swap_arrays)(int(&)[5], int(&)[5]) = &swap;
#endif #endif
template<typename _FIter1, typename _FIter2> template<typename _FIter1, typename _FIter2>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment