libstdc++: Silence warning in mdspan.

Splitting the tests for submdspan triggered a compiler warning. This
commit changes the implementation of __dynamic_extents. In particular,
how the span is created. Functionally, the two are equivalent.

libstdc++-v3/ChangeLog:

	* include/std/mdspan (_ExtentsStorage::_M_dynamic_extents):
	Create span from pointer + size, not begin and end iterators.

Reviewed-by: Tomasz Kamiński <tkaminsk@redhat.com>
Signed-off-by: Luc Grosheintz <luc.grosheintz@gmail.com>
This commit is contained in:
Luc Grosheintz
2025-12-08 21:23:40 +01:00
committed by Tomasz Kamiński
parent 1cf9fda493
commit 64d5e1eb97

View File

@@ -271,7 +271,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
requires (_Extents.size() > 0)
{
return {_M_dyn_exts + _S_dynamic_index(__begin),
_M_dyn_exts + _S_dynamic_index(__end)};
_S_dynamic_index(__end) - _S_dynamic_index(__begin)};
}
private: