This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/78506] New: [c++1z] wrong value category for class decomposition


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78506

            Bug ID: 78506
           Summary: [c++1z] wrong value category for class decomposition
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: lucdanton at free dot fr
  Target Milestone: ---

The spec and intent looks straightforward to me, i should be an lvalue.

//----------
struct one {
    int i;
};

int main()
{
    auto&& [i] = one {};
    // error: taking address of xvalue (rvalue reference)
    &i;
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]