From a programming language theory standpoint, in C++, qualifiers like const
and volatile
allow to express a form of subtyping, with for example int
being a subtype of const int
.
I was wondering if we could also consider that ref-qualifiers &
and &&
allow to express a form of subtyping or not. In other words, can we consider that T
, T&
and T&&
are related by a subtyping relationship or not, from a programming language theory standpoint? And if so, what is this relationship?