
22 Feb
2010
22 Feb
'10
6:59 p.m.
Ivan Sorokin wrote:
Hello.
Thanks for feedback, Mathias!
Mathias Gaunard wrote:
You might want to use proper move emulation in the absence of C++0x, as is provided by Boost.Move. There is no such library Boost.Move.
It is in the review queue to be included as a first-class Boost citizen, but it seems it is already used by Boost.Interprocess and shipped with it.
If copy constructor or move constructor can throw an exception the only function that works incorrect is release.
My bad, I assumed the operator= was implemented as you described in the documentation (clear current resource first), but you're actually using a temporary then swap, which means the new resource is moved *before* the old resource is released.