
30 Nov
2008
30 Nov
'08
12:27 p.m.
Mathias Gaunard wrote:
If you implement move as swap, there is no problem at all. You could still implement move as transfer, leaving the moved-from object in some state where only destruction and assignment are valid; there is no need to make that state reachable from public default-construction.
I don't think move should be implemented as swap, because the resource (shared memory) is still there floating around: //other_shm poits now to shm resources? shm = move(other_shm); I think move should be implemented as containers implement it (something similar to swap + clear): //other_shm will be in default-constructed state shm = move(other_shm) Regards, Ion