Is streamsize really the signed counterpart of size_t?

81 Views Asked by At

According to std::streamsize at cppreference.com:

It is used as a signed counterpart of std::size_t

What does it mean? Does the standard require that std::is_same_v<std::streamsize, std::make_signed_t<std::size_t>>? If not, is either guaranteed to be at least as wide as the other?

Can it be used to simplify the type std::common_type_t<std::ptrdiff_t, std::make_signed_t<decltype(c.size())>> given at std::size, std::ssize?

0

There are 0 best solutions below