Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-12-21 12:32:55


The documentation for bind says:

"Note that the first argument - the bound function object - is an exception
to the nesting rules. A nested bind expression passed to bind as a first
argument is not treated differently from any other function object: "

But it never says explicitly what "the nesting rules" are. With some work I
can infer that bind objects passed as arguments to bind (other than the
first), are evaluated when the outer bind is called, and the results are
used in place of the bind objects themseves.

One reason I find the passage confusing is that in the example, it says g(5,
8) is called, but that appears to violate arity constraints since x is
passed as an argument but apparently never used.

===================================================
  David Abrahams, C++ library designer for hire
 resume: http://users.rcn.com/abrahams/resume.html

        C++ Booster (http://www.boost.org)
          email: david.abrahams_at_[hidden]
===================================================


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