aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2015-06-12 00:22:19 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2015-06-12 00:22:19 +0100
commit7672ab25db2459b86afa56533feb36a2f83c080a (patch)
tree57c93cc88b222d32d10daa3d5c5bd91500f18c3d
parent3ab604d5282abad7d4e04ba93a312fdf867757eb (diff)
downloadgcc-7672ab25db2459b86afa56533feb36a2f83c080a.zip
gcc-7672ab25db2459b86afa56533feb36a2f83c080a.tar.gz
gcc-7672ab25db2459b86afa56533feb36a2f83c080a.tar.bz2
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
-rw-r--r--libstdc++-v3/ChangeLog7
-rw-r--r--libstdc++-v3/include/std/tuple2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/headers/algorithm/synopsis.cc6
3 files changed, 13 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 4335a25..91a5d88 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,10 @@
+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>
PR libstdc++/66030
diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/std/tuple
index ccea02b..953d16b 100644
--- a/libstdc++-v3/include/std/tuple
+++ b/libstdc++-v3/include/std/tuple
@@ -989,7 +989,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ };
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.
diff --git a/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/synopsis.cc b/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/synopsis.cc
index 4758796..7b11872 100644
--- a/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/synopsis.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/synopsis.cc
@@ -136,14 +136,18 @@ namespace std
copy_backward (_BIter1, _BIter1, _BIter2);
// 25.2.2, swap:
+#if __cplusplus < 201103L
template<typename _Tp>
void
swap(_Tp&, _Tp& b);
-#if __cplusplus >= 201103L
template<typename _Tp, size_t _Nm>
void
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
template<typename _FIter1, typename _FIter2>