mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-28 23:04:18 +08:00
Define internal::make_unsigned for [unsigned]long long on macOS.
macOS defines int64_t as long long even for C++03 and therefore expects a template specialization internal::make_unsigned<long long>, for C++03. Since other platforms define int64_t as long for C++03 we cannot add the specialization for all cases.
This commit is contained in:
parent
0845df7f77
commit
5336ad8591
@ -194,9 +194,15 @@ template<> struct make_unsigned<signed __int64> { typedef unsigned __int64 typ
|
|||||||
template<> struct make_unsigned<unsigned __int64> { typedef unsigned __int64 type; };
|
template<> struct make_unsigned<unsigned __int64> { typedef unsigned __int64 type; };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// TODO: Some platforms define int64_t as long long even for C++03. In this case
|
// Some platforms define int64_t as long long even for C++03. In this case we
|
||||||
// we are missing the definition for make_unsigned. If we just define it, we get
|
// are missing the definition for make_unsigned. If we just define it, we get
|
||||||
// duplicated definitions for platforms defining int64_t as signed long for C++03
|
// duplicated definitions for platforms defining int64_t as signed long for
|
||||||
|
// C++03. We therefore add the specialization for C++03 long long for these
|
||||||
|
// platforms only.
|
||||||
|
#if EIGEN_OS_MAC
|
||||||
|
template<> struct make_unsigned<unsigned long long> { typedef unsigned long long type; };
|
||||||
|
template<> struct make_unsigned<long long> { typedef unsigned long long type; };
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template <typename T> struct add_const { typedef const T type; };
|
template <typename T> struct add_const { typedef const T type; };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user