C++ Logo

std-proposals

Advanced search

Re: Two small utility functions - as_signed, as_unsigned

From: Olaf van der Spek <ml_at_[hidden]>
Date: Tue, 12 Oct 2021 21:01:02 +0200
On Sat, Oct 9, 2021 at 6:36 AM Pavel Vazharov via Std-Proposals
<std-proposals_at_[hidden]> wrote:
> The thing is that the std::container::size() functions return an unsigned type but we often deal with signed types along with them and the compilers complain about comparison between these types when warnings are enabled. Such functions are useful in these situations, in my experience.

ssize() ?

https://en.cppreference.com/w/cpp/iterator/size

-- 
Olaf

Received on 2021-10-12 14:02:49