Skip to content

Commit

Permalink
Suppress a bogus MSVC warning
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Apr 10, 2020
1 parent 141a00d commit 36ea326
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/fmt/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@

#ifdef _MSC_VER
# define FMT_MSC_VER _MSC_VER
# define FMT_SUPPRESS_MSC_WARNING(n) __pragma(warning(suppress : n))
#else
# define FMT_MSC_VER 0
# define FMT_SUPPRESS_MSC_WARNING(n)
#endif

// Check if relaxed C++14 constexpr is supported.
Expand Down Expand Up @@ -325,7 +327,7 @@ FMT_CONSTEXPR typename std::make_unsigned<Int>::type to_unsigned(Int value) {
return static_cast<typename std::make_unsigned<Int>::type>(value);
}

constexpr unsigned char micro[] = "\u00B5";
FMT_SUPPRESS_MSC_WARNING(4566) constexpr unsigned char micro[] = "\u00B5";

template <typename Char> constexpr bool is_unicode() {
return FMT_UNICODE || sizeof(Char) != 1 ||
Expand Down

0 comments on commit 36ea326

Please sign in to comment.