Boost logo

Boost :

Subject: Re: [boost] [mpl] multiset
From: pfultz2 (pfultz2_at_[hidden])
Date: 2015-03-12 16:47:27


> I never need to use helper metafunctions. Meta's expression evaluator
> handles laziness.

Yes you do use helper metafunctions. Look at your implementation of fold.
With
a library built with full laziness, you should be able to build a SFINAE-
friendly fold like this:

template<class Iterable, class State, class Fun>
using fold = eval_if<empty&lt;Iterable>,
    State,
    fold<pop_front&lt;Iterable>, lazy_apply<Fun, State, front&lt;Iterable>>,
Fun>
>;

Is something like this possible with Meta library?

Paul

--
View this message in context: http://boost.2283326.n4.nabble.com/mpl-multiset-tp4672187p4673091.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

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