This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] Minor improvements to testsuite iterator utilities
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Wed, 30 Oct 2019 14:34:03 +0000
- Subject: Re: [PATCH] Minor improvements to testsuite iterator utilities
- References: <20191029171520.GA28082@redhat.com>
On 29/10/19 17:15 +0000, Jonathan Wakely wrote:
* testsuite/util/testsuite_iterators.h (BoundsContainer::size()): Add
new member function.
(WritableObject::operator=): Constrain with enable_if when available.
(remove_cv): Use std::remove_if when available.
(test_container::it(int)): Use size().
(test_container::size()): Use BoundsContainer::size().
Tested powerpc64le-linux, committed to trunk.
@@ -182,10 +184,14 @@ namespace __gnu_test
void operator,(const T&, const output_iterator_wrapper<U>&) = delete;
#endif
+#if __cplusplus >= 2011L
Oops! That should be 201103L.
Fixed by the attached patch, which I'll commit shortly.
commit 069df87c7e936d568a142df3930c700306546acc
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Wed Oct 30 14:32:53 2019 +0000
Fix typo in preprocessor check
* testsuite/util/testsuite_iterators.h: Fix typo in __cplusplus check.
diff --git a/libstdc++-v3/testsuite/util/testsuite_iterators.h b/libstdc++-v3/testsuite/util/testsuite_iterators.h
index 70c1f9b6689..c5ae5b123fe 100644
--- a/libstdc++-v3/testsuite/util/testsuite_iterators.h
+++ b/libstdc++-v3/testsuite/util/testsuite_iterators.h
@@ -184,7 +184,7 @@ namespace __gnu_test
void operator,(const T&, const output_iterator_wrapper<U>&) = delete;
#endif
-#if __cplusplus >= 2011L
+#if __cplusplus >= 201103L
using std::remove_cv;
#else
template<typename T> struct remove_cv { typedef T type; };