[libcxx-commits] [PATCH] D74577: [libcxx][span] Implement P1976R2

Michael Schellenberger Costa via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Mar 17 14:36:18 PDT 2020

miscco marked 2 inline comments as done.
miscco added a comment.

Thanks for the review, I am unsure whether one should really update the feature test macro without the other changes in place (tuple interface, relaxed array constructors etc)

If you want to update I wouldnt mind too much though

Comment at: libcxx/include/span:67
     template <class Container>
         constexpr span(const Container& cont);
     constexpr span(const span& other) noexcept = default;
ldionne wrote:
> Could you please adjust the synopsis too?
Sure will do

Comment at: libcxx/include/span:228
+        constexpr explicit span(      _Container& __c,
+            enable_if_t<__is_span_compatible_container<_Container, _Tp>::value, nullptr_t> = nullptr)
ldionne wrote:
> Can you walk me through why we don't have a single `_Container&&` like in the spec of P1976R2?
Because we do not have library concepts and ranges yet. 

The `_Container&&` constructor you mention is the `range` constructor that requires `ranges::contiguous_range`, `ranges::sized_range` and `ranges::borrowed_range`.

  rG LLVM Github Monorepo



More information about the libcxx-commits mailing list