Skip to content

Conversation

@Arzaghi
Copy link
Contributor

@Arzaghi Arzaghi commented Nov 21, 2020

Fixes #1004

@Arzaghi Arzaghi changed the title Fix issue1004 <regex>: Follow the Standard in regex_traits::transform() Nov 21, 2020
@Arzaghi Arzaghi marked this pull request as ready for review November 21, 2020 19:31
@Arzaghi Arzaghi requested a review from a team as a code owner November 21, 2020 19:31
@StephanTLavavej StephanTLavavej added the bug Something isn't working label Nov 24, 2020
@StephanTLavavej
Copy link
Member

Thanks for fixing this bug! I pushed two microscopic changes:

  • The Standard depicts str but we need to use ugly _Str.
  • Purely stylistic: although the Standard depicts .length() being called, we conventionally always call the synonymous size() for basic_string. I also changed one pre-existing occurrence nearby. Now, the only length() calls in the entire STL are for sub_match.

On my machine, the libcxx test is auto-skipped as unsupported due to lacking LOCALE_cs_CZ_ISO8859_2, but I manually verified that (without those lines) the test fails to compile before your change, and successfully compiles after your change. (We might need to revise skipped_tests.txt when we mirror this to the MSVC-internal repo, not sure, but I'll take care of that if necessary.)

Address nitpicky "ODR violation".
@StephanTLavavej StephanTLavavej self-assigned this Dec 2, 2020
@StephanTLavavej StephanTLavavej merged commit 4133091 into microsoft:master Dec 3, 2020
@StephanTLavavej
Copy link
Member

Thanks for fixing this user-reported bug and removing another entry from our list of skipped libcxx tests! 🪲 😸

@Arzaghi Arzaghi deleted the Fix_Issue1004 branch December 3, 2020 23:41
@StephanTLavavej StephanTLavavej added the regex meow is a substring of homeowner label Jun 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working regex meow is a substring of homeowner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

<regex>: Error C2664 in std::regex_traits::transform

3 participants