[libcxx-commits] [PATCH] D110503: [libc++] Implement P1394r4 for span: range constructor

Joe Loser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Sep 29 10:15:01 PDT 2021


jloser added a comment.

In D110503#3030782 <https://reviews.llvm.org/D110503#3030782>, @Quuxplusone wrote:

> In D110503#3030310 <https://reviews.llvm.org/D110503#3030310>, @jloser wrote:
>
>> @ldionne @Quuxplusone can you help me understand why a few `static_assert`s fail on the CI job (https://reviews.llvm.org/harbormaster/unit/view/1268018/)? They pass locally just fine for me. Everything else modulo formatting was passing.
>
> Well, your new code in <span> is enabled only in language versions //greater than 20//, but your new test runs in versions //greater than or equal to 20//. Did you intend the test to also `UNSUPPORTED: c++20`? or did you intend the new code to be enabled when `_LIBCPP_STD_VER > 17`? (Is this a C++2b feature or a C++20 feature?  I think it's C++20, but check me on that.)

Oops! It's intended to be a C++20 feature (that is, P1394 <https://reviews.llvm.org/P1394> targets C++20 not C++23), and since `std::span` is C++20, we just need the `#ifdef` around ranges support. Just fixed that -- thanks!.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110503



More information about the libcxx-commits mailing list