mirror of
https://github.com/rad4day/Waybar.git
synced 2025-07-14 23:22:31 +02:00
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:
@ -110,7 +110,8 @@ auto Sndio::update() -> void {
|
||||
label_.get_style_context()->remove_class("muted");
|
||||
}
|
||||
|
||||
auto text = fmt::format(format, fmt::arg("volume", vol), fmt::arg("raw_value", volume_));
|
||||
auto text =
|
||||
fmt::format(fmt::runtime(format), fmt::arg("volume", vol), fmt::arg("raw_value", volume_));
|
||||
if (text.empty()) {
|
||||
label_.hide();
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user