You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
where R must be a std::contiguous_range. However, as it happens, gsl::span does not qualify as a contiguous_range because its iterators are not contiguous_iterators. As a result, the following code starts failing when a Standard Library implements the resolution of P1394r4:
Here is a reproducer on Godbolt: https://godbolt.org/z/c1b686vjh. This worked previously with libc++ before we implemented P1394r4.
I would suggest that gsl::span's iterators be made contiguous_iterators in C++20, which would improve its interoperability with standard library types.
Note that this issue was found while building a large code base with the latest version of libc++ -- I suspect this issue is going to hit a decent number of people when LLVM 14 is released.
The text was updated successfully, but these errors were encountered:
Since P1394r4,
std::span
changed the following constructors:into the following constructor:
where
R
must be astd::contiguous_range
. However, as it happens,gsl::span
does not qualify as acontiguous_range
because its iterators are notcontiguous_iterator
s. As a result, the following code starts failing when a Standard Library implements the resolution of P1394r4:Here is a reproducer on Godbolt: https://godbolt.org/z/c1b686vjh. This worked previously with libc++ before we implemented P1394r4.
I would suggest that
gsl::span
's iterators be madecontiguous_iterator
s in C++20, which would improve its interoperability with standard library types.Note that this issue was found while building a large code base with the latest version of libc++ -- I suspect this issue is going to hit a decent number of people when LLVM 14 is released.
The text was updated successfully, but these errors were encountered: