Is there sense in using const std::string& arguments in C++17?

Yes.

The problem with std::string_view is that it doesn’t remember if it points to a null-terminated string or not.

If you’re writing a wrapper for a C api that uses null-terminated strings, you would have to constantly copy your std::string_views into std::strings to make sure you have null-terminators.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)