…and going from T to U is already the dereference (considering T is a smart pointer to U), thus Deref::deref going from &U to &T can/should be seen as sort of "dereference" too…
That is an interesting way to see it. (Hope I got it right now.)
I guess the confusing thing here is that both
- going from
TtoU - and going from
&UtoU
is a dereference.
Actually we got two dereferences (and one reference) happening when we write *x, because *x expands to *Deref::deref(&x):
&xgoes fromTto&T,Deref::derefgoes from&Tto&U,- and
*goes from&UtoU.
Overall, we go from T to U, which is our overall "dereference" (and Deref::deref plays the integral part here).