From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6985 invoked by alias); 14 Feb 2013 09:33:55 -0000 Received: (qmail 6313 invoked by uid 48); 14 Feb 2013 09:33:34 -0000 From: "potswa at mac dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/56317] New: inheriting constructor fails to move brace-initialized object Date: Thu, 14 Feb 2013 09:33:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: potswa at mac 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-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 X-SW-Source: 2013-02/txt/msg01397.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D56317 Bug #: 56317 Summary: inheriting constructor fails to move brace-initialized object Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: potswa@mac.com Although p{} in the example below is an rvalue, I get an error "cannot bind= =E2=80=98p=E2=80=99 lvalue to =E2=80=98p&&=E2=80=99." It does compile if I don't use braces, and change p{} to p(). struct p {}; struct b { b( p && ) {} }; struct d : b { using b::b; }; d o( p{} ); In the original, full program, it doesn't mention a value category, and changing the braces to () doesn't work around the issue.