|
Boost Users : |
From: Joseph Turian (turian_at_[hidden])
Date: 2006-11-23 13:33:46
I have a boost_multi_index with a hashed_non_unique key.
I understand that if I do a .find() for a particular key, I can get a single
entry with that key.
However, I want to iterate over *ALL* the entries with this particular key,
since there may be several.
How do I do this? I can't figure out which is the correct end iterator.
e.g. something along the following lines [haven't tried to compile]
typedef FirstName string;
typedef multi_index_container<
Employee,
indexed_by<
hashed_non_unique<member<tag<FirstName>,
Employee,FirstName,&Employee::first_name> >
>
> employee_set;
typedef employee_set::index<FirstName>::type example_set_by_movie;
boost::multi_index::get<FirstName>(m_employees).find("john");
-- http://www.cs.nyu.edu/~turian/
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