Skip to content
Snippets Groups Projects
Verified Commit c51049e0 authored by Justin Carpentier's avatar Justin Carpentier Committed by Justin Carpentier
Browse files

[Macros] Add helper struct to remove typename warning comming from c++03 compilers

parent 05481367
No related branches found
No related tags found
No related merge requests found
......@@ -33,7 +33,7 @@ PINOCCHIO_PATCH_VERSION>=z))))
namespace se3
{
namespace internal
namespace helper
{
template<typename T> struct argument_type;
template<typename T, typename U> struct argument_type<T(U)> { typedef U type; };
......@@ -43,14 +43,26 @@ namespace se3
/// \brief Empty macro argument
#define PINOCCHIO_MACRO_EMPTY_ARG
namespace se3
{
namespace helper
{
template<typename D, template<typename> class TypeAccess>
struct handle_return_type_without_typename
{
typedef typename TypeAccess< typename argument_type<void(D)>::type >::type type;
};
}
}
/// \brief Macro giving access to the equivalent plain type of D
#define EIGEN_PLAIN_TYPE(D) Eigen::internal::plain_matrix_type< typename se3::internal::argument_type<void(D)>::type >::type
#define EIGEN_PLAIN_TYPE(D) Eigen::internal::plain_matrix_type< typename se3::helper::argument_type<void(D)>::type >::type
/// \brief Similar to macro EIGEN_PLAIN_TYPE but with guaranty to provite a column major type
#define EIGEN_PLAIN_COLUMN_MAJOR_TYPE(D) Eigen::internal::plain_matrix_type_column_major< typename se3::internal::argument_type<void(D)>::type >::type
#define EIGEN_PLAIN_COLUMN_MAJOR_TYPE(D) se3::helper::handle_return_type_without_typename<D,Eigen::internal::plain_matrix_type_column_major>::type
/// \brief Similar to macro EIGEN_PLAIN_TYPE but with guaranty to provite a row major type
#define EIGEN_PLAIN_ROW_MAJOR_TYPE(D) Eigen::internal::fix::plain_matrix_type_row_major< typename se3::internal::argument_type<void(D)>::type >::type
#define EIGEN_PLAIN_ROW_MAJOR_TYPE(D) se3::helper::handle_return_type_without_typename<D,Eigen::internal::fix::plain_matrix_type_row_major>::type
/// \brief Macro giving access to the reference type of D
#define EIGEN_REF_CONSTTYPE(D) Eigen::internal::ref_selector<D>::type
......@@ -64,7 +76,6 @@ D &, \
D \
>::type
#endif
/// \brief Macro giving access to the return type of the dot product operation
#if EIGEN_VERSION_AT_LEAST(3,3,0)
#define EIGEN_DOT_PRODUCT_RETURN_TYPE(D1,D2) \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment