-
Notifications
You must be signed in to change notification settings - Fork 777
[locale.time.get.virtuals] Fix decades-old typo from misapplication of LWG 461 #8009
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Huh ... I wonder if this really counts as editorial after so long. The standard has been "wrong" for so long, maybe people have been implementing |
You're saying stuff that exists gets used and people expect it to always be the way it is? Wild. Surely people will consult their ISO documents in their local library. |
@cpplearner Thanks a lot for digging that up, but I think I agree with @jwakely that we should probably make this an LWG issue. That said, it's a good time to file issues, since issue processing is now a high priority. |
FWIW libstdc++ doesn't implement the resolution of DR 461 (we just parse the locale's %x format, which means we have exactly the problem described in the DR). So we would be unaffected by inserting the missing slashes. |
Neither do libc++ and MSVC's STL. libc++ also analyzes the locale's |
It seems that libc++ only examines the %x format for We should just deprecate this nonsense anyway:
The whole DR 461 resolution seems to be a way to get some kind of bad approximation of D_FMT for implementations that can't access the locale's D_FMT. But if the implementation can access that, then |
LWG 461 does permit implementations to support D_FMT, in addition to the formats listed in [tab:locale.time.get.dogetdate].
|
I'm not sure how it's possible to also support other formats. If D_FMT and do_date_order disagree, the implementation needs to pick one. It can't support both if the formats are ambiguous, like %d/%m/%y and %m/%d/%y, and the input is "01/02/03". A correct implementation should support other formats instead of the one indicated by do_date_order(). |
Filed LWG 4285 |
The proposed resolution of LWG 461 has slashes between conversion specifiers, but these slash characters are lost when the resolution got applied to the draft standard.
As recorded in N1908, LWG 461 was moved to WP status at the 2005-10 Mont Tremblant meeting. N1905, the post-Tremblant draft standard, already contains this mistake.