[libcxx-commits] [PATCH] D69466: Guard against overflow in span::subspan

Marshall Clow via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Dec 16 08:34:16 PST 2019


mclow.lists added a comment.

In D69466#1723982 <https://reviews.llvm.org/D69466#1723982>, @miscco wrote:

> I also believe that we should add a static assert to `operator[]` similar to `front()` and `back()`. Unfortunately there are multiple tests that rely on `operator[]` of a statically empty span. Thoughts?


I assume that you're talking about the case where `_Extent == 0` - is that correct?
If the tests are calling `operator[]` on a `span<T, 0>`, then they are incorrect and should be changed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69466





More information about the libcxx-commits mailing list