Template Function homing_local_planner::get_const_reference(const T&, typename boost::disable_if<boost::is_pointer<T>>::type *)
Defined in File misc.hpp
Function Documentation
-
template<typename T>
inline const T &homing_local_planner::get_const_reference(const T &val, typename boost::disable_if<boost::is_pointer<T>>::type *dummy = 0) Helper function that returns the const reference to a value defined by either its raw pointer type or const reference.
Return a constant reference for boths input variants (pointer or reference).
Remark
Makes only sense in combination with the overload getConstReference(const T* val).
- Parameters:
val –
dummy – SFINAE helper variable
- Template Parameters:
T – arbitrary type
- Returns:
If
T
is a pointer, return const *T (leading to const T&), otherwise const T& with out pointer-to-ref conversion