[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
Wed Apr 28 12:51:08 PDT 2021


Mordante added a comment.

In D101003#2723658 <https://reviews.llvm.org/D101003#2723658>, @Quuxplusone wrote:

> In D101003#2723284 <https://reviews.llvm.org/D101003#2723284>, @ldionne wrote:
>
>> 
>
> Agreed. Would you prefer to make `span` use `__wrap_iter` conditionally? I.e.,
>
>   #if _LIBCPP_DEBUG == 2
>       using iterator = pointer;
>   #else
>       using iterator = __wrap_iter<pointer>;  // to maintain our ABI
>   #endif

If we go this route I think we should consider to add a new ABI flag in our experimental ABI and use that, something like

  #if _LIBCPP_DEBUG == 2 || defined(_LIBCPP_ABI_SPAN_POINTER_ITERATOR)
      using iterator = pointer;
  #else
      using iterator = __wrap_iter<pointer>;  // to maintain our ABI
  #endif


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