-
Notifications
You must be signed in to change notification settings - Fork 197
Consider using fmt to format and print strings #2951
Copy link
Copy link
Open
Labels
Description
C++20 and C++23 have standardised std::format and std::print, making formatting and printing quite pythonic and nicer to use. These are the modern alternative to iostreams and the (IMO weird) use of shift operators. Our project is currently limited to C++17 so we cannot upgrade our code to use these new functions. However, these functions have been standardised based on fmt, which offers a header-only implementation that can be easily integrated into existing projects (it only requires C++11). I think we should consider using this in MRtrix3 for the formatting of strings and logging.
Reactions are currently unavailable