-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
Address fmt::format_to memory_buffer deprecation #1122
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1122 +/- ##
=======================================
Coverage 73.45% 73.45%
=======================================
Files 364 365 +1
Lines 47884 47912 +28
=======================================
+ Hits 35172 35194 +22
- Misses 12712 12718 +6
Continue to review full report at Codecov.
|
What's the oldest version that has |
Hard to tell ... |
Writing template <typename... Args>
void fmt_append(fmt::memory_buffer& b, Args... args) {
format_to(std::.back_inserter(b), args...);
} which probably belongs in |
@speth ... thanks for the comment. There are pro's and con's to both options:
I don't have a strong preference here. |
OK. I added the template version in a separate commit (i.e. should be squashed), where I used PS: I noticed a couple of minor alignment glitches, which I'll fix when squashing. |
Switch format_to to fmt_append template
@speth / @bryanwweber ... done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @ischoegl! This looks good to me.
Changes proposed in this pull request
The deprecation is addressed by replacing
by
The fix uses
std::back_inserter
rather thanfmt::appender
as the latter is not available in older versions oflibfmt
. The current GH Actions Sundials runners already uselibfmt v8.0.1
where the deprecation warnings show up.Also reformatted affected lines to stay within the 88 character line limits.
If applicable, fill in the issue number this pull request is fixing
Closes #1098
If applicable, provide an example illustrating new features this pull request is introducing
Checklist
scons build
&scons test
) and unit tests address code coverage