
Tal Agmon ha escrito:
Hi Joaquin,
Sorry for the lack of info in my previous quote. I appreicate your affort to promptly help me.
What I have is a non_unique which I carry to get all the keys.( I don't care about the elements)
My guess is that key_extractor() returns a key_form_element, is quite redundant in my case.
Hello again. Still I'm having difficulties with understanding your question, but let me try my hand: are you looking for a way to produce all *different* key values contained by an index? If so, something like the following would do: for(index_t::const_iterator it=i.begin();it!=i.end();){ // note: no ++it // output the key std::cout<<i.key_extractor()(*it)<<std::endl; // jump to the next different key value it=i.upper_bound(i.key_extractor()(*it)); } Now, is this what you were asking about?
Regards Tal
Best, Joaquín M López Muñoz Telefónica, Investigación y Desarrollo