|
Boost Users : |
From: JOAQUIN LOPEZ MU?Z (joaquin_at_[hidden])
Date: 2005-11-01 06:51:04
Hi Oliver,
----- Mensaje original -----
De: Oliver.Kowalke_at_[hidden]
Fecha: Martes, Noviembre 1, 2005 10:38 am
Asunto: [Boost-users] problem with multi_index_container -> find
> Hello,
> I don't understand why this code doesn't compile (gcc-3.3.1) '...
> id_index.find( id) ...' ?
> Regards,
> Oliver
[...]
> phonebook::iterator itr = id_index.find( id); // <<==
doesn't
id_index.find() returns a phonebook::nth_index_iterator<1>::type.
phonebook::iterator is shorthand for
phonebook::nth_index_iterator<0>::type, a different type.
The following should work
phonebook::nth_index_iterator<1>::type itr = id_index.find(id);
or alternatively
phonebook::nth_index<1>::type::iterator itr = id_index.find(id);
Hope this helps,
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
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