According to the C++ Primer, C++ arrow operator yields an lvalue. Additionally decltype
of an expression which yields an lvalue will result in a reference type. So why the following decltype does not result in a reference type.
struct MyStruct {
string name
};
MyStruct s;
s.name = "aname";
MyStruct* p = &s;
decltype (p -> name) str = s.name; //type of str will be string and not &string although p -> name yields an lvalue