fix: compilation errors with cpp_std=c++20

There were two main issues with fmtlib and C++20 mode:

 - `fmt::format` defaults to compile-time argument checking and requires
   using `fmt::runtime(format_string)` to bypass that.
 - `std::format` implementation introduces conflicting declarations and
   we have to specify the namespace for all `format`/`format_to` calls.
This commit is contained in:
Aleksei Bavshin
2023-01-16 13:24:55 -08:00
parent 67efe1af89
commit ea17a66dfc
35 changed files with 143 additions and 137 deletions

View File

@ -42,7 +42,7 @@ auto Mode::update() -> void {
if (mode_.empty()) {
event_box_.hide();
} else {
label_.set_markup(fmt::format(format_, mode_));
label_.set_markup(fmt::format(fmt::runtime(format_), mode_));
if (tooltipEnabled()) {
label_.set_tooltip_text(mode_);
}