News for hackers. Stuff that matters.
Re:Just how constexpr is C++20’s std:string? by maccard on Saturday September 09, 2023 @02:26PM (#37448602)
> In the 1990s there was only one string type - NUL-terminated characters.

Indeed. If I could wave a magic wand, I would add a fat pointer to the language that we use to represent strings and arrays, and that we can automatically convert to/from const char* at compile time. This would replace string_view and span. All of the functionality of std::string would be available to it, and a call to strlen, or strcpy on it would work via the length, rather than the null terminator.

But alas, no magic wand.

There are no comments on this comment yet.