From 0fb9dc36d2e70bd7ed34953fd67afca7181b938f Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Sat, 17 Mar 2018 13:44:16 +0000 Subject: [PATCH] Fix new test that fails in C++98 mode * testsuite/20_util/function_objects/comparisons_pointer.cc: Adjust to compile as C++98. From-SVN: r258623 --- libstdc++-v3/ChangeLog | 5 +++++ .../function_objects/comparisons_pointer.cc | 20 +++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index c8c46565210..a0da569f362 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2018-03-17 Jonathan Wakely + + * testsuite/20_util/function_objects/comparisons_pointer.cc: Adjust + to compile as C++98. + 2018-03-14 Jonathan Wakely PR libstdc++/78420 diff --git a/libstdc++-v3/testsuite/20_util/function_objects/comparisons_pointer.cc b/libstdc++-v3/testsuite/20_util/function_objects/comparisons_pointer.cc index 6b2b8be0f51..aad0bc3dd2e 100644 --- a/libstdc++-v3/testsuite/20_util/function_objects/comparisons_pointer.cc +++ b/libstdc++-v3/testsuite/20_util/function_objects/comparisons_pointer.cc @@ -27,7 +27,7 @@ int a[8]; void test01() { - auto p = a + 8; + int* p = a + 8; std::greater gt; std::stringstream ss; @@ -44,7 +44,7 @@ test01() ss.str(""); ss.clear(); sum = 0; - auto p2 = a + 8; + int* p2 = a + 8; std::greater<> gt2; ss << gt2(p2, b) << ' ' << gt2(b, p2) << ' ' << (!gt2(p2, b) && !gt2(b, p2)); while (ss >> n) @@ -59,7 +59,7 @@ test01() void test02() { - auto p = a + 8; + int* p = a + 8; std::less lt; std::stringstream ss; @@ -76,7 +76,7 @@ test02() ss.str(""); ss.clear(); sum = 0; - auto p2 = a + 8; + int* p2 = a + 8; std::less<> lt2; ss << lt2(p2, b) << ' ' << lt2(b, p2) << ' ' << (!lt2(p2, b) && !lt2(b, p2)); while (ss >> n) @@ -91,7 +91,7 @@ test02() void test03() { - auto p = a + 8; + int* p = a + 8; std::greater_equal ge; std::stringstream ss; @@ -109,7 +109,7 @@ test03() ss.str(""); ss.clear(); sum = 0; - auto p2 = a + 8; + int* p2 = a + 8; std::greater_equal<> ge2; ss << !ge2(p2, b) << ' ' << !ge2(b, p2) << ' ' << (ge2(p2, b) && ge2(b, p2)); while (ss >> n) @@ -125,7 +125,7 @@ test03() void test04() { - auto p = a + 8; + int* p = a + 8; std::less_equal le; std::stringstream ss; @@ -143,7 +143,7 @@ test04() ss.str(""); ss.clear(); sum = 0; - auto p2 = a + 8; + int* p2 = a + 8; std::less_equal<> le2; ss << !le2(p2, b) << ' ' << !le2(b, p2) << ' ' << (le2(p2, b) && le2(b, p2)); while (ss >> n) @@ -167,7 +167,7 @@ void test05() { std::less lt; - auto p = y + 4; + X* p = y + 4; std::stringstream ss; ss << lt(x, p) << ' ' << lt(p, x) << ' ' << (!lt(p, x) && !lt(x, p)); int sum = 0; @@ -183,7 +183,7 @@ test05() ss.str(""); ss.clear(); sum = 0; - auto p2 = y + 4; + X* p2 = y + 4; std::less<> lt2; ss << lt2(x, p2) << ' ' << lt2(p2, x) << ' ' << (!lt2(x, p2) && !lt2(p2, x)); while (ss >> n) -- 2.30.2