Boost logo

Boost :

From: tal boost (tal.boost_at_[hidden])
Date: 2006-02-20 07:47:49


Hello,

I having difficulties getting multi_index working with shared_ptr

Example code:

typedef multi_index_container<

              NodePtr,

              indexed_by<

                        ordered_unique<

                          BOOST_MULTI_INDEX_CONST_MEM_FUN(NodePtr, handle,
 getHandle)

>

>

> node_set;

NodePtr is a typedef to boost::shared_ptr<NodeBase>

NodeBase is an interface for other NodeTypes objects the use it.

NodeBase ::getHandle() : handle (handle==size_t)

Using MSVC++ 6.0 compilers complains that getHandle is not a member of
NodePtr

If I replace NodePtr with NodeBase class it compiles, with a price of giving
away shared_ptr abilty.

Does anyone have any idea how to get both libs work?

Regards
Tal Agmon


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk