Files
gcc/libstdc++-v3
Luc Grosheintz 29d53f6213 libstdc++: Fix forwarding of custom IndexType in mdspan [PR121061]
The second bug report in PR121061 is that the conversion of custom
OtherIndexType to IndexType is incorrectly not done via r-value
references.

This commit fixes the forwarding issue, adds a custom IndexType called
RValueInt, which only allows conversion to int via r-value reference.

	PR libstdc++/121061

libstdc++-v3/ChangeLog:

	* include/std/mdspan (extents::extents): Perform conversion to
	index_type of an r-value reference.
	(layout_left::mapping::operator()): Ditto.
	(layout_right::mapping::operator()): Ditto.
	(layout_stride::mapping::operator()): Ditto.
	* testsuite/23_containers/mdspan/extents/custom_integer.cc: Add
	tests for RValueInt and MutatingInt.
	* testsuite/23_containers/mdspan/int_like.h (RValueInt): Add.
	* testsuite/23_containers/mdspan/layouts/mapping.cc: Test with
	RValueInt.
	* testsuite/23_containers/mdspan/mdspan.cc: Ditto.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Reviewed-by: Tomasz Kamiński <tkaminsk@redhat.com>
Signed-off-by: Luc Grosheintz <luc.grosheintz@gmail.com>
2025-07-17 16:12:52 +02:00
..
2025-07-17 00:18:50 +00:00

file: libstdc++-v3/README

New users may wish to point their web browsers to the file
index.html in the 'doc/html' subdirectory.  It contains brief
building instructions and notes on how to configure the library in
interesting ways.