Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2004-12-21 09:11:16


Aleksey Gurtovoy wrote:

> Answering the OP question: MPL lambda expressions do not support scopes (yet),
> so it's not possible to implement the above without an auxiliary metafunction
> incapsulating the nested scope. Which actually might be a good thing -- it's
> hard to imagine that the "inline" version would be shorter and easier to
> understand than this:
>
> template< typename Map, typename Entry >
> struct copy_entires
> : copy<
> typename Entry::second::entries
> , inserter<Map, insert<_1,_2> >
> >
> {
> };
>
> typedef fold<map_types, map_types, copy_entires<_1,_2> >::type result;

In that case, can you explain what protect<> is for?

Thanks,

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net