Skip to content
Snippets Groups Projects
Unverified Commit 7f65f949 authored by Jonathan Wakely's avatar Jonathan Wakely Committed by Jonathan Wakely
Browse files

libstdc++: Implement LWG 3798 for range adaptors [PR106676]


LWG 3798 modified the iterator_category of the iterator types for
transform_view, join_with_view, zip_transform_view and
adjacent_transform_view, to allow the iterator's reference type to be an
rvalue reference.

libstdc++-v3/ChangeLog:

	PR libstdc++/106676
	* include/bits/iterator_concepts.h (__cpp17_fwd_iterator): Use
	is_reference instead of is_value_reference.
	rvalue references.
	* include/std/ranges (transform_view:__iter_cat::_S_iter_cat):
	Likewise.
	(zip_transform_view::__iter_cat::_S_iter_cat): Likewise.
	(adjacent_transform_view::__iter_cat::_S_iter_cat): Likewise.
	(join_with_view::__iter_cat::_S_iter_cat): Likewise.
	* testsuite/std/ranges/adaptors/transform.cc: Check
	iterator_category when the transformation function returns an
	rvalue reference type.

Reviewed-by: default avatarPatrick Palka <ppalka@redhat.com>
parent 7d15248d
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment