Skip to content

Commit

Permalink
Fix MSVC build when HAVE_LONG_LONG is defined.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrry committed Sep 29, 2016
1 parent b9bad65 commit 1d2c7b6
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/google/protobuf/stubs/type_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,18 +139,10 @@ template<> struct is_integral<int> : true_type { };
template<> struct is_integral<unsigned int> : true_type { };
template<> struct is_integral<long> : true_type { };
template<> struct is_integral<unsigned long> : true_type { };
#ifdef HAVE_LONG_LONG
#if defined(HAVE_LONG_LONG) || defined(_MSC_VER)
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> { };
Expand Down

0 comments on commit 1d2c7b6

Please sign in to comment.