Boost logo

Boost :

From: Gary Powell (powellg_at_[hidden])
Date: 2002-03-20 11:44:01


    // Print all odd contents of an stl container c
    for_each(c.begin(), c.end(),
        if_(is_odd(arg1))
        [
            cout << arg1 << ' '
        ]
    );

Notice the if_ syntax.
----------------------------------------------------------
Hey! Cool reuse of "[]"!

   What about using it for "for_" et.al.????

   for_each(c.begin(), c.end(),
     for_(var(i)=_1[0], var(i) != _1[LAST], ++var(i))
      [
      ]
   )

-Who hasn't seen this much work being done on other Lambda stuff in at least
a year.-
   -Gary-


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