Boost logo

Boost :

From: Reid Sweatman (reid_of_diamonds_at_[hidden])
Date: 2001-03-21 06:55:03


In which case, why not variable_to_lambda() and evaluate_as_constant()? Or
suitable abbrevs.

Reid Sweatman

> -----Original Message-----
> From: Gary Powell [mailto:Gary.Powell_at_[hidden]]
> Sent: Tuesday, March 20, 2001 7:57 AM
> To: 'boost_at_[hidden]'
> Subject: RE: [boost] Lambda on MSVC
>
>
> > >...or lvalue() and rvalue(). I like lvalue() better than
> var() du to my
> > >hatrd of abbrevs.
> >
> > Those are even clearer. And they are specific terms defined in the C++
> > standard, so in that sense are not abbreviations.
> >
> > --Beman
> >
> I think var() and constant() are clearer in meaning for a lambda
> expression.
> var() makes a variable into a lambda expression, and constant() evaluates
> the expression inside of () and makes a constant value out of it (constant
> as in not re-evaluated within the lambda expression.)
>
> int foo(int);
> int v;
> for_each(a.begin(), a.end(),
> (var(v) += bind(foo, var(v)) - free1 + constant(20) ) );
>
> vs.
> for_each(a.begin(), a.end(),
> (lvalue(v) += bind(foo, lvalue(v)) - free1 + rvalue(20) ) );
>
> But if you still want rvalue and lvalue I'll discuss it with
> Jaakko. What I
> want is a term that will be easily explained to a intermediate student of
> C++.
>
> -gary-
>
>
>
> List-Unsubscribe: <mailto:boost-unsubscribe_at_[hidden]>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>


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