Boost logo

Boost :

From: Martin Bonner (martin.bonner_at_[hidden])
Date: 2006-02-22 07:29:50


----Original Message----
From: boost-bounces_at_[hidden]
[mailto:boost-bounces_at_[hidden]] On Behalf Of tal boost Sent: 22
February 2006 11:52 To: boost_at_[hidden]
Subject: Re: [boost] multi_index with shared_ptr

> Applying full qualify
> hndl_index_type & h_type = boost::multi_index::get<0>(ns);
> I get this error
> //////////////////////////////////
> Compiling...
> CADDB.CPP
> z:\ctcadlib\include\db\caddb.cpp(258) : error C2440: 'initializing' :
> cannot convert from 'const class [**SNIP**]'
> to 'class [**SNIP**] &'
> Conversion loses qualifiers

The compiler believes that get<> is returning a const hdnl_index_type,
and it is refusing to bind a reference to non-const to that.

Of course, that simple overview does rather get lost in the template
verbiage!

In earlier messages you were complaining about ambiguity, so I presume
this is not the root of your problem - just another manifestation of it
:-(.

-- 
Martin Bonner
Martin.Bonner_at_[hidden]
Pi Technology, Milton Hall, Ely Road, Milton, Cambridge, CB4 6WZ,
ENGLAND Tel: +44 (0)1223 203894

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