Verified Commit d9123ddf authored by Silvio Traversaro's avatar Silvio Traversaro Committed by Justin Carpentier
Browse files

Add workaround for problem in MSVC v142 parser

The MSVC v142 parser (version 16.7 Preview 4) seems to have problems
with some specific template expressions if they contain multiple parenthesis.
As a workaround, avoid to have double parenthesis.
parent c8e44abf
......@@ -863,7 +863,7 @@ namespace pinocchio
*
*/
template<typename LieGroup_t, typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorIn1, typename ConfigVectorIn2>
typename PINOCCHIO_EIGEN_PLAIN_TYPE((typename ModelTpl<Scalar,Options,JointCollectionTpl>::ConfigVectorType))
typename PINOCCHIO_EIGEN_PLAIN_TYPE_NO_PARENS((typename ModelTpl<Scalar,Options,JointCollectionTpl>::ConfigVectorType))
randomConfiguration(const ModelTpl<Scalar,Options,JointCollectionTpl> & model,
const Eigen::MatrixBase<ConfigVectorIn1> & lowerLimits,
const Eigen::MatrixBase<ConfigVectorIn2> & upperLimits);
......@@ -884,7 +884,7 @@ namespace pinocchio
*/
template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorIn1, typename ConfigVectorIn2>
typename PINOCCHIO_EIGEN_PLAIN_TYPE((typename ModelTpl<Scalar,Options,JointCollectionTpl>::ConfigVectorType))
typename PINOCCHIO_EIGEN_PLAIN_TYPE_NO_PARENS((typename ModelTpl<Scalar,Options,JointCollectionTpl>::ConfigVectorType))
randomConfiguration(const ModelTpl<Scalar,Options,JointCollectionTpl> & model,
const Eigen::MatrixBase<ConfigVectorIn1> & lowerLimits,
const Eigen::MatrixBase<ConfigVectorIn2> & upperLimits)
......@@ -907,7 +907,7 @@ namespace pinocchio
*
*/
template<typename LieGroup_t, typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
typename PINOCCHIO_EIGEN_PLAIN_TYPE((typename ModelTpl<Scalar,Options,JointCollectionTpl>::ConfigVectorType))
typename PINOCCHIO_EIGEN_PLAIN_TYPE_NO_PARENS((typename ModelTpl<Scalar,Options,JointCollectionTpl>::ConfigVectorType))
randomConfiguration(const ModelTpl<Scalar,Options,JointCollectionTpl> & model);
/**
......@@ -925,7 +925,7 @@ namespace pinocchio
*
*/
template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
typename PINOCCHIO_EIGEN_PLAIN_TYPE((typename ModelTpl<Scalar,Options,JointCollectionTpl>::ConfigVectorType))
typename PINOCCHIO_EIGEN_PLAIN_TYPE_NO_PARENS((typename ModelTpl<Scalar,Options,JointCollectionTpl>::ConfigVectorType))
randomConfiguration(const ModelTpl<Scalar,Options,JointCollectionTpl> & model)
{
return randomConfiguration<LieGroupMap,Scalar,Options,JointCollectionTpl>(model);
......
......@@ -389,19 +389,19 @@ namespace pinocchio
}
template<typename LieGroup_t,typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorIn1, typename ConfigVectorIn2>
typename PINOCCHIO_EIGEN_PLAIN_TYPE((typename ModelTpl<Scalar,Options,JointCollectionTpl>::ConfigVectorType))
typename PINOCCHIO_EIGEN_PLAIN_TYPE_NO_PARENS((typename ModelTpl<Scalar,Options,JointCollectionTpl>::ConfigVectorType))
randomConfiguration(const ModelTpl<Scalar,Options,JointCollectionTpl> & model,
const Eigen::MatrixBase<ConfigVectorIn1> & lowerLimits,
const Eigen::MatrixBase<ConfigVectorIn2> & upperLimits)
{
typedef typename PINOCCHIO_EIGEN_PLAIN_TYPE((typename ModelTpl<Scalar,Options,JointCollectionTpl>::ConfigVectorType)) ReturnType;
typedef typename PINOCCHIO_EIGEN_PLAIN_TYPE_NO_PARENS((typename ModelTpl<Scalar,Options,JointCollectionTpl>::ConfigVectorType)) ReturnType;
ReturnType q(model.nq);
randomConfiguration<LieGroup_t,Scalar,Options,JointCollectionTpl,ConfigVectorIn1,ConfigVectorIn2,ReturnType>(model, lowerLimits.derived(), upperLimits.derived(), q);
return q;
}
template<typename LieGroup_t,typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
typename PINOCCHIO_EIGEN_PLAIN_TYPE((typename ModelTpl<Scalar,Options,JointCollectionTpl>::ConfigVectorType))
typename PINOCCHIO_EIGEN_PLAIN_TYPE_NO_PARENS((typename ModelTpl<Scalar,Options,JointCollectionTpl>::ConfigVectorType))
randomConfiguration(const ModelTpl<Scalar,Options,JointCollectionTpl> & model)
{
typedef ModelTpl<Scalar,Options,JointCollectionTpl> Model;
......
......@@ -9,6 +9,7 @@
/// \brief Macro giving access to the equivalent plain type of D
#define PINOCCHIO_EIGEN_PLAIN_TYPE(D) Eigen::internal::plain_matrix_type< typename pinocchio::helper::argument_type<void(D)>::type >::type
#define PINOCCHIO_EIGEN_PLAIN_TYPE_NO_PARENS(D) Eigen::internal::plain_matrix_type< typename pinocchio::helper::argument_type<void D>::type >::type
/// \brief Similar to macro PINOCCHIO_EIGEN_PLAIN_TYPE but with guaranty to provite a column major type
#define PINOCCHIO_EIGEN_PLAIN_COLUMN_MAJOR_TYPE(D) pinocchio::helper::handle_return_type_without_typename<D,Eigen::internal::plain_matrix_type_column_major>::type
......
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