Skip to content
Snippets Groups Projects
Commit 6aa5fc89 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

core: add get_eigen_base_type

parent dd5e3688
No related branches found
No related tags found
No related merge requests found
...@@ -122,6 +122,24 @@ template <typename MatType, ...@@ -122,6 +122,24 @@ template <typename MatType,
typename Scalar = typename Scalar =
typename boost::remove_reference<MatType>::type::Scalar> typename boost::remove_reference<MatType>::type::Scalar>
struct EigenFromPy; struct EigenFromPy;
template <typename EigenType>
struct get_eigen_base_type {
typedef typename boost::remove_const<EigenType>::type EigenType_;
typedef typename boost::mpl::if_<
boost::is_base_of<Eigen::MatrixBase<EigenType_>, EigenType_>,
Eigen::MatrixBase<EigenType>
#ifdef EIGENPY_WITH_TENSOR_SUPPORT
,
typename boost::mpl::if_<
boost::is_base_of<Eigen::TensorBase<EigenType_>, EigenType_>,
Eigen::TensorBase<EigenType>, void>::type
#else
,
void
#endif
>::type type;
};
} // namespace eigenpy } // namespace eigenpy
#include "eigenpy/alignment.hpp" #include "eigenpy/alignment.hpp"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment