Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2006-10-21 10:08:00


The mpl bind doc:

   http://www.boost.org/libs/mpl/doc/refmanual/bind.html

contains:

   bind is [skipping] a compile-time counterpart of the similar run-time
   functionality provided by Boost.Bind and Boost.Lambda libraries.

However, further down, it looks like mpl bind creates a metafunciton
with the same arity as the original. IOW, the g::apply arity is
apparently the same arity as the original f metafunction class.
OTOH, the boost.bind doc:

   http://www.boost.org/libs/bind/bind.html#Purpose

shows examples where the arity is reduced by the number
or arguments passed to bind. Quoting, it says:

   bind(f, 1, 2) will produce a "nullary" function object that takes no
   arguments and returns f(1, 2).

To avoid this confusion, the mpl bind doc should make explicit mention
that the arity of the resulting metafunction is the same as the
original, which is in contrast to the boost.bind's affect on the arity
of the result functions w.r.t. the original.

Or am I missing something?

-regards,
Larry


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