Fixed usage of fmt::format and fmt::print for C++20 (#323)
Build on RHEL8 / build (push) Successful in 3m5s
Build on RHEL9 / build (push) Successful in 3m4s
Run tests using data on local RHEL8 / build (push) Successful in 3m57s
Build on local RHEL8 / build (push) Successful in 2m41s

With C++20 `fmt::print(s)` expects a compile time format string and
otherwise fails complaining about consteval. To get runtime formatting
use `fmt::print(fmt::runtime(s))`
This commit is contained in:
Erik Fröjdh
2026-06-11 08:01:03 +02:00
committed by GitHub
parent 17d04083a7
commit 2041c7310a
5 changed files with 6 additions and 5 deletions
+2 -2
View File
@@ -50,8 +50,8 @@ std::filesystem::path RawFileNameComponents::data_fname(size_t mod_id,
if (m_old_scheme) {
fmt = "{}_d{}_f{:012}_{}.raw";
}
return m_base_path /
fmt::format(fmt, m_base_name, mod_id, file_id, m_file_index);
return m_base_path / fmt::format(fmt::runtime(fmt), m_base_name, mod_id,
file_id, m_file_index);
}
void RawFileNameComponents::set_old_scheme(bool old_scheme) {