What is string_view?

string_view was a proposed feature within the C++ Library Fundamentals TS(N3921) added to C++17

As far as i understand it is a type that represent some kind of string “concept” that is a view of any type of container that could store something viewable as a string.

  • Is this right ?
  • Should the canonical
    const std::string& parameter type become string_view ?
  • Is there another important point about string_view to take into consideration ?

2 Answers
2

Leave a Comment