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

* [Bug c++/56317] inheriting constructor fails to move brace-initialized object
  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 ` potswa at mac dot com
  2013-02-14  9:56 ` redi at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: potswa at mac dot com @ 2013-02-14  9:35 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56317

--- Comment #1 from David Krauss <potswa at mac dot com> 2013-02-14 09:35:12 UTC ---
(But, perfect forwarding equivalent to the inheriting constructor semantic does
work around the issue.)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/56317] inheriting constructor fails to move brace-initialized object
  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
  1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2013-02-14  9:56 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56317

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-02-14 09:56:15 UTC ---
dup of PR 56285

*** This bug has been marked as a duplicate of bug 56285 ***


^ 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).