Answers to frequently asked questions
FAQ.55
If you're using the standard types where available, why is the GSL `span<char>` different from the `string_view` in the Library Fundamentals 1 Technical Specification and C++17 Working Paper? Why not just use the committee-approved `string_view`?
The consensus on the taxonomy of views for the C++ Standard Library was that "view" means "read-only", and "span" means "read/write". If you only need a read-only view of characters that does not need guaranteed bounds-checking and you have C++17, use C++17 std::string_view. Otherwise, if you need a read-write view that does not need guaranteed bounds-checking and you have C++20, use C++20 std::span<char>. Otherwise, use gsl::span<char>.