aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/stubs/type_traits.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/stubs/type_traits.h')
-rw-r--r--src/google/protobuf/stubs/type_traits.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/google/protobuf/stubs/type_traits.h b/src/google/protobuf/stubs/type_traits.h
index 0d8127e5..8d48c6aa 100644
--- a/src/google/protobuf/stubs/type_traits.h
+++ b/src/google/protobuf/stubs/type_traits.h
@@ -143,6 +143,14 @@ template<> struct is_integral<unsigned long> : true_type { };
template<> struct is_integral<long long> : true_type { };
template<> struct is_integral<unsigned long long> : true_type { };
#endif
+#if defined(_MSC_VER)
+// With VC, __int8, __int16, and __int32 are synonymous with standard types
+// with the same size, but __int64 has not equivalent (i.e., it's neither
+// long, nor long long and should be treated differnetly).
+// https://msdn.microsoft.com/en-us/library/29dh1w7z.aspx
+template<> struct is_integral<__int64> : true_type { };
+template<> struct is_integral<unsigned __int64> : true_type {};
+#endif
template <class T> struct is_integral<const T> : is_integral<T> { };
template <class T> struct is_integral<volatile T> : is_integral<T> { };
template <class T> struct is_integral<const volatile T> : is_integral<T> { };