Skip to content

Fix C++20 behavior changes of std::from_chars#3244

Merged
bmagyar merged 2 commits intomasterfrom
fix-charconv-behavior
Apr 23, 2026
Merged

Fix C++20 behavior changes of std::from_chars#3244
bmagyar merged 2 commits intomasterfrom
fix-charconv-behavior

Conversation

@christophfroehlich
Copy link
Copy Markdown
Member

@christophfroehlich christophfroehlich commented Apr 23, 2026

Description

It seems that there is a behavior change in C++20, fixes #3240

This is not reflected in our PR CI jobs, but I was able to reproduce it locally with

colcon build --packages-up-to hardware_interface --cmake-clean-cache --cmake-args -DCMAKE_CXX_STANDARD=20 -DCMAKE_BUILD_TYPE=RelWithDebInfo
colcon test --packages-select hardware_interface

and this PR fixes the test failures.

Did you use Generative AI?

GPT 5.3 codex

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.12%. Comparing base (c178e16) to head (0fe20e4).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3244      +/-   ##
==========================================
+ Coverage   89.10%   89.12%   +0.02%     
==========================================
  Files         160      160              
  Lines       19753    19754       +1     
  Branches     1597     1597              
==========================================
+ Hits        17600    17605       +5     
+ Misses       1486     1483       -3     
+ Partials      667      666       -1     
Flag Coverage Δ
unittests 89.12% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
hardware_interface/src/lexical_casts.cpp 83.78% <ø> (ø)

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@christophfroehlich christophfroehlich changed the title Fix leading + in from_chars Fix C++20 behavior changes of std::from_chars Apr 23, 2026
@christophfroehlich christophfroehlich marked this pull request as ready for review April 23, 2026 08:40
@bmagyar bmagyar merged commit 6b58637 into master Apr 23, 2026
18 of 19 checks passed
@bmagyar bmagyar deleted the fix-charconv-behavior branch April 23, 2026 11:30
@christophfroehlich christophfroehlich added backport-jazzy Triggers PR backport to ROS 2 jazzy. backport-kilted Triggers PR backport to ROS 2 kilted. labels Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-jazzy Triggers PR backport to ROS 2 jazzy. backport-kilted Triggers PR backport to ROS 2 kilted.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lexical_casts: Behavior change with charconv

2 participants