From 80ee258a071d55f3edbd27d860ee745c8bfb21c5 Mon Sep 17 00:00:00 2001 From: Justin Carpentier <justin.carpentier@inria.fr> Date: Fri, 24 Feb 2023 19:58:14 +0100 Subject: [PATCH] core: allow template specialization according to the scalar type --- include/eigenpy/details.hpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/include/eigenpy/details.hpp b/include/eigenpy/details.hpp index a71c59f4..e1bab2ad 100644 --- a/include/eigenpy/details.hpp +++ b/include/eigenpy/details.hpp @@ -19,11 +19,12 @@ namespace eigenpy { template <typename EigenType, - typename BaseType = typename get_eigen_base_type<EigenType>::type> + typename BaseType = typename get_eigen_base_type<EigenType>::type, + typename Scalar = typename EigenType::Scalar> struct expose_eigen_type_impl; -template <typename MatType> -struct expose_eigen_type_impl<MatType, Eigen::MatrixBase<MatType> > { +template <typename MatType, typename Scalar> +struct expose_eigen_type_impl<MatType, Eigen::MatrixBase<MatType>, Scalar> { static void run() { if (check_registration<MatType>()) return; @@ -40,8 +41,9 @@ struct expose_eigen_type_impl<MatType, Eigen::MatrixBase<MatType> > { }; #ifdef EIGENPY_WITH_TENSOR_SUPPORT -template <typename TensorType> -struct expose_eigen_type_impl<TensorType, Eigen::TensorBase<TensorType> > { +template <typename TensorType, typename Scalar> +struct expose_eigen_type_impl<TensorType, Eigen::TensorBase<TensorType>, + Scalar> { static void run() { if (check_registration<TensorType>()) return; -- GitLab