C++ Logo


Advanced search

Re: [SG16-Unicode] String views with strong code unit types

From: Lyberta <lyberta_at_[hidden]>
Date: Tue, 04 Jun 2019 12:14:00 +0000
> Something like this, or did I misunderstand what you're after?
> (Requires non-portable GCC extensions)
>> https://gcc.godbolt.org/z/Evi5rD

Yep, that's exactly what I want.

> That literals aren't required to be well formed is a subset of the problem
> that char8_t data may have come from anywhere and can't be assumed to be
> well formed. Real world text is frequently broken.

Sure but in my library I try to enforce as much well formedness as
possible. For example my utf-8 code units can't store values 0xC0, 0xC1
and 0xF5-0xFF.

Received on 2019-06-04 14:14:22