You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I learned recently about std::format. It is the true modern replacement to printf() and operator<<. The current codebase has both operator<< usage (via boost logging) and printf() usage, along with some printf()-style custom functions like util::clean_assert() and util::Exception(). All of this should be replaced by std::format.
Note that std::format is a c++20 feature that is at this moment not supported by the latest gcc version (gcc12). While gcc13 advertises std::format support [source].
This humorous blog post clearly demonstrates why std::format is superior to both printf() and std::cout <<.
The text was updated successfully, but these errors were encountered:
I learned recently about
std::format
. It is the true modern replacement toprintf()
andoperator<<
. The current codebase has bothoperator<<
usage (via boost logging) andprintf()
usage, along with someprintf()
-style custom functions likeutil::clean_assert()
andutil::Exception()
. All of this should be replaced bystd::format
.Note that
std::format
is a c++20 feature that is at this moment not supported by the latest gcc version (gcc12). While gcc13 advertisesstd::format
support [source].This humorous blog post clearly demonstrates why
std::format
is superior to bothprintf()
andstd::cout <<
.The text was updated successfully, but these errors were encountered: