Boost logo

Boost :

From: Gary Powell (powellg_at_[hidden])
Date: 2002-02-20 12:38:03

One more overload:

   template<class Test, class Result1, class Result2>
   result_type operator?:(Test &t, Result1 &r1, Result &r2);

It's a bit arcane but it makes it possible to write the lambda function,
i.e. take the test expression, and the two result expressions and save them
for later processing.

   for_each(c.begin(),c.end(), ((_1 > 2) ? var(x) : _1) );


Boost list run by bdawes at, gregod at, cpdaniel at, john at