[SG16-Unicode] SG16 approval for LEWG to review std::filesystem::path_view

Lyberta lyberta at lyberta.net
Wed Jul 3 23:52:00 CEST 2019


Ok, some more feedback:

path_view(const std::basic_string<std::byte> &v) noexcept;

std::basic_string<std::byte> doesn't exist.

constexpr path_view(const std::byte *v, size_t len) noexcept;

It says: "The character after the end of the view must be legal to read."

What is character? Is it back to "native type"? Does it means it require
2 subsequent bytes be legal to read on Windows?

All constructors taking pointer and size and std::basic_string_view look
like a big footgun to me. I think it is better to redesign type system
in order to not let users shoot themselves in the foot so easily.

Maybe reduce the amount of constructors by taking std::ContiguousRange.

Until we put more restrictions on CHAR_BIT, I think c_str::length should
be std::uint_least16_t.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
Url : http://www.open-std.org/pipermail/unicode/attachments/20190703/9b8fa13c/attachment.bin 


More information about the Unicode mailing list