This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/46103] [c++0x] moving from std::array copies the elements
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 20 Oct 2010 21:10:29 +0000
- Subject: [Bug c++/46103] [c++0x] moving from std::array copies the elements
- Auto-submitted: auto-generated
- References: <bug-46103-4@http.gcc.gnu.org/bugzilla/>
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++)