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
{{ message }}
Repository navigation
Commit 720d4a7
Browse filesBrowse the repository at this point in the historyBrowse files
Specify code unit adaptor conversion rule in terms of width, not sizeof
Per SG16 feedback, compare the width of the source and target types
([basic.fundamental]: value bits plus sign bit, excluding padding)
rather than sizeof, so that padding bits cannot hide a narrowing
conversion. The implementation computes width from numeric_limits
digits and is_signed, using unsigned char for std::byte.
Update the wording to define width for integer types, character types,
and byte via the underlying type. Replace the design section's single
conversion table with two: one covering all integral type sizes the
standard permits (assuming CHAR_BIT == 8), and one covering typical
x86_64/aarch64 sizes, using "same width" wherever LP64 and LLP64
targets differ.
Also size the exposition-only transcoding buffer as 4, 2, or 1 elements
for char8_t, char16_t, or char32_t respectively, rather than
4 / sizeof(ToType), which under-sizes the buffer on an implementation
whose char16_t has padding bits.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
0 commit comments