const A* a = new A();decltype(foo()) x1; // type is const int&&decltype(bar()) x2; // type is intdecltype(i) x3; // type is intdecltype(a->x) x4; // type is doubledecltype((a->x)) x5; // type is const double&The reason for the difference between the latter two invocations of decltype is that the parenthesized expression (a->x) is neither an id-expression nor a member access expression, and therefore does not denote a named object.[13] Because the expression is an lvalue, its deduced type is "reference to the type of the expression", or const double&.[10]In December 2008, a concern was raised to the committee by Jaakko Järvi over the inability to use decltype to form a qualified-id,[14] which is inconsistent with the intent that decltype(e) should be treated "as if it were a typedef-name".[15] While commenting on the formal Committee Draft for C++0x, the Japanese ISO member body noted that "a scope operator(::) cannot be applied to decltype, but it should be. It would be useful