In C++ standard there is much wording including the term "cv-qualified" and "cv-unqualified". It's already known that a cv-qualified type is a type contains a set of cv-qualifiers: one of {"const"}, {"volatile"}, {"const, volatile"}, {" "}.
But I get confused when the type returned by std::remove_cv_t<const T*> is actually const T* not T*. Why?
Consider this declaration const int *volatile ptr{}, if we assume the type of ptr is cv T; what T is? what cv is?
Another examples,
const int&& r1 = 0;
const int* &&r2 = 0;
const int *const &r3 = 0;
- If the type of
r1iscv1 T1; whatT1is? whatcv1is? - If the type of
r2iscv2 T2; whatT2is? whatcv2is? - If the type of
r3iscv3 T3; whatT3is? whatcv3is?