Replace libfmt with std::format#8618
Open
glebm wants to merge 7 commits into
Open
Conversation
glebm
force-pushed
the
std-format
branch
6 times, most recently
from
July 13, 2026 16:59
2cb5161 to
5d7acaf
Compare
glebm
marked this pull request as ready for review
July 13, 2026 17:09
glebm
enabled auto-merge (rebase)
July 13, 2026 17:09
Now that the project targets C++23, use the standard library's std::expected instead of the vendored tl::expected polyfill: - tl::expected -> std::expected, tl::unexpected/tl::make_unexpected -> std::unexpected - .map()/.map_error() -> .transform()/.transform_error() - #include <expected.hpp> -> #include <expected>, grouped with std headers - Remove 3rdParty/tl/expected.hpp (the tl target remains for function_ref.hpp) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
These toolchains haven't updated their libcxx in years. Disables these CI builds in order to avoid being stuck on old language level support. Once / if the toolchains are updated, we can re-enable these platforms. Toolchain update bugs: * PS4: OpenOrbis/OpenOrbis-PS4-Toolchain#262 * Xbox nxdk: XboxDev/nxdk-libcxx#3
Includes diasurgical/asio@112f011, which fixes a C++23 deprecation warning
- `fmt::format` with literal format strings -> `std::format`. - `fmt::format(fmt::runtime(...))` -> `FormatRuntime` in the new `utils/format.hpp`, a std::vformat wrapper that is also safe under the P2905 lvalue requirement of `std::make_format_args`. - `fmt::dynamic_format_arg_store` (Lua logging) -> a small hand-rolled per-field formatter over `std::variant`, returning `std::expected`. - `fmt::format_int` -> `std::to_chars`. - `fmt::join` -> manual joins at the two call sites. - SDL_audiolib: new patch that rewrites aulib_log.h to use std::format and drops the fmt dependency from its CMakeLists. - The `-static-libstdc++` guard now keys off `DEVILUTIONX_STATIC_SDL_AUDIOLIB` instead of `DEVILUTIONX_STATIC_LIBFMT`. - libfmt removed from CMake, vcpkg, Brewfile, CI workflows, Dockerfiles, packaging scripts, UWP project, and docs. - macOS bumped to 13.3+, iOS to 16.3+ (required for `<format>`) - Amiga m68k: provide `__cmpdf2`, which is missing from the hard-float libgcc multilib but referenced via libstdc++'s long double paths. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on top of #8616
fmt::formatwith literal format strings ->std::format.fmt::format(fmt::runtime(...))->FormatRuntimein the newutils/format.hpp, anstd::vformatwrapper that is also safe under the P2905 lvalue requirement ofstd::make_format_args.fmt::dynamic_format_arg_store(Lua logging) -> a small hand-rolled per-field formatter overstd::variant, returningstd::expected.fmt::format_int->std::to_chars.fmt::join-> manual joins at the two call sites.aulib_log.hto usestd::formatand drops the fmt dependency from its CMakeLists.-static-libstdc++guard now keys offDEVILUTIONX_STATIC_SDL_AUDIOLIBinstead ofDEVILUTIONX_STATIC_LIBFMT.<format>)