Fix conversion warning in filesystem::path formatter

Use template character type to eliminate MSVC conversion warning when
formatting a wide chararacter path:

fmt\std.h(140,49): warning C4244: '=': conversion from 'const Char' to 'char', possible loss of data
This commit is contained in:
Hans-Martin B. Jensen 2024-01-13 16:01:03 +01:00
parent 1b55d10305
commit 5d591a2899

View File

@ -120,7 +120,7 @@ template <typename Char> struct formatter<std::filesystem::path, Char> {
format_specs<Char> specs_;
detail::arg_ref<Char> width_ref_;
bool debug_ = false;
char path_type_ = 0;
Char path_type_ = 0;
public:
FMT_CONSTEXPR void set_debug_format(bool set = true) { debug_ = set; }