mirror of
https://forge.sourceware.org/marek/gcc.git
synced 2026-02-22 03:47:02 -05:00
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:
committed by
Tomasz Kamiński
parent
1cf9fda493
commit
64d5e1eb97
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user