r/cpp • u/pavel_v • Apr 30 '26
C++26: string and string_view improvements
https://www.sandordargo.com/blog/2026/04/29/cpp26-string-string_view-improvements
70
Upvotes
r/cpp • u/pavel_v • Apr 30 '26
View all comments
Show parent comment
2
u/johannes1971 May 14 '26
One wouldn't have to do that, as one would immediately know the size of string literals thanks to the templated const char [N] constructor. Similarly, the std::string constructor also already knows the size upon construction.