|
Boost : |
From: Dylan Trotter (trotterdylan_at_[hidden])
Date: 2005-11-20 14:17:34
I just had a really irritating time tracking down bad memory access in
ordered_index because I foolishly wrote something like this:
typedef client_set::nth_index<0>::type address_index_type;
address_index_type addressIndex = clients_.get<0>();
address_index_type::iterator iter = addressIndex.find(addr);
The problem here is that I got my addressIndex by value in the second
line. I may be overlooking something here, but I think it might be
useful to make ordered_index noncopyable so that this would be detected
at compile time instead of runtime. I nearly threw my monitor out the
window over this one.
Thanks,
Dylan Trotter
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk