Files
gcc/libstdc++-v3/include
Tomasz Kamiński 66e60479e9 libstdc++: Harmonize mdspan operator[] and at methods.
This patch changes the implementation of operator[], to follow similar
pattern as at, where we normalize argument types and forward to single
overload. The conversion now uses __mdspan::__index_type_cast, instead
of static_assert. This introduces asserts assuring that conversion is
is value preserving.

Finally, __is_multi_index is implemented as local lambda, avoiding
the need to create a local array with copies of the arguments.

libstdc++-v3/ChangeLog:

	* include/std/mdspan (__mdspan::__is_multi_index): Removed,
	replaced with local lambda in mdspan::operator[].
	(__mdspan::operator[]): Implement in terms of single overload
	accepting index_type. Use __mdspan::__index_type_cast for type
	conversion.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
2026-02-23 13:01:52 +01:00
..
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00