C++ Logo

sg16

Advanced search

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

From: Lyberta <lyberta_at_[hidden]>
Date: Wed, 03 Jul 2019 21:52:00 +0000
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.


Received on 2019-07-03 23:53:03