|
Boost Users : |
Subject: [Boost-users] [tuples, multi-index] tuples::get as key extractor
From: Igor R (boost.lists_at_[hidden])
Date: 2010-08-08 16:27:51
Hello,
Consider the following types:
typedef tuple<std::string, int> Item;
typedef multi_index_container<
Item,
indexed_by<
ordered_non_unique<global_fun<const Item &, int, &tuples::get<1> > >
>
> Items;
The above types don't compile (MSVC10) because of &tuples::get<1>:
C2440: 'specialization' : cannot convert from 'overloaded-function' to
'int (__cdecl *)(boost::tuples::tuple<T0,T1> &)'
It seems there're several overloaded function templates "tuples::get"...
So, what's the correct type of the appropriate function? Or -- is
there a more "robust" way to extract the key (without defining
explicit function-object)?
Thanks!
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