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
Replacing instances of fmt::format is trivial and just requires a rename to std::format
FMT_COMPILE macros for optimized fmt format strings can simply be removed. std::format is already compile time.
Some code snippets currently choose between different more optimized implementations depending on the version of the fmt lib. These could be simplified and replaced by the equivalent functions which are guaranteed to exist in std <format>.
Custom fmt::formatter helpers (for e.g. the api06::id_version type) need to be changed to std::formatter.
fmt::join() is currently used in several places to format ranges with separators ("1,2,3,4"). There is unfortunately no direct analogue available in C++20. Range formatting was not included in C++20 and was only introduced in C++23. It is also not yet supported by GCC libstdc++.
Creating this issue mostly for documenting the challenges involved, since it came up as a potential change after switching to C++20.
Obviously depends on at least C++20 #323
fmt::format
is trivial and just requires a rename tostd::format
FMT_COMPILE
macros for optimized fmt format strings can simply be removed.std::format
is already compile time.<format>
.fmt::formatter
helpers (for e.g. theapi06::id_version
type) need to be changed to std::formatter.fmt::join()
is currently used in several places to format ranges with separators ("1,2,3,4"
). There is unfortunately no direct analogue available in C++20. Range formatting was not included in C++20 and was only introduced in C++23. It is also not yet supported by GCC libstdc++.std::format
requires at least GCC 13, Debian stable still ships GCC 12The text was updated successfully, but these errors were encountered: