[PATCH] libstdc++: Improve comment about testsuite utilities
Jonathan Wakely
jwakely@redhat.com
Fri Jan 10 22:22:00 GMT 2020
This fixes a typo and also explains why test_container is not a range
when used with output_iterator_wrapper or input_iterator_wrapper.
* testsuite/util/testsuite_iterators.h: Improve comment.
Committed to trunk.
-------------- next part --------------
commit 6fe8c46fff330747f1a5995f99af898c0e582c01
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Fri Jan 10 22:07:48 2020 +0000
libstdc++: Improve comment about testsuite utilities
This fixes a typo and also explains why test_container is not a range
when used with output_iterator_wrapper or input_iterator_wrapper.
* testsuite/util/testsuite_iterators.h: Improve comment.
diff --git a/libstdc++-v3/testsuite/util/testsuite_iterators.h b/libstdc++-v3/testsuite/util/testsuite_iterators.h
index e01d7daea5d..eb15257bf6a 100644
--- a/libstdc++-v3/testsuite/util/testsuite_iterators.h
+++ b/libstdc++-v3/testsuite/util/testsuite_iterators.h
@@ -759,10 +759,13 @@ namespace __gnu_test
using test_output_sized_range
= test_sized_range<T, output_iterator_wrapper>;
-// test_container, test_range and test_sized_range do not own their elements,
-// so they all model std::ranges::safe_range. This file does not define
-// specializations of std::ranges::enable_safe_range, so that individual
-// test can decide whether or not to do so.
+// test_range and test_sized_range do not own their elements, so they model
+// std::ranges::safe_range. This file does not define specializations of
+// std::ranges::enable_safe_range, so that individual tests can decide
+// whether or not to do so.
+// This is also true for test_container, although only when it has forward
+// iterators (because output_iterator_wrapper and input_iterator_wrapper are
+// not default constructible so do not model std::input_or_output_iterator).
#endif // C++20
} // namespace __gnu_test
#endif // _TESTSUITE_ITERATORS
More information about the Libstdc++
mailing list