[libcxx-commits] [PATCH] D101003: [libc++] <span>, like <string_view>, has no use for debug iterators.
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Apr 24 06:11:16 PDT 2021
Mordante added a comment.
Due to the ABI implications I defer the approval to one of the full maintainers.
================
Comment at: libcxx/include/span:203
using const_reference = const _Tp &;
- using iterator = __wrap_iter<pointer>;
+ using iterator = pointer;
using reverse_iterator = _VSTD::reverse_iterator<iterator>;
----------------
Quuxplusone wrote:
> @miscco asks "Are there ABI concerns for `span`?" Well, in order to break, they'd have to be passing a `span<T>::iterator` across an ABI boundary. (Just passing a `const span<T>&` would be fine.) And `span` is new in C++20, which we don't claim to implement yet. So I think now is the perfect time to fix it. :)
>
> Anyway, we kinda don't have a choice, right? :) The existing code simply fails to compile in `_LIBCPP_DEBUG=1` mode, and I think we need it to compile.
We've been shipping `<span>` since libc++ 7.0 so it has been available for several years. (Not sure when we enabled the feature-test macro.) Maybe we should let the type depend on the `_LIBCPP_ABI_VERSION` version.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101003/new/
https://reviews.llvm.org/D101003
More information about the libcxx-commits
mailing list