
JohnQ escribió:
> typedef boost::multi_index_container< > value_type, > indexed_by< > ordered_non_unique< > tag<index1>,member
>, This cannot possibly work, as value_type does not have a member called first (you're using a tuple, not an std::pair). Anyway, the problem does not lie here.
Yes, I've been ignoring this while I figured out the iterator... it's leftover from the example and I just named things first,second,third while I get the rest figured out. What I did instead was use the structure below... I didn't want to mess with stuff like tuple_element<N>::template get<RET>(x) (or whatever the correct type-independent tuple-element accessor would be) becuase I'm really not that familiar with this sort of meta programming... this seems like it will work but if you're familiar with a better way, I'd love to hear about it.
You have to define a custom key extractor to work with tuples: for an example, look for "tuple_member_extractor" at http://lists.boost.org/boost-users/2005/12/16088.php [...]
> typedef typename bimultimap
:: > bimimap::index<index2>::type::iterator bimimapIterator2; You need a disambiguating template keyword:
typedef typename bimultimap
:: bimimap::template index<index2>::type::iterator bimimapIterator2; That compiles (BIG THANK YOU). Next step is for me to figure out what this actually does. :) Can you give me some background (or point me to the correct reading material) on why the "template" qualifier is needed and what effect that has? I need to learn more about this...
The need for diambiguating "template"s is related to the usage of "typename" in expressions like "typedef typename bimultimap..." that appear in so-called dependent contexts. Some further explanations at http://www.comeaucomputing.com/techtalk/templates/#templateprefix Joaquín M López Muñoz Telefónica, Investigación y Desarrollo