|
Boost : |
From: Steven Watanabe (steven_at_[hidden])
Date: 2007-01-27 20:50:52
AMDG
Mathias Gaunard wrote:
>
> I see the problem now.
> If you move the object, then the pointer in the set doesn't point to a
> valid object anymore.
>
> Would a move constructor that replaces the pointer in the set completely
> solve the problem?
Unfortunately, such a move constructor could throw. So we
would be left right back where we started. Making a nothrow
move constructor would require reimplementing std::set to allow
elements to be modified in a way that changes their ordering without
calling erase/insert.
In Christ,
Steven Watanabe
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk