Boost logo

Boost Users :

From: Martin Wartens (martin.wartens_at_[hidden])
Date: 2005-04-05 08:17:53


Hi,
I can confirm that the cast-variants don't prevent the warning. "return !!
*prev_ptr;" and "return *prev_ptr? true: false;" both seem to work.
Back to the main topic: I find it quite unsatisfiying that there is seems to be
no way to avoid searching for the same position twice
("get_bucket", "find_iterator"). I don't see where the hint-version of insert
could be of any use, especially since the standard says "Implementations are
permitted to ignore the hint". I would need a function like "insert_if" taking
a predicate that decides whether to insert when an object with the same key
already exists.

Martin


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net