direction_vector_ref_t, I will give his link. Links are const in design, so adding a const to a link is pointless. You probably want to reference a const object that cannot be executed with a typedef. You will have to repeat the slightly modified typedef definition.
Just clarify:
typedef T& ref; typedef const T& cref; typedef const ref cref;
The last line is the same as the first, not the second. Typedefs are not symbolic inserts, as soon as you type T & as ref, then ref refers to a reference to type T. If you add const to it, you will get a reference to const for type T, and not a reference to type const T.
source share