Skip to content

Conversation

@mingxwa
Copy link
Member

@mingxwa mingxwa commented Apr 16, 2025

Changes

  • New header file proxy_fmt.h with 2 new skills: pro::skills::fmt_format and pro::skills::fmt_wformat.
  • Added unit test cases accordingly.

Note that proxy_fmt.h is not self-contained. Users need to include both proxy.h and the {fmt} library (version 6.1.0 or later) before proxy_fmt.h. Spec will be updated separately.

Resolves #279

@mingxwa mingxwa requested review from guominrui and tian-lt April 16, 2025 10:14
@zhiyongww
Copy link

This is awesome. I'm wondering if we could remove the dependency on std::format (i.e., #include ) if we use {fmt}.

@mingxwa
Copy link
Member Author

mingxwa commented Apr 17, 2025

Hi @zhiyongww, removing dependency on std::format is not currently on our roadmap. While pro::skills::format and pro::skills::fmt_format are defined separately in the upcoming 4.0 release, you can simply ignore pro::skills::format if you don't use it. Otherwise, if you find removing #include <format> from proxy.h useful in your scenario, could you share more context? Thank you!

@zhiyongww
Copy link

zhiyongww commented Apr 17, 2025

Hi @zhiyongww, removing dependency on std::format is not currently on our roadmap. While pro::skills::format and pro::skills::fmt_format are defined separately in the upcoming 4.0 release, you can simply ignore pro::skills::format if you don't use it. Otherwise, if you find removing #include <format> from proxy.h useful in your scenario, could you share more context? Thank you!

Hey @mingxwa, thanks for the reply. In our company, std::format is not available in our production environment even though we use C++20. I was thinking about using the proxy library to replace virtual functions to improve the performance of our program. Thanks.

tian-lt
tian-lt previously approved these changes Apr 17, 2025
Copy link
Collaborator

@tian-lt tian-lt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also update the "single header"s in FAQ?

tian-lt
tian-lt previously approved these changes Apr 17, 2025
@mingxwa mingxwa merged commit d4d41c6 into microsoft:main Apr 21, 2025
8 checks passed
@mingxwa mingxwa deleted the user/mingxwa/fmt branch April 21, 2025 03:31
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.

Support for fmt::format with support_wformat

4 participants