From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12692 invoked by alias); 1 Feb 2015 05:37:53 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 11615 invoked by uid 48); 1 Feb 2015 05:33:32 -0000 From: "eric.niebler at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/64892] C++1y: generic lambdas, decltype(auto), and rvalue references, oh my! Date: Sun, 01 Feb 2015 05:37:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.9.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: eric.niebler at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-02/txt/msg00009.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64892 --- Comment #1 from Eric Niebler --- 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>().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.