Skip to content
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

Switch from fmtlib to std::format. #143

Merged
merged 2 commits into from
May 25, 2024
Merged

Switch from fmtlib to std::format. #143

merged 2 commits into from
May 25, 2024

Conversation

Holt59
Copy link
Member

@Holt59 Holt59 commented May 21, 2024

Switch from fmtlib to std::format.

I already updated the modorganizer project to follow these changes, PR to come, but other repositories probably needs to be updated as well.

Some details:

  • I removed the custom converters in favor of specialization of std::formatter - There is a specialization to allow using std::basic_string of any char-type with any format string (e.g., std::format("{}", L"Hello World!"). This was done to follow the previous converter behavior, not sure if we want to keep it.
  • I added overloads for all logs function that takes std::format_string - This allows for compile-time checking of the format string. In an ideal world, that would be the sole overload, but we have many places with translated format string. I kept the templated F version, but this could probably be replaced with a QStringView/QString overload.

Note: This supersedes #142

@Holt59 Holt59 merged commit 4ed2daa into master May 25, 2024
3 checks passed
@Holt59 Holt59 mentioned this pull request May 25, 2024
@Holt59 Holt59 deleted the dev/stdformat branch June 29, 2024 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant