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


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
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

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at