https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64892

--- Comment #1 from Eric Niebler <eric.niebler at gmail dot com> ---
I think this is user error. I was confused between the difference between
decltype(x.y) and decltype((x.y)). It seems the decltype(auto) is semantically
the same as decltype((x.y)) in this case. From that perspective, gcc is begin
consistent.

As for why decltype((declval<pair<int&&,int&&>>().first)) is int& instead of
int&&, I'm guessing it's because of some subtlety of rvalue references that I
don't yet grasp. I'll leave this open on the off-chance that this really is a
bug, and on the off-change that someone will explain to me why it is the way it
is.

Sorry in advance if this is just noise.

Reply via email to