|
Boost : |
From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2006-04-17 06:59:24
Alexei Alexandrov ha escrito:
> Hi,
>
> my multi_index use case:
> * The container contains not objects themselves, but pointers (shared_ptr-s).
> * The objects are noncopyable - they are created by a factory and only smart
> pointers are copied between clients.
> * The container has 2 indexes. Indexes are built on const_mem_fn extractor.
> One of the indexes uses a function from a base class.
>
> It seems that in 1.34 problem with using member function from a base class is
> supposed to be solved, but it causes a regression that you cannot have pointers
> to noncopyable objects in the container. Is this a known issue?
>
> My compiler is MSVC 7.1/Intel Compiler 9.0. Here is a code snippet to
> demonstrate the problem. This code compiles well with boost 1.33.1, but fails
> to compile with RC 1.34. If you uncomment the second index, it won't compile
> neither with 1.33 nor with 1.34.
Hello again, Alexei, after the illuminating discussion with Mr. Maddock I've
realized
that I'm using is_convertible in a suboptimal fashion with respect to the kind
of convertibility I want to detect. Could you please run your snippet using the
attached
version of boost/multi_index/mem_fun.hpp? If I haven't done some mistake, this
should make your code work, even with the second index uncommented.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk