What is the rationale behind decltype behavior?
They wanted a way to get the type of declaration of an identifier. They also wanted a way to get the type of an expression, including information about if it is a temporary or not. decltype(x) gives the declared type of the identifier x. If you pass decltype something that is not an identifier, it … Read more