[libcxx-commits] [PATCH] D121626: [libc++] Add workaround to avoid breaking users of <span> when <ranges> are disabled

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Mar 15 11:53:47 PDT 2022


ldionne added a comment.

In D121626#3381033 <https://reviews.llvm.org/D121626#3381033>, @jloser wrote:

> Seems reasonable to me. I left a nit, but do we also need to restore support for deduction guides in the incomplete ranges case? E.g., prior to the range constructor, we had:
>
>   template<class _Container>
>       span(_Container&) -> span<typename _Container::value_type>;
>   
>   template<class _Container>
>       span(const _Container&) -> span<const typename _Container::value_type>;
>
> If so, please add them back along with associated tests.

I would be tempted to say that it's OK to omit the deduction guides -- I don't expect those to have nearly as much usage, and we're breaking them slightly anyway, since we're going from `Container::value_type` to `range_reference_t<Container>` for the type stored in the `span` when `<ranges>` is implemented.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121626



More information about the libcxx-commits mailing list