[libcxx-commits] [PATCH] D142843: [libc++] Addresses LWG3358

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Mar 7 10:34:08 PST 2023


Mordante marked an inline comment as done.
Mordante added inline comments.


================
Comment at: libcxx/include/span:241-246
+      // [span.cons]/10
+      // Throws: When and what last - first throws.
+      static_cast<void>(__last - __first);
       _LIBCPP_ASSERT((__last - __first >= 0), "invalid range in span's constructor (iterator, sentinel)");
       _LIBCPP_ASSERT(__last - __first == _Extent,
                      "invalid range in span's constructor (iterator, sentinel): last - first != extent");
----------------
ldionne wrote:
> 
I kept the comment, I prefer to plainly cite the Standard, since that is the source of truth.
I agree the other proposed changes are an improvement, so I applied them.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142843/new/

https://reviews.llvm.org/D142843



More information about the libcxx-commits mailing list