roboptim::detail::cast_constraint_type< C, CLIST > Struct Template Reference

Get the constraint type of CLIST that best match C. More...

#include <roboptim/core/detail/utility.hh>

Public Types

typedef boost::mpl::fold< CLIST, void, boost::mpl::if_< boost::is_base_of< boost::mpl::_2, C >, boost::mpl::if_< boost::is_void< boost::mpl::_1 >, boost::mpl::_2, detail::get_descendant< boost::mpl::_1, boost::mpl::_2 > >, boost::mpl::_1 > >::type type
 

Detailed Description

template<typename C, typename CLIST>
struct roboptim::detail::cast_constraint_type< C, CLIST >

Get the constraint type of CLIST that best match C.

Template Parameters
Cconstraint type.
CLISTa vector of constraint types.

Member Typedef Documentation

template<typename C, typename CLIST>
typedef boost::mpl::fold<CLIST, void, boost::mpl::if_<boost::is_base_of<boost::mpl::_2, C>, boost::mpl::if_<boost::is_void<boost::mpl::_1>, boost::mpl::_2, detail::get_descendant<boost::mpl::_1, boost::mpl::_2> >, boost::mpl::_1> >::type roboptim::detail::cast_constraint_type< C, CLIST >::type