|
Boost Users : |
From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2007-01-23 06:21:41
Markus Werle ha escrito:
> Hi!
>
> Even for the more correct typedef I get lost:
>
> typedef bm::multi_index_container
> <data_t,
> bm::indexed_by
> <bm::sequenced<>,
> bm::ordered_unique
> <bm::const_mem_fun<data_t,
> std::string const &,
> &data_t::get<0> > > > > storage_t;
>
>
>
> this fails due to probably disallowed standard conversions
> (or a cobfused gcc-4.0.3): Cleaned up error message:
[...]
Hello Markus,
This particular problem of using tuple fields as key extractors is
discussed at the following thread:
http://lists.boost.org/boost-users/2005/12/16087.php
Please take a look at it and come back if anything's not clear:
summing it up, what you get will work when Boost 1.34 comes out
or if using a CVS snapshot, except that you have to write
data_t::inherited when declaring the extractor's base class:
bm::const_mem_fun<
data_t::inherited,
std::string const &,
&data_t::get<0>
>
And the other solution is to write a user-defined extractor as
explained in the aforementioned thread.
HTH,
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