C++ Logo

SG16

Advanced search

Subject: [SG16-Unicode] Hidden locale dependency in [time.duration.io]?
From: Tom Honermann (tom_at_[hidden])
Date: 2019-11-03 02:16:22


I just came across [time.duration.io]p4:
<http://eel.is/c++draft/time.duration.io#4>

> 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". <http://eel.is/c++draft/time.duration.io#4.sentence-1>

How is the determination as to whether the character can be represented
to be done?  It seems this would involve consulting the locale.  Or is
this effectively implementation defined behavior?

Perhaps this is worth an LWG issue to at least clarify the behavior?

Tom.



SG16 list run by herb.sutter at gmail.com