Under Lvalue-to-rvalue conversion the C++23 standard says ([conv.lval]#1, emphasis mine):
A glvalue of a non-function, non-array type
T
can be converted to a prvalue.44
IfT
is an incomplete type, a program that necessitates this conversion is ill-formed.
IfT
is a non-class type, the type of the prvalue is the cv-unqualified version ofT
.
Otherwise, the type of the prvalue isT
.45
Give an example, where this happens, i.e.,
- starting with a glvalue of type
T
which is a non-class, - lvalue-to-rvalue conversion is executed, and
- we end up in a prvalue of type
std::remove_cvref_t<T>
.