You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that this is not reproducible on Godbolt as the STL version used by MSVC does not yet support formatting ranges. (Is there any way to reproduce this online?)
The text was updated successfully, but these errors were encountered:
Actually, I don't think a contiguous_range can have size not representable in size_t. The contiguity of a range is defined via pointer arithmetic, which relies on array objects, so a contiguous range is empty, denotes contiguous array elements, or denotes a single non-array-element object.
Since the object model of C++ doesn't allow arrays of more than SIZE_MAX elements, I think this branch is essentially dead.
Edit: It seems that one might pass an invalid range of illegally huge size, which is UB. Perhaps we can catch this in debug modes.
Actually, I don't think a contiguous_range can have size not representable in size_t. The contiguity of a range is defined via pointer arithmetic, which relies on array objects, so a contiguous range is empty, denotes contiguous array elements, or denotes a single non-array-element object.
Agreed. It seems reasonable that contiguous_range requires that the difference_type must be ptrdiff_t or at least the same width as ptrdiff_t. Although current standards do not require this.
Yap, another annoying difference-type issue.
STL/stl/inc/format
Lines 3283 to 3290 in 89ca073
_Size
may be of integer-class type such as_Signed128
, which currently does not work within_range
as it Mandates standard or extended integer types:Note that this is not reproducible on Godbolt as the STL version used by MSVC does not yet support formatting ranges. (Is there any way to reproduce this online?)
The text was updated successfully, but these errors were encountered: