From 45f2aaddcfedf426fc167f3c93b50c6786fad68f Mon Sep 17 00:00:00 2001
From: Justin Carpentier <justin.carpentier@inria.fr>
Date: Wed, 22 Feb 2023 11:15:45 +0100
Subject: [PATCH] compilation: try a fix for windows

---
 include/eigenpy/eigen-from-python.hpp | 6 ++++--
 include/eigenpy/eigen-to-python.hpp   | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/include/eigenpy/eigen-from-python.hpp b/include/eigenpy/eigen-from-python.hpp
index c8556e3..aa002a8 100644
--- a/include/eigenpy/eigen-from-python.hpp
+++ b/include/eigenpy/eigen-from-python.hpp
@@ -290,8 +290,10 @@ struct eigen_from_py_impl<MatType, Eigen::MatrixBase<MatType> > {
   static void registration();
 };
 
-template <typename EigenType, typename _Scalar>
-struct EigenFromPy : eigen_from_py_impl<EigenType> {};
+template <typename EigenType>
+struct EigenFromPy<EigenType,
+                   typename boost::remove_reference<EigenType>::type::Scalar>
+    : 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 013f8cf..325ded7 100644
--- a/include/eigenpy/eigen-to-python.hpp
+++ b/include/eigenpy/eigen-to-python.hpp
@@ -155,8 +155,10 @@ struct eigen_to_py_impl_tensor {
 
 EIGENPY_DOCUMENTATION_END_IGNORE
 
-template <typename EigenType, typename Scalar>
-struct EigenToPy : eigen_to_py_impl<EigenType> {
+template <typename EigenType>
+struct EigenToPy<EigenType,
+                 typename boost::remove_reference<EigenType>::type::Scalar>
+    : eigen_to_py_impl<EigenType> {
   static PyTypeObject const* get_pytype() { return getPyArrayType(); }
 };
 
-- 
GitLab