From: Fernando Cacciola (fernando_cacciola_at_[hidden])
Date: 2003-06-30 11:52:19
This looks fine in general.
I've needed something like it so I'm intereseted on seeing this on boost.
Why 'index' instead of 'key'? Associative containers use the term key
instead of index,
since index is typically related with random access instead of look up
(2) I would explore a friendlier interface. For instance:
(2.1) key uniqueness could be specified along with the key itself
and not with a separate template parameter.
(2.2) keys could be tagged so that 'get' could be parametrized by
key tag instead of number.
(3) This is a showstopper for me: The key mutating operations should
use a higher level interface which protects clustering and ordering
With the current interface, if I understood correctly, I could forget to
call update() which would break such invariants.
A better setup would be to use something along the lines of
the 'modifiers' used by the CGAL Library.
Check out the section named "Protected Access to Internal Representations"
on this page:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk