[libcxx-commits] [PATCH] D109475: [libc++] Simplify span specializations
Marshall Clow via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Sep 8 18:50:31 PDT 2021
mclow.lists added a comment.
When I wrote span, I tried to do it this way, and I found that it led to much more complicated code.
Maybe `span` has changed enough that this is no longer true - dunno.
Stuff like this became much easier:
return span<ElementType, see below>(
data() + Offset, Count != dynamic_extent ? Count : size() - Offset);
Remarks: The second template argument of the returned span type is:
Count != dynamic_extent ? Count
: (Extent != dynamic_extent ? Extent - Offset
: dynamic_extent)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109475/new/
https://reviews.llvm.org/D109475
More information about the libcxx-commits
mailing list