<div dir="ltr">What interfaces is utf8_code_unit likely to appear in? I'm not sure I see the value in a strong type here, whereas I can see it for code_point and scalar_value. I expect most conversion operations to translate from untyped raw data, most likely byte, char, or char8_t, directly to code_point or scalar_value? There's some special cases for utf-8 / 16 conversions, but those are still likely to be on parts of raw buffers or in the vicinity of OS interfaces. At least that's been my experience. <br><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 16, 2019 at 6:25 PM Lyberta <<a href="mailto:lyberta@lyberta.net">lyberta@lyberta.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">JeanHeyd Meneide:<br>
> I'm a bit curious: what does std::code_unit_sequence<char8_t> offer us that<br>
> std::vector<char8_t> wouldn't? Is there something special we can do with<br>
> code_unit_sequence (i.e., treat it like a string?) that we couldn't do with<br>
> std::vector<char8_t> here? I'm trying to figure out what having a<br>
> std::vector alias buys us in terms of compile-time interface.<br>
<br>
Small buffer optimization. Yes, this is not reflected in API, we'll have<br>
to reflect it in wording. Also, it's not char8_t, it's<br>
std::unicode::utf8_code_unit. It is a strong type that can only be<br>
explicitly constructed from char8_t.<br>
<br>
I intend to make it possible to give std::vector or 3rd party class with<br>
the same API to higher levels but haven't tested this yet.<br>
<br>
_______________________________________________<br>
SG16 Unicode mailing list<br>
<a href="mailto:Unicode@isocpp.open-std.org" target="_blank">Unicode@isocpp.open-std.org</a><br>
<a href="http://www.open-std.org/mailman/listinfo/unicode" rel="noreferrer" target="_blank">http://www.open-std.org/mailman/listinfo/unicode</a><br>
</blockquote></div>