Template Function homing_local_planner::get_const_reference(const T *)

Function Documentation

template<typename T>
inline const T &homing_local_planner::get_const_reference(const T *ptr)

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:

ptr – pointer of type T

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