Closed TLCFEM closed 3 days ago
This is expected: the format string must be known at compile time. There are multiple ways to fix this, e.g.
auto s = fmt::format(fg(color::green_yellow), "{}", std::string("something"));
This is expected: the format string must be known at compile time. There are multiple ways to fix this, e.g.
auto s = fmt::format(fg(color::green_yellow), "{}", std::string("something"));
Oh, Okay, so I presume what is happening is that it is an attempt to constexpr/consteval
as much as possible?
Yes. See also: https://fmt.dev/latest/api/#compile-time-checks.
hats off
Bad: Trunk with consteval: https://godbolt.org/z/6rKczqfdP
Good: Trunk with no consteval: https://godbolt.org/z/j9zG1jqGa
Good: 10.2.1 with consteval: https://godbolt.org/z/nbG836scW