* [Bug c++/46103] [c++0x] moving from std::array copies the elements
2010-10-20 18:19 [Bug c++/46103] New: [c++0x] moving from std::array copies the elements marc.glisse at normalesup dot org
@ 2010-10-20 21:10 ` redi at gcc dot gnu.org
2010-10-20 21:30 ` marc.glisse at normalesup dot org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2010-10-20 21:10 UTC (permalink / raw)
To: gcc-bugs
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++)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/46103] [c++0x] moving from std::array copies the elements
2010-10-20 18:19 [Bug c++/46103] New: [c++0x] moving from std::array copies the elements marc.glisse at normalesup dot org
2010-10-20 21:10 ` [Bug c++/46103] " redi at gcc dot gnu.org
@ 2010-10-20 21:30 ` marc.glisse at normalesup dot org
2010-10-20 23:26 ` paolo.carlini at oracle dot com
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: marc.glisse at normalesup dot org @ 2010-10-20 21:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46103
--- Comment #2 from marc.glisse at normalesup dot org 2010-10-20 21:30:22 UTC ---
(In reply to comment #1)
> so this would demonstrate the problem?
[snip example]
Yes, precisely.
> I haven't checked whether this is valid
I looked at N3126 around 12.8.17.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/46103] [c++0x] moving from std::array copies the elements
2010-10-20 18:19 [Bug c++/46103] New: [c++0x] moving from std::array copies the elements marc.glisse at normalesup dot org
2010-10-20 21:10 ` [Bug c++/46103] " redi at gcc dot gnu.org
2010-10-20 21:30 ` marc.glisse at normalesup dot org
@ 2010-10-20 23:26 ` paolo.carlini at oracle dot com
2010-10-21 5:37 ` marc.glisse at normalesup dot org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: paolo.carlini at oracle dot com @ 2010-10-20 23:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46103
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2010-10-20 23:26:33 UTC ---
What if implicitly-defined move-constructors go away again? If I understand
correctly that the bits we are missing are part of the recent work on implicit
moves and the Committee ends up returning to something similar to what we had
before (I didn't follow the pre-meeting exchanges in detail, but seems well
possible, see n3153) maybe we don't have to do much here in GCC ;) Looks like
we should suspend this PR pending the resolution of those thorny issues...
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/46103] [c++0x] moving from std::array copies the elements
2010-10-20 18:19 [Bug c++/46103] New: [c++0x] moving from std::array copies the elements marc.glisse at normalesup dot org
` (2 preceding siblings ...)
2010-10-20 23:26 ` paolo.carlini at oracle dot com
@ 2010-10-21 5:37 ` marc.glisse at normalesup dot org
2010-10-21 9:32 ` paolo.carlini at oracle dot com
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: marc.glisse at normalesup dot org @ 2010-10-21 5:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46103
--- Comment #4 from marc.glisse at normalesup dot org 2010-10-21 05:36:58 UTC ---
Adding an explicit A(A&&)=default; doesn't help, so I don't think this is
related to the implicit stuff. More like a missing piece of code telling the
compiler how to move from an array.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/46103] [c++0x] moving from std::array copies the elements
2010-10-20 18:19 [Bug c++/46103] New: [c++0x] moving from std::array copies the elements marc.glisse at normalesup dot org
` (3 preceding siblings ...)
2010-10-21 5:37 ` marc.glisse at normalesup dot org
@ 2010-10-21 9:32 ` paolo.carlini at oracle dot com
2010-10-22 13:52 ` jason at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: paolo.carlini at oracle dot com @ 2010-10-21 9:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46103
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> 2010-10-21 09:32:12 UTC ---
Ok, let's add Jason in CC.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/46103] [c++0x] moving from std::array copies the elements
2010-10-20 18:19 [Bug c++/46103] New: [c++0x] moving from std::array copies the elements marc.glisse at normalesup dot org
` (4 preceding siblings ...)
2010-10-21 9:32 ` paolo.carlini at oracle dot com
@ 2010-10-22 13:52 ` jason at gcc dot gnu.org
2010-10-22 18:38 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu.org @ 2010-10-22 13:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46103
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2010.10.22 13:52:19
AssignedTo|unassigned at gcc dot |jason at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/46103] [c++0x] moving from std::array copies the elements
2010-10-20 18:19 [Bug c++/46103] New: [c++0x] moving from std::array copies the elements marc.glisse at normalesup dot org
` (5 preceding siblings ...)
2010-10-22 13:52 ` jason at gcc dot gnu.org
@ 2010-10-22 18:38 ` jason at gcc dot gnu.org
2010-10-22 20:56 ` jason at gcc dot gnu.org
2010-11-22 13:13 ` redi at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu.org @ 2010-10-22 18:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46103
--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> 2010-10-22 18:37:46 UTC ---
Author: jason
Date: Fri Oct 22 18:37:41 2010
New Revision: 165849
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=165849
Log:
PR c++/46103
* init.c (build_vec_init): Handle memberwise move.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/implicit10.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/init.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/46103] [c++0x] moving from std::array copies the elements
2010-10-20 18:19 [Bug c++/46103] New: [c++0x] moving from std::array copies the elements marc.glisse at normalesup dot org
` (6 preceding siblings ...)
2010-10-22 18:38 ` jason at gcc dot gnu.org
@ 2010-10-22 20:56 ` jason at gcc dot gnu.org
2010-11-22 13:13 ` redi at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu.org @ 2010-10-22 20:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46103
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> 2010-10-22 20:55:59 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/46103] [c++0x] moving from std::array copies the elements
2010-10-20 18:19 [Bug c++/46103] New: [c++0x] moving from std::array copies the elements marc.glisse at normalesup dot org
` (7 preceding siblings ...)
2010-10-22 20:56 ` jason at gcc dot gnu.org
@ 2010-11-22 13:13 ` redi at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2010-11-22 13:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46103
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |yacwroy at gmail dot com
--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-11-22 12:54:04 UTC ---
*** Bug 46600 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 10+ messages in thread