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

--- Comment #2 from Matt Godbolt <matt at godbolt dot org> ---
Thanks Manuel. Interestingly this does elicit a warning:

struct B { 
  int a; int b; 
  B(B &&o) 
    : a(static_cast<int>(a)),
      b(std::move(o.b)) {}
};

but this does not:

struct B { 
  int a; int b; 
  B(B &&o) 
    : a(static_cast<int&&>(a)),
      b(std::move(o.b)) {}
};

That said; I believe bug 19808 would indeed help in this situation!

Reply via email to