Description
Is there a documentation about which char type conversions are supposed to work and which should not work by design?
Narrow string to wide string output seems to work:
fmt::format(L"{}", "foo");
Wide char to narrow string seems to be explictly unsupported with a static_assert
fmt::format("{}", L'f');
formatting of wide characters into a narrow output is disallowed
Wide string to narrow string compiles, but puts the memory address of the wide string into the output, which doesn't look like intended behavior?
fmt::format("{}", L"foo");
"0x7ff6f817dc80"
Then there seem to be compile error tests in fmt/test/compile-test/CmakeLists.txt which look broken:
# Formatting a wide string with a narrow format string is forbidden.
expect_compile_error("fmt::format(\"{}\", L\"foo\";")
Looks like a missing )
for the function call?
Can someone please explain why (or correct me if I am wrong) narrow to wide is supported, but wide to narrow should not work?
Thanks!