[SG16-Unicode] [time.duration.io] : Is stream insertion behavior locale dependent when Period::type is micro?

Tom Honermann tom at honermann.net
Mon Nov 4 23:42:10 CET 2019


A new LWG issue was filed for this question today:
- https://cplusplus.github.io/LWG/issue3314

This issue concerns the ostream inserters added for 
std::chrono::duration in C++20 and what the intended behavior is for a 
duration when period::type is micro.

[time.duration.io]p4 <http://eel.is/c++draft/time.duration.io#4> states:

> If Period​::​type is micro, but the character U+00B5 cannot be 
> represented in the encoding used for charT, the unit suffix "us" is 
> used instead of "μs".
>
The question is with regard to which one of the encodings used for charT 
is referred to here; the compile-time execution character set or the 
run-time locale dependent native character set?

The proposed resolution specifies that the compile-time execution 
character set is the intended one.  My expectation is that this aligns 
with existing implementations, but I haven't checked.

Tom.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.open-std.org/pipermail/unicode/attachments/20191104/a1afbf83/attachment.html 


More information about the Unicode mailing list