public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/56317] New: inheriting constructor fails to move brace-initialized object
@ 2013-02-14 9:33 potswa at mac dot com
2013-02-14 9:35 ` [Bug c++/56317] " potswa at mac dot com
2013-02-14 9:56 ` redi at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: potswa at mac dot com @ 2013-02-14 9:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56317
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 ‘p’
lvalue to ‘p&&’."
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-02-14 9:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-14 9:33 [Bug c++/56317] New: inheriting constructor fails to move brace-initialized object potswa at mac dot com
2013-02-14 9:35 ` [Bug c++/56317] " potswa at mac dot com
2013-02-14 9:56 ` redi at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).