Boost logo

Boost :

From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2006-02-22 10:18:28


tal boost ha escrito:

> ///You wrote:
>
> ...and try again. If this works, you might want to omit explicit
> qualification and see what happens.
>
> const hndl_index_type & h_type = get<0>(ns);
>
> Doing so, the output is again:
> error C2667: 'get' : none of 2 overload have a best conversion
> error C2668: 'get' : ambiguous call to overloaded function
> The following lines work fine: :)
> >const hndl_index_type & h_type = boost::multi_index::get<0>(ns); //works fine!
> >boost::multi_index::get<myIndex>(ns).find(id);

OK, we have advanced that much, at least.

> I still don't get why I have to keep explicit qualification even
> though Its defined
> using namespace boost::multi_index, is defined. :(

I've examined the sample you sent me and identified the following as the
culprit:

using namespace boost;
using namespace boost::multi_index;

Having these two using directives in effect makes the compiler get
confused about get() from Boost.Tuple and get() from Boost.MultiIndex.
Please note this is not your fault but the compiler's: a decent compiler
has to correctly identify which get() is used in every situation. So, to
get rid of the problem either qualify get() as you're doing now or omit
one of the using directives.

I think this completes the list of problems you've had so far, I hope
your future experience is smoother --if it's not please come back.

Best,

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