Construct span from a pair of iterators
slsyy opened this issue · 2 comments
slsyy commented
The following code does not compile:
#include <vector>
#include <span>
#include <https://raw.githubusercontent.com/martinmoene/span-lite/master/include/nonstd/span.hpp>
#define s nonstd::span
// #define s std::span
void consume(s<int>);
int main () {
std::vector a{1, 2, 3};
consume(s(a.begin() + 1, a.end()));
}
martinmoene commented
"The following code does not compile" seems to hold for both std::span
and nonstd::span
, see this code at godbolt.
martinmoene commented
@slsyy can this issue be closed?