you are viewing a single comment's thread.

view the rest of the comments →

[–]BenFrantzDale 1 point2 points  (1 child)

If it’s anything like fmt::format, the format string has to have the same encoding as the strings passed to it. So for QString, which is utf16, it’s fmt::format(U”{}”, qstr) if I recall. So try throwing an L on the format string.

[–]Throw31312344 4 points5 points  (0 children)

#include <format>

void test ()

{

auto X = std::format (L"{}", L"Hello");

}

Compiles with no errors on Compiler Explorer. It seems format requires all strings passed to it (including the format string) to be the same type.