3 ms·
It's not an empty string, it's an empty range. The author wrote "zero-sized object". An empty, \0 terminated string is 1 byte. There is nothing worong in treat
by leni536 4y ago
It's not an empty string, it's an empty range. The author wrote "zero-sized object". An empty, \0 terminated string is 1 byte.
There is nothing worong in treating [NULL, NULL) as a valid, 0-sized range. As a sibling comment pointed out, this is already valid in C++ for std::string_view. Or more appropriately, for std::copy as well.