Boost logo

Boost :

Subject: Re: [boost] De Bruijn Bind (alternate bind syntax) Interest?
From: Stefan Strasser (strasser_at_[hidden])
Date: 2010-09-03 07:50:10


> david, why do you need to number the lambdas? doesn't the "nested
> index" of the args refer to the level of nesting instead of the
> number given to the lam<> template?

after reading the link larry posted (1), let me correct my question:
does lam need to know the number of parameters of the resulting function?

Boost.Bind simply ignores additional arguments, and generates a
compiler error for insufficient arguments.

void f(int,int);
bind(&f,3,_1)(1,2); // -> f(3,1)

(1) http://bitbucket.org/camior/de-bruijn-bind/src#cl-45


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