Boost logo

Boost Users :

From: Geoffrey Romer (geoff.romer_at_[hidden])
Date: 2005-10-06 13:14:51


On 10/6/05, David Abrahams <dave_at_[hidden]> wrote:
> Geoffrey Romer <geoff.romer_at_[hidden]> writes:
>
> >> > If so, doesn't that mean Cromwell's fix is incorrect?
> >>
> >> I'm afraid I've not seen his fix.
> >
> I'm also afraid I don't have time to look at it right now.

Fair enough. It's sort of a side issue anyway.

> > What I don't
> > understand is when I should be saying "typename
> > metafunc<args>::type" and when I should be using plain
> > "metafunc<args>". This isn't a language-correctness issue, it's an
> > MPL usage issue.
>
> Oh. Maybe mapping into the runtime world will help. If you think of
> metafunc as a regular function, then "metafunc<args...>::type" is
> equivalent to a regular function call, and "metafunc<args...>" is
> equivalent to boost::bind(func, args...)
>
> These are exact analogies, AFAICT.

OK, that's what I thought, but it seems not to apply to
lambda-expressions. If I want to call foo<> on a placeholder, I seem
to be required to write foo<_1>, and not typename foo<_1>::type, even
though I want foo<> to actually be applied to the placeholder (after
substitution). What am I missing?


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