Skip to content

Commit

Permalink
Merge pull request #35377 from smuzaffar/fmt-fix
Browse files Browse the repository at this point in the history
[FMT] Fix warnings about deprecated use of `fmt::format_to()`
  • Loading branch information
cmsbuild authored Sep 24, 2021
2 parents 17d8742 + 72c1e53 commit 0bf749a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions FWCore/MessageService/test/fmt_test.cppunit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ void test_fmt_external::test_fmt()
CPPUNIT_ASSERT(s_check == s);
auto args = capture("{} {}", 42, "foo");
std::apply(print_message, args);
fmt::memory_buffer buf;
format_to(buf, "{}", 42); // replaces itoa(42, buffer, 10)
auto buf = fmt::memory_buffer();
format_to(std::back_inserter(buf), "{}", 42); // replaces itoa(42, buffer, 10)
fmt::print(to_string(buf));
format_to(buf, "{:x}", 42); // replaces itoa(42, buffer, 16)
format_to(std::back_inserter(buf), "{:x}", 42); // replaces itoa(42, buffer, 16)
fmt::print(to_string(buf));
}
#include <Utilities/Testing/interface/CppUnit_testdriver.icpp>

0 comments on commit 0bf749a

Please sign in to comment.