Boost logo

Boost Users :

From: Andrej van der Zee (mavdzee_at_[hidden])
Date: 2007-06-14 20:16:11


Hi,

Thanks again for your quick reply.

Moreover, thanks a lot for this library! The strong
point is that one can define multiple indexes on
existing datastructures, without toughing the
datastructures itself. For example, when you want to
change a vector to a hash, its straightforward and
less error-prone to use boost::multi_index_container,
then rewriting your datastructures to key-value pairs
and using an std::map.

Cheers,
Andrej

--- "JOAQUIN LOPEZ MU?Z" <joaquin_at_[hidden]> wrote:

>
> ----- Mensaje original -----
> De: Andrej van der Zee <mavdzee_at_[hidden]>
> Fecha: Jueves, Junio 14, 2007 7:10 pm
> Asunto: [Boost-users] multi_index_container and
> hash_key lookup with
> boostboost-1.33.1
> Para: Boost-users_at_[hidden]
>
> > Hi,
> >
> > I have a problem with a hash-index to a member of
> type
> > std::vector<std::strings>. With boost 1.34 it
> compiles
> > and runs find, but it fails to compile with 1.33!
> [...]
> > typedef std::vector<std::string> keys_type;
> >
> > struct entry_type
> > {
> > keys_type keys;
> >
> > bool operator<(const entry_type& e) const
> > { ... }
> > };
> [...]
> > error: no matching function for call to
> > ?hash_value(const std::vector<...>&)?
> [...]
>
> Hi Andrej, to teach the compiler to hash vectors
> you've got
> to include <boost/functional/hash/vector.hpp>.
> Starting from
> Boost 1.34, all the hash/*.hpp headers are
> deprecated
> and you should only use <boost/functional/hash.hpp>.
>
> Joaquín y López Muñoz
> Telefónica, Investigación y Desarrollo
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
>
http://lists.boost.org/mailman/listinfo.cgi/boost-users
>

      ___________________________________________________________
Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for
your free account today http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07.html


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