-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
There is a problem in Debian 12 (Bookworm) where gcc-12 is missing the C++20 <format> header. That means that things like the following is not possible:
#include <format>
....
std::string s = std::format("This string {} is at least {} times better.", "formatter", 10);
// formats into: "This string formatter is at least 10 times better."
....This type of formatting is also the default in python nowadays and is much better than any snprintf or other bodgeworks.
The solution is to add a dependency libfmt-dev for building LinuxCNC to include libfmt (https://github.com/fmtlib/fmt), which is available as packages on all platforms afaik (libfmt7 on bullseye, libfmt9 on bookworm, libfmt10 on trixie; even buster has it).
Using libfmt means that #include <format> with std::format() just needs to be rewritten as #include <fmt/format.h> and use fmt::format().
What do you guys say, is this acceptable?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels