[libcxx-commits] [PATCH] D58642: Second part of P1227R2 - Signed ssize() functions, unsigned size() functions
Marshall Clow via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Feb 26 16:09:47 PST 2019
mclow.lists marked 2 inline comments as done.
mclow.lists added inline comments.
================
Comment at: libcxx/include/iterator:1868
+template <class _Cont>
+inline _LIBCPP_INLINE_VISIBILITY
+constexpr auto ssize(const _Cont& __c)
----------------
ldionne wrote:
> Is there a reason for making this `inline`? Templates are already `inline` by default.
Nope; I'll remove it.
================
Comment at: libcxx/test/std/iterators/iterator.container/ssize.pass.cpp:42
+{
+// ASSERT_NOEXCEPT(std::size(c));
+ static_assert( std::is_signed_v<decltype(std::ssize(c))>, "");
----------------
ldionne wrote:
> Why is this commented? I think we can have a libc++ specific check here because our `std::size(Container const&)` is marked `noexcept` conditionally on the `noexcept`-ness of `container.size()`.
I just took this from the `std::size` tests. I can make them both check.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58642/new/
https://reviews.llvm.org/D58642
More information about the libcxx-commits
mailing list