Skip to content

<xloctime>: Fix time_get::do_get to parse a literal %#6140

Open
mirion-dev wants to merge 7 commits intomicrosoft:mainfrom
mirion-dev:fix-gh6130
Open

<xloctime>: Fix time_get::do_get to parse a literal %#6140
mirion-dev wants to merge 7 commits intomicrosoft:mainfrom
mirion-dev:fix-gh6130

Conversation

@mirion-dev
Copy link
Contributor

Fixes #6130.

@mirion-dev mirion-dev requested a review from a team as a code owner March 4, 2026 05:42
@github-project-automation github-project-automation bot moved this to Initial Review in STL Code Reviews Mar 4, 2026
@mirion-dev
Copy link
Contributor Author

@microsoft-github-policy-service agree

@mirion-dev

This comment was marked as resolved.

@StephanTLavavej

This comment was marked as resolved.

@StephanTLavavej StephanTLavavej added the bug Something isn't working label Mar 4, 2026
@mirion-dev

This comment was marked as resolved.

@StephanTLavavej
Copy link
Member

I will need to resolve merge conflicts with #6133.

First, there will be trivial adjacent-add conflicts in tests/std/tests/Dev11_0836436_get_time/test.cpp.

Second, there will be a stealth merge conflict in tests/libcxx/expected_results.txt. I'll need to remove this:

# GH-6129 <xloctime>: time_get::do_get uses the wrong format for %c and %x
# GH-6130 <xloctime>: time_get::do_get doesn't parse a literal %
std/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp FAIL
std/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp FAIL
std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_one.pass.cpp FAIL

and replace it with:

# Assertion failed: base(i) == in+sizeof(in)/sizeof(in[0])-1
# We fixed GH-6129 "<xloctime>: time_get::do_get uses the wrong format for %c and %x",
# which appears to have created a conflict with `#ifdef _WIN32` test code
# commented with `On Windows, the "%c" format lacks the leading week day`.
std/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp FAIL
std/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp FAIL

@StephanTLavavej StephanTLavavej moved this from Initial Review to Ready To Merge in STL Code Reviews Mar 18, 2026
@cpplearner
Copy link
Contributor

cpplearner commented Mar 19, 2026

# Assertion failed: base(i) == in+sizeof(in)/sizeof(in[0])-1
# We fixed GH-6129 "<xloctime>: time_get::do_get uses the wrong format for %c and %x",
# which appears to have created a conflict with `#ifdef _WIN32` test code
# commented with `On Windows, the "%c" format lacks the leading week day`.
std/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp FAIL
std/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp FAIL

These tests expect time_get to treat %c as something like "%m/%d/%Y %I:%M:%S %p" in the en_US.UTF-8 locale, not "%a %b %e %T %Y" which we use after #6133 (nor "%b %d %H : %M : %S %Y" which we use before #6133). I figured that we shouldn't bother with locale-dependent specifiers. I filed LWG-4541.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Ready To Merge

Development

Successfully merging this pull request may close these issues.

<xloctime>: time_get::do_get doesn't parse a literal %

4 participants