Skip to content

Conversation

@dmehala
Copy link
Collaborator

@dmehala dmehala commented May 22, 2024

Description

Usage of std::regex_match was problematic for traceparent with trailing spaces. The overload use is std::regex_match(str, str + std::char_traits<CharT>::length(str), m, e, flags), which resolves as the whole input instead of the trimmed input.

This regression has been introduced in #119

Changes:

  • Fix std::regex_match usage.
  • Add unit test.

Usage of std::regex_match was problematic for traceparent with trailing
spaces. The overload use is `std::regex_match(str, str + std::char_traits<CharT>::length(str), m, e, flags)`,
which resolves as the whole input instead of the trimmed input.

Changes:
  - Fix std::regex_match usage.
  - Add unit test.
@dmehala dmehala requested a review from a team as a code owner May 22, 2024 12:38
@dmehala dmehala requested review from cataphract and pablomartinezbernardo and removed request for a team and cataphract May 22, 2024 12:38
@pr-commenter
Copy link

pr-commenter bot commented May 22, 2024

Benchmarks

Benchmark execution time: 2024-05-22 12:41:24

Comparing candidate commit f549dbb in PR branch dmehala/fix-win-support with baseline commit fad4e8d in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 1 metrics, 0 unstable metrics.

@dmehala dmehala merged commit 622585c into main May 22, 2024
@dmehala dmehala deleted the dmehala/fix-win-support branch May 22, 2024 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants