o3tl::make_unsigned
Stephan Bergmann
sbergman at redhat.com
Fri Jan 31 12:39:27 UTC 2020
On 31/01/2020 12:41, Luboš Luňák wrote:
> I'm fine with this if this would be ok for you (the way I see it, this
> o3tl::ssize() would be basically my proposed o3tl::make_signed() with a
> different name).
see here:
On 30/01/2020 11:39, Stephan Bergmann wrote:
> C++20 will have ssize for containers (see
> <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1227r2.html>
> "P1227: Signed ssize() functions, unsigned size() functions (Revision
> 2)"). Using it would probably help remove a large chunk of
> signed/unsigned mixture in existing LO code.
>
> (I'm fine with using it, as, sure, for containers it is clear that
> restricting maximum size to no larger than size_t/2 is feasible. What I
> dislike is a helper function mapping from an arbitrary unsigned type to
> its signed counterpart pretending to be a total function.)
More information about the LibreOffice
mailing list