Any design reason why some of the below conversions do not work?
#include <fmt/core.h>
#include <fmt/xchar.h>
using FormatString = fmt::basic_format_string< char, int >;
using FormatWideString = fmt::basic_format_string< wchar_t, int >;
auto main() -> int
{
[[maybe_unused]] auto f1 = fmt::format(FormatString { "{}" }, 1);
[[maybe_unused]] auto f2 = fmt::format(FormatWideString{ L"{}" }, 1);// ERROR
[[maybe_unused]] auto f3 = fmt::format( "{}", 1);
[[maybe_unused]] auto f4 = fmt::format(L"{}", 1);
[[maybe_unused]] auto f5 = fmt::format(fmt::basic_string_view< char >{ FormatString { "{}" } }, 1);// ERROR
[[maybe_unused]] auto f6 = fmt::format(fmt::basic_string_view< wchar_t >{ FormatWideString{ L"{}" } }, 1);
return 0;
}
https://godbolt.org/z/PYbcbWbaf
Any design reason why some of the below conversions do not work?
https://godbolt.org/z/PYbcbWbaf