libstdc++: make common_iterator<I, S> require copyable<I> (LWG 3385)

* include/bits/stl_iterator.h (common_iterator): Add copyable<I>
	requirement (LWG 3385).
	* testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Adjust
	expected declaration.
This commit is contained in:
Jonathan Wakely 2020-02-19 21:56:29 +00:00
parent 7433536b3d
commit 1b425f3ac5
3 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,10 @@
2020-02-19 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stl_iterator.h (common_iterator): Add copyable<I>
requirement (LWG 3385).
* testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Adjust
expected declaration.
* include/std/ranges (take_while_view, drop_view, drop_while_view)
(elements_view:_Iterator): Initialize data members (LWG 3364).

View File

@ -1426,7 +1426,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/// An iterator/sentinel adaptor for representing a non-common range.
template<input_or_output_iterator _It, sentinel_for<_It> _Sent>
requires (!same_as<_It, _Sent>)
requires (!same_as<_It, _Sent>) && copyable<_It>
class common_iterator
{
template<typename _Tp, typename _Up>

View File

@ -56,7 +56,7 @@ namespace std
template<semiregular S> class move_sentinel;
template<input_or_output_iterator I, sentinel_for<I> S>
requires (!same_as<I, S>)
requires (!same_as<I, S>) && copyable<I>
class common_iterator;
template<class I, class S>