From aeb242d07c24fa0607499e242d88e7551596c215 Mon Sep 17 00:00:00 2001 From: Justin Carpentier <justin.carpentier@inria.fr> Date: Wed, 22 Feb 2023 13:18:17 +0100 Subject: [PATCH] core: consider a specific strategy for windows This solution should be unified when MSVC compiler will behave properly --- include/eigenpy/eigen-from-python.hpp | 8 +++++++- include/eigenpy/eigen-to-python.hpp | 5 +++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/include/eigenpy/eigen-from-python.hpp b/include/eigenpy/eigen-from-python.hpp index aa002a8..f31e351 100644 --- a/include/eigenpy/eigen-from-python.hpp +++ b/include/eigenpy/eigen-from-python.hpp @@ -290,10 +290,16 @@ struct eigen_from_py_impl<MatType, Eigen::MatrixBase<MatType> > { static void registration(); }; +#ifdef EIGENPY_MSVC_COMPILER template <typename EigenType> struct EigenFromPy<EigenType, typename boost::remove_reference<EigenType>::type::Scalar> - : eigen_from_py_impl<EigenType> {}; +#else +template <typename EigenType, typename _Scalar> +struct EigenFromPy +#endif + : eigen_from_py_impl<EigenType> { +}; template <typename MatType> void *eigen_from_py_impl<MatType, Eigen::MatrixBase<MatType> >::convertible( diff --git a/include/eigenpy/eigen-to-python.hpp b/include/eigenpy/eigen-to-python.hpp index 325ded7..d7084dd 100644 --- a/include/eigenpy/eigen-to-python.hpp +++ b/include/eigenpy/eigen-to-python.hpp @@ -155,9 +155,14 @@ struct eigen_to_py_impl_tensor { EIGENPY_DOCUMENTATION_END_IGNORE +#ifdef EIGENPY_MSVC_COMPILER template <typename EigenType> struct EigenToPy<EigenType, typename boost::remove_reference<EigenType>::type::Scalar> +#else +template <typename EigenType, typename _Scalar> +struct EigenToPy +#endif : eigen_to_py_impl<EigenType> { static PyTypeObject const* get_pytype() { return getPyArrayType(); } }; -- GitLab