
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