Return the proper const reference type of a given type. More...
#include <roboptim/core/detail/utility.hh>
Public Types | |
typedef boost::mpl::if_ < is_eigen_type< T > , const_eigen_ref< T > , boost::add_reference < typename boost::add_const< T > ::type > >::type::type | type |
Return the proper const reference type of a given type.
For instance:
This returns a const Eigen::Ref for dense Eigen matrices, else a simple const reference.
Note: this currently does not cover all cases (e.g. sparse vectors), but should work for argument_t/vector_t (dense vectors).
T | type. |
typedef boost::mpl::if_<is_eigen_type<T>, const_eigen_ref<T>, boost::add_reference<typename boost::add_const<T>::type> >::type::type roboptim::detail::const_ref< T >::type |