
Sensei <senseiwa <at> gmail.com> writes:
On 8/25/14, 9:14pm, Joaquin M Lopez Munoz wrote:
One easy way to get something roughly equivalent in many situations to what you want is (warning, uncompiled):
template<typename Tag> typename boost::multi_index::index<DataStorage,Tag>:: index::const_iterator myfind(const DataStorage& s,unsigned int v) { return s.template get<Tag>().find(v); }
...
auto it=myfind<byMSB>(storage,MSB(value128bits));
myfind returns a different iterator type depending on the tag you specify when calling it.
Hi Joaquin, and thanks as usual!
I am trying your solution with a member function, but I get the following error:
There was a typo in my uncompiled code. Rather than typename boost::multi_index::index<DataStorage,Tag>::index::const_iterator one should write typename boost::multi_index::index<DataStorage,Tag>::type::const_iterator Joaquín M López Muñoz Telefónica