Created on 2025-05-14.00:00:00 last changed 1 month ago
[ 2025-10-17; Reflector poll. ]
Set priority to 3 after reflector poll.
Victor thinks it should be an exception.
It seems permitted to write overly long contents via an (C++20) output iterator with `std::format_to(_n)`, where the length isn't representable in `size_t` or `ptrdiff_t`, especially when the implementation provides integer-class types. However, currently some implementation can't properly handle content whose length is greater than `PTRDIFF_MAX`. Presumably we don't want UB in such cases. Should we explicitly allow throwing exception and/or silent truncation?
Additionally, given that the return type of `std::formatted_size` is `std::size_t`, even if the implementation supports formatted contents whose lengths are greater than `SIZE_MAX`, the length can't be correctly returned. Perhaps we need to either precisely specify the return value as modulo arithmetic seems undesired, or specify that an exception is thrown.| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2025-10-17 21:28:56 | admin | set | messages: + msg15241 |
| 2025-05-14 00:00:00 | admin | create | |