const char* vs std::string_view for constants
I usually use constexpr const char*
for defining string constants. Off late, I have been noticing that std::string_view
is very popular for this purpose. Which of these is the best?
I usually use constexpr const char*
for defining string constants. Off late, I have been noticing that std::string_view
is very popular for this purpose. Which of these is the best?