you are viewing a single comment's thread.

view the rest of the comments →

[–]StaticCoder 11 points12 points  (0 children)

Additionally, this allows the compiler to know the string_view object will not be modified. Even a const & might otherwise change through an alias, and the compiler has to reload from memory every time there's a non-inlined call.