Joaquín Mª López Muñoz wrote:
Scott Meyers ha escrito:
[...]
What I really want is something more like do_until<Sequence>(unaryFunctionObject) that will loop over all the entries in Sequence until the unaryFunctionObject returns true. Is there something like this in the MPL, must I roll my own, or am I approaching this the wrong way entirely?
AFAIK you must roll your own. Please find attached a possible implementation using mpl::fold.
This is unnecessarily inefficient. It's pretty easy to just use
iterators, something like:
template