String formatting
Summary
The current code base currently uses a mix of stringstream
and xDAQ toolbox::toString
(and maybe more) in order to format string. The format is unpractical and the latter not type-safe. One should do better.
I'm proposing to use the {fmt}
library everywhere. It provides type-safe formatting functions with a syntax close to Python's format. Moreover, its API is compatible with the C++20 std::format
API that should be available sooner or later, preventing future maintenance concerns.
What is the expected correct behavior?
Use the same, type-safe, string formatting library everywhere.
Embed {fmt}
into the repository and convert all stringstream
and toolbox::toString
calls to {fmt}
calls.