From 1d2c7b6c7376f396c8c7dd9b6afd2d4f83f3cb05 Mon Sep 17 00:00:00 2001 From: Derek Murray Date: Thu, 29 Sep 2016 12:52:54 -0700 Subject: Fix MSVC build when HAVE_LONG_LONG is defined. --- src/google/protobuf/stubs/type_traits.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/google/protobuf/stubs/type_traits.h b/src/google/protobuf/stubs/type_traits.h index 8d48c6aa..3ab5ea7d 100644 --- a/src/google/protobuf/stubs/type_traits.h +++ b/src/google/protobuf/stubs/type_traits.h @@ -139,18 +139,10 @@ template<> struct is_integral : true_type { }; template<> struct is_integral : true_type { }; template<> struct is_integral : true_type { }; template<> struct is_integral : true_type { }; -#ifdef HAVE_LONG_LONG +#if defined(HAVE_LONG_LONG) || defined(_MSC_VER) template<> struct is_integral : true_type { }; template<> struct is_integral : 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 : true_type {}; -#endif template struct is_integral : is_integral { }; template struct is_integral : is_integral { }; template struct is_integral : is_integral { }; -- cgit v1.2.3