Skip to content

Commit aeb242d

Browse files
committed
core: consider a specific strategy for windows
This solution should be unified when MSVC compiler will behave properly
1 parent 90484fa commit aeb242d

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

include/eigenpy/eigen-from-python.hpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,10 +290,16 @@ struct eigen_from_py_impl<MatType, Eigen::MatrixBase<MatType> > {
290290
static void registration();
291291
};
292292

293+
#ifdef EIGENPY_MSVC_COMPILER
293294
template <typename EigenType>
294295
struct EigenFromPy<EigenType,
295296
typename boost::remove_reference<EigenType>::type::Scalar>
296-
: eigen_from_py_impl<EigenType> {};
297+
#else
298+
template <typename EigenType, typename _Scalar>
299+
struct EigenFromPy
300+
#endif
301+
: eigen_from_py_impl<EigenType> {
302+
};
297303

298304
template <typename MatType>
299305
void *eigen_from_py_impl<MatType, Eigen::MatrixBase<MatType> >::convertible(

include/eigenpy/eigen-to-python.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,14 @@ struct eigen_to_py_impl_tensor {
155155

156156
EIGENPY_DOCUMENTATION_END_IGNORE
157157

158+
#ifdef EIGENPY_MSVC_COMPILER
158159
template <typename EigenType>
159160
struct EigenToPy<EigenType,
160161
typename boost::remove_reference<EigenType>::type::Scalar>
162+
#else
163+
template <typename EigenType, typename _Scalar>
164+
struct EigenToPy
165+
#endif
161166
: eigen_to_py_impl<EigenType> {
162167
static PyTypeObject const* get_pytype() { return getPyArrayType(); }
163168
};

0 commit comments

Comments
 (0)