Verified Commit 8bbaa052 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

core: allows template specialization of EigenToPy

parent 121f6e76
...@@ -50,7 +50,7 @@ namespace eigenpy ...@@ -50,7 +50,7 @@ namespace eigenpy
{ {
namespace bp = boost::python; namespace bp = boost::python;
template<typename MatType> template<typename MatType, typename _Scalar>
struct EigenToPy struct EigenToPy
{ {
static PyObject* convert(typename boost::add_reference<typename boost::add_const<MatType>::type>::type mat) static PyObject* convert(typename boost::add_reference<typename boost::add_const<MatType>::type>::type mat)
...@@ -82,8 +82,8 @@ namespace eigenpy ...@@ -82,8 +82,8 @@ namespace eigenpy
} }
}; };
template<typename MatType, int Options, typename Stride> template<typename MatType, int Options, typename Stride, typename _Scalar>
struct EigenToPy< Eigen::Ref<MatType,Options,Stride> > struct EigenToPy< Eigen::Ref<MatType,Options,Stride>,_Scalar >
{ {
static PyObject* convert(const Eigen::Ref<MatType,Options,Stride> & mat) static PyObject* convert(const Eigen::Ref<MatType,Options,Stride> & mat)
{ {
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
namespace eigenpy namespace eigenpy
{ {
template<typename MatType> struct EigenToPy;
template<typename MatType> struct EigenFromPy; template<typename MatType> struct EigenFromPy;
template<typename MatType, typename Scalar = typename boost::remove_reference<MatType>::type::Scalar> struct EigenToPy;
} }
#endif // ifndef __eigenpy_fwd_hpp__ #endif // ifndef __eigenpy_fwd_hpp__
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment