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++/46103] [c++0x] moving from std::array copies the elements


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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-10-20 21:10:27 UTC ---
so this would demonstrate the problem?

struct MoveOnly {
  MoveOnly(const MoveOnly&) = delete;
  MoveOnly(MoveOnly&&) { }
  MoveOnly() = default;
};

struct A {
  MoveOnly mo[1];
};

int main() {
  A a;
  A aa = static_cast<A&&>(a);
}

(I haven't checked whether this is valid, or is meant to be implemented yet in
g++)


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