MSVC - gsl::make_span with iterators
Open
Nobody has claimed this yet.
Priority: Low
Status: In Progress
Type: Bug
- Dominant language
- C++
- Stars
- 6.7k
- Forks
- 772
- Avg merge
- 4d 23h
- Merged PRs (30d)
- 9
Description
I have some code that uses gsl::make_span(cont.begin(), cont.end()) quite heavily. This compiles fine on macOS and Linux with GCC and Clang, but fails on MSVC. Instead, I have to use gsl::make_span(cont.data(), std::distance(cont.begin(), cont.end())) - which becomes pretty tedious and illegible.
Here's a quick example. Is there another overload we can use?
We can't pass the whole container to make_span, since we sometimes have varying end iterators returned from algorithms.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.