C++ Logo

STD-DISCUSSION

Advanced search

Subject: Rationale for return type of the non-array version of std::ssize()
From: Gennaro Prota (gennaro.prota_at_[hidden])
Date: 2020-04-28 05:46:20


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 ::.

STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups