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
Currently the formatting that we do is done through a combination of manual string concatenation, sprintf, and even direct byte manipulation in the case of XDL. While C++ 20 has a standard format library written up, it is not currently implemented in GCC or Clang, leaving us unable to test it. However, the open source library fmt seems to be the repository where the std::format proposal is implemented. As such, if we add the library to our build process we can get started using std::format-style formatting. This formatting library seems to be type-safe and more memory safe than our current implementations, plus it has been shown to be faster than sprintf in testing.
From their website, it seems the fmt library can be easily added by making the library an external CMake dependency, as we have done with GLM.
Proposal:
Add fmt to libraries being imported via CMake
Replace direct formatting that we do via sprintf with fmt
Replace fmt with std::format once it has been added to GCC
Will be done as a separate issue, most likely several months into the future.
The text was updated successfully, but these errors were encountered:
Currently the formatting that we do is done through a combination of manual string concatenation, sprintf, and even direct byte manipulation in the case of XDL. While C++ 20 has a standard format library written up, it is not currently implemented in GCC or Clang, leaving us unable to test it. However, the open source library
fmt
seems to be the repository where the std::format proposal is implemented. As such, if we add the library to our build process we can get started using std::format-style formatting. This formatting library seems to be type-safe and more memory safe than our current implementations, plus it has been shown to be faster thansprintf
in testing.From their website, it seems the
fmt
library can be easily added by making the library an external CMake dependency, as we have done with GLM.Proposal:
fmt
to libraries being imported via CMakesprintf
withfmt
fmt
withstd::format
once it has been added to GCCThe text was updated successfully, but these errors were encountered: