Skip to content

Switch from fmtlib to std::format. - #143

Merged
Holt59 merged 2 commits into
masterfrom
dev/stdformat
May 25, 2024
Merged

Holt59 merged 2 commits into
masterfrom
dev/stdformat

Conversation

@Holt59

@Holt59 Holt59 commented May 21, 2024 •

Copy link
Copy Markdown
Member

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
@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