C++ Logo

sg16

Advanced search

Re: [SG16-Unicode] P1030 path_view

From: Niall Douglas <s_sourceforge_at_[hidden]>
Date: Tue, 22 Oct 2019 13:15:07 +0100
On 22/10/2019 12:57, Lyberta wrote:
> Niall Douglas:
>> I believe all changes to https://wg21.link/P1030 path_view requested by
>> SG16 have been made.
>
> Couple of thoughts:
>
> no_zero_terminate leads to double negatives, I would rename it to
> zero_terminate.

I chose "not zero terminated" because in code, where you're actually
using this in practice, supplying true here is much less common than
supplying false here. Hence the choice.

I guess I need to further explain that: I don't know what WG21 guidance
is on this (Zach!?!), but for me personally, bool parameters are chosen
so true is always the less common choice.

I can see LEWG changing that parameter to an enum in any case. They hate
bools.

> Where are char32_t-based ctors?

Removed as per feedback to R1. The observation made was that they always
lead to memory copying, and are therefore unsuitable for a path view.

Since then however, we can now c_str and compare to encodings other than
the native filesystem encoding. So, it may now be right to restore
char32_t input.

My personal opinion is that I know of no consumer of filesystem paths
which takes char32_t, so I'd be minded to leave it off pending future
user base demand.

Niall

Received on 2019-10-22 14:15:19