C++ Logo

std-discussion

Advanced search

Rationale for return type of the non-array version of std::ssize()

From: Gennaro Prota <gennaro.prota_at_[hidden]>
Date: Tue, 28 Apr 2020 12:46:20 +0200
Hi All,

what is the reason why the non-array version of std::ssize() returns

  std::common_type_t<std::ptrdiff_t, std::make_signed_t<decltype(c.size())>>

rather than just

  std::ptrdiff_t

?

Thanks a lot.

-- 
--
.:: Gennaro Prota ::.
.:: https://about.me/gennaro.prota ::.

Received on 2020-04-28 05:49:56