microsoft / cppwinrt

C++/WinRT
MIT License
1.64k stars 236 forks source link

std::vformat equivalent for hstring #1361

Closed JaiganeshKumaran closed 11 months ago

JaiganeshKumaran commented 11 months ago

There only seems to be winrt::format; no winrt::vformat to specify a runtime format string.

sylveon commented 11 months ago

This is not possible because std::vformatted_size and std::vformat_to_n do not exist.

We would need a dynamically increasing temporary buffer, at which point that would be equivalent to just using std::vformat and converting to winrt::hstring after.

sylveon commented 2 months ago

This will be fixed in the future with std::runtime_format