Commit b6d435b9 authored by Victor Zverovich's avatar Victor Zverovich

Fix an MSVC warning (#798)

parent 857b382f
...@@ -1287,6 +1287,7 @@ struct ConvertToIntImpl2<T, true> { ...@@ -1287,6 +1287,7 @@ struct ConvertToIntImpl2<T, true> {
template <typename T> template <typename T>
struct ConvertToInt { struct ConvertToInt {
enum { enum {
#pragma warning(suppress: 4244)
enable_conversion = sizeof(fmt::internal::convert(get<T>())) == sizeof(Yes) enable_conversion = sizeof(fmt::internal::convert(get<T>())) == sizeof(Yes)
}; };
enum { value = ConvertToIntImpl2<T, enable_conversion>::value }; enum { value = ConvertToIntImpl2<T, enable_conversion>::value };
......
...@@ -64,6 +64,7 @@ template <typename T> ...@@ -64,6 +64,7 @@ template <typename T>
struct ConvertToIntImpl<T, true> { struct ConvertToIntImpl<T, true> {
// Convert to int only if T doesn't have an overloaded operator<<. // Convert to int only if T doesn't have an overloaded operator<<.
enum { enum {
#pragma warning(suppress: 4244)
value = sizeof(convert(get<DummyStream>() << get<T>())) == sizeof(No) value = sizeof(convert(get<DummyStream>() << get<T>())) == sizeof(No)
}; };
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment