Skip to content

Commit 3a84ce5

Browse files
committed
Use SFINAE to fix 'redefinition of struct' error on armhf
Signed-off-by: Shane Loretz <[email protected]>
1 parent 4904470 commit 3a84ce5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

include/eigenpy/numpy.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,14 @@ struct NumpyEquivalentType<unsigned long> {
139139
// See https://github.com/stack-of-tasks/eigenpy/pull/455
140140
#if defined __linux__
141141

142+
#include <type_traits>
143+
142144
template <>
143-
struct NumpyEquivalentType<long long> {
145+
struct NumpyEquivalentType<std::enable_if<!std::is_same<int64_t, long long>::value, long long>::type> {
144146
enum { type_code = NPY_LONGLONG };
145147
};
146148
template <>
147-
struct NumpyEquivalentType<unsigned long long> {
149+
struct NumpyEquivalentType<std::enable_if<!std::is_same<uint64_t, unsigned long long>::value, unsigned long long>::type> {
148150
enum { type_code = NPY_ULONGLONG };
149151
};
150152

0 commit comments

Comments
 (0)