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. |
Changes proposed in this pull request
The deprecation is addressed by replacing
by
The fix uses
std::back_inserterrather thanfmt::appenderas the latter is not available in older versions oflibfmt. The current GH Actions Sundials runners already uselibfmt v8.0.1where 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