Subject: [boost] [MultiIndex] interface comments
From: David Abrahams (dave_at_[hidden])
Date: 2008-10-31 15:45:06
Just reading through the docs for this very useful library and I had a
0. The term /typelist/ (italicized) is used in the tutorial without
definition. Do you mean an MPL type sequence, or something else?
1. Seems like the tags functionality could take advantage of Boost.Parameter
to provide a nicer interface and save some code.
2. The "shortcuts" save exactly 1 character.
Each index of a multi_index_container uses its own iterator types,
which are different from those of another indices. As is the rule
with STL containers, these iterators are defined as nested types
of the index:
Additionally, multi_index_containers provide shortcut definitions
to the iterator types of their constituent indices:
There is a variation of the expression above for use with tags:
es.get<name>().find("Judy Smith"); // get<1> would also work
Notice the column in which "it" appears in both versions. IMO these
interfaces should be deprecated (i.e. not documented, and eventually
removed) as they provide no readability advantage, hurt learnability,
and complicate usage.
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk