summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/25_algorithms/headers
diff options
context:
space:
mode:
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2015-06-11 23:22:19 +0000
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2015-06-11 23:22:19 +0000
commit05b105358a3f35af230a69f690d41882c30297d5 (patch)
tree57c93cc88b222d32d10daa3d5c5bd91500f18c3d /libstdc++-v3/testsuite/25_algorithms/headers
parent8ee2e5f4e7ab5bf83f1b76ef0f6740d8689886ac (diff)
downloadgcc-05b105358a3f35af230a69f690d41882c30297d5.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@224397 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/25_algorithms/headers')
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/headers/algorithm/synopsis.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/synopsis.cc b/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/synopsis.cc
index 47587965f72..7b11872b749 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>