From: David Abrahams (dave_at_[hidden])
Date: 2003-10-01 06:41:20
"Arkadiy Vertleyb" <vertleyb_at_[hidden]> writes:
> Hi all,
> The boost::mpl::for_each function doesn't appear to be listed in the
> MPL reference. Does this mean it's for internal use only or has it
> just been overlooked? Or, did I miss something?
It's just been overlooked.
> Also, sometimes it's convenient to brake the loop on certain condition.
> Like, when comparing relational tuples in our library, we go through the
> field list, which is a type list. Once 2 fields don't compare equal, we
> have to stop.
Are you comparing their runtime values or their compile-time values?
> Is it possible to brake the for_each loop in MPL, and if not,
> what is the prefferred way to achieve this effect?
It sounds like for_each is the wrong algorithm for you. If
compile-time, use mpl::find_if. If runtime, several of us have been
thinking about a library of tuple algorithms, but we don't have
anything comprehensive implemented yet, sorry.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk