-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
regression in 'constexpr' expansion of 'fmt::v8::basic_format_string...' #2898
Comments
{fmt} 8.x requires format strings to be known at compile time by default. Quoting release notes:
|
@vitaut I understand the compile-time format evaluation/validateion. I believe the above issue is slightly different w.r.t. that both the format and arguments are constant and could be evaluated during compile time (ie. effectively Isn't there a way to have a fall-back in case the strict compile-time evaluation fails. In the example above, the function Is the behaviour you quoted compatible with the defined behaviour for |
To make this work (with or without template<typename... T>
std::string err_format(fmt::format_string<T...> fmt, T&&... errorArgs) {
return fmt::format(fmt, std::forward<T>(errorArgs)...);
}
Yes. |
@vitaut thanks for the help and work-arounds! Much appreciated! 👍 |
Hi, first of all: thanks for the great library! 👍
While bumping versions, I may have found a regression starting from v8.0.1 (v7.1.3 tested OK).
The following code snippet (see also compiler-explorer)
yields the following compile-time error:
Tested this also with older gcc and clang versions with similar results.
Any ideas, hints or work-around suggestions would be much welcome! Thanks in advance!
The text was updated successfully, but these errors were encountered: