
Le samedi 05 mars 2011 à 23:22 +0300, DE a écrit :
on 05.03.2011 at 15:04 Ivan Le Lann wrote :
The opposite view also stands: Move will benefit to most C++ classes/functions while only those who have designed their classes to use COW can afford not to use Move. Designing a COW class is more complex than a Move enabled one.
My KISS understanding of move is that it's telling me: use functional programming style, so that you don't need std::move. Of course, this is not always possible, but I think that this limits the scope of your (valid) point.
so would it be sufficient for you (and other developers) if there were a library which makes using cow for your class easier (if not trivial)?
No. I might have failed to express what I meant with "complex". Even struct foo : cow <foo> {}; can be seen as complex, if you consider implications for foo. Ivan