From 4e9faed8f9a2a2649c912c8f9974866848cb2e28 Mon Sep 17 00:00:00 2001 From: Vyacheslav Napadovsky Date: Sun, 25 Oct 2015 14:37:31 +0300 Subject: [PATCH] MS Visual Studio "/Zc:wchar_t-" compiler parameter support added --- format.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/format.h b/format.h index 3d756760..d89b3c8f 100644 --- a/format.h +++ b/format.h @@ -940,7 +940,9 @@ class MakeValue : public Arg { // characters and strings into narrow strings as in // fmt::format("{}", L"test"); // To fix this, use a wide format string: fmt::format(L"{}", L"test"). +#if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED) MakeValue(typename WCharHelper::Unsupported); +#endif MakeValue(typename WCharHelper::Unsupported); MakeValue(typename WCharHelper::Unsupported); MakeValue(typename WCharHelper::Unsupported); @@ -977,7 +979,9 @@ class MakeValue : public Arg { FMT_MAKE_VALUE(bool, int_value, BOOL) FMT_MAKE_VALUE(short, int_value, INT) +#if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED) FMT_MAKE_VALUE(unsigned short, uint_value, UINT) +#endif FMT_MAKE_VALUE(int, int_value, INT) FMT_MAKE_VALUE(unsigned, uint_value, UINT)