Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::mpl::for_each: ambiguous call to overloaded function
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-10-03 18:27:27


AMDG

peter_foelsche_at_[hidden] wrote:
> I don't understand why the compiler thinks there is am ambiguity. I pass only two template arguments and expected the compiler to select the matching for_each with two template arguments.
>
>
> inline CThis &operator=(const double _d)
> { m_dValue = _d;
> boost::mpl::for_each<CDB, CSet0>(CSet0(*this));
> return *this;
> }
>

What exactly do you intend to do? It seems odd that you should pass the
same
type as the transform op and as the function object.

Do you really intend this:

CSet0 f(*this);
f(typename mpl::apply<CSet0, typename mpl::at_c<CDB, 0>::type>::type());
f(typename mpl::apply<CSet0, typename mpl::at_c<CDB, 1>::type>::type());
// ...

In Christ,
Steven Watanabe

P.S. Please don't reply to an existing thread instead of starting a new
thread.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net