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: unassig...@gcc.gnu.org
        ReportedBy: pot...@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.

Reply via email to