Boost logo

Boost :

From: tal boost (tal.boost_at_[hidden])
Date: 2006-02-22 06:51:39


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
boost::multi_index::detail::ordered_index<struct
boost::multi_index::const_mem_fun_explicit<class
CtCAD::NodeBase,unsigned int,unsigned int (__thi
scall CtCAD::NodeBase::*)(void)const ,&[thunk]: __thiscall
`vcall'{56,{flat}}' >,struct std::less<unsigned int>,struct
boost::multi_index::detail::nth_layer<1,class boost::shared_ptr<class
CtCAD::NodeBase>,struct boost::multi_index::indexed_by<struc
t boost::multi_index::ordered_unique<struct
boost::multi_index::const_mem_fun_explicit<class
CtCAD::NodeBase,unsigned int,unsigned int (__thiscall
CtCAD::NodeBase::*)(void)const ,&[thunk]: __thiscall
`vcall'{56,{flat}}' >,struct boost::mpl::na,struc
t boost::mpl::na>,struct boost::multi_index::ordered_non_unique<struct
boost::multi_index::const_mem_fun_explicit<class
CtCAD::NodeBase,int,int (__thiscall CtCAD::NodeBase::*)(void)const
,&[thunk]: __thiscall `vcall'{44,{flat}}' >,struct boost::mpl:
:na,struct boost::mpl::na>,struct boost::mpl::na,struct
boost::mpl::na,struct boost::mpl::na>,class std::allocator<class
boost::shared_ptr<class CtCAD::NodeBase> > >,struct
boost::mpl::vector0<struct boost::mpl::na>,struct
boost::multi_index::detail
::ordered_unique_tag>' to 'class
boost::multi_index::detail::ordered_index<struct
boost::multi_index::const_mem_fun_explicit<class
CtCAD::NodeBase,unsigned int,unsigned int (__thiscall
CtCAD::NodeBase::*)(void)const ,&[thunk]: __thiscall `vcall'{56,
{flat}}' >,struct std::less<unsigned int>,struct
boost::multi_index::detail::nth_layer<1,class boost::shared_ptr<class
CtCAD::NodeBase>,struct boost::multi_index::indexed_by<struct
boost::multi_index::ordered_unique<struct boost::multi_index::const_
mem_fun_explicit<class CtCAD::NodeBase,unsigned int,unsigned int
(__thiscall CtCAD::NodeBase::*)(void)const ,&[thunk]: __thiscall
`vcall'{56,{flat}}' >,struct boost::mpl::na,struct
boost::mpl::na>,struct boost::multi_index::ordered_non_unique<struct
 boost::multi_index::const_mem_fun_explicit<class CtCAD:
:NodeBase,int,int (__thiscall CtCAD::NodeBase::*)(void)const
,&[thunk]: __thiscall `vcall'{44,{flat}}' >,struct
boost::mpl::na,struct boost::mpl::na>,struct boost::mpl::na,struct
boost::mpl::na,struct boost::mpl::na>,class std::allocator<class boost
::shared_ptr<class CtCAD::NodeBase> > >,struct
boost::mpl::vector0<struct boost::mpl::na>,struct
boost::multi_index::detail::ordered_unique_tag> &'
        Conversion loses qualifiers
Error executing cl.exe.

//////////////////////////
> My suspicion is that you've got some extra using directive that is causing
> the ambiguity problems.
>
I will send you on a private channel some source files so maybe you
can find out what is the problem.

Regards,
Tal
On 2/22/06, Joaquín Mª López Muñoz <joaquin_at_[hidden]> wrote:
> tal boost ha escrito:
>
> > Hi,
> >
> > Thanks for all your suggestions I will do more reading regarding
> > compiler specifics
> > Hopefuly I will upgrade my compiler this year.
> >
> > Ok, I had tried this approach:
> >
> > hndl_index_type & h_type = get<0>(ns);
> > group_index_type& g_type = get<1>(ns);
> >
> > But got:
> > error C2667: 'get' : none of 2 overload have a best conversion
> > error C2668: 'get' : ambiguous call to overloaded function
> >
> > Anymore suggestions? (Pls)
>
> Could you provide some sample code (either through the list or
> privately)? If this is not an option, please paste the complete error
> message, so that I can see what are the clashing overloads the compiler
> is referring to.
>
> I've never met a similar problem. If nothing else works, you can always
> explicitly qualify get:
>
> hndl_index_type & h_type = boost::multi_index::get<0>(ns);
>
>
> > I do have to admit that I find It strange that all the examples on the
> > web (1-9) compile successfully. which left me wonder what am I missing
> > In my project.
>
> My suspicion is that you've got some extra using directive that is causing
> the ambiguity problems.
>
> Joaquín M López Muñoz
> Telefónica, Investigación y Desarrollo
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>


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