
14 Aug
2007
14 Aug
'07
1:02 p.m.
Martin Apel wrote in message news:46C19A4F.9080505@simpack.de...
Aleksey Gurtovoy wrote:
All in all, to get the behavior you want with the current library you need to actually merge two maps into a third one. [...]
I'm not sure, if I understand this correctly. What is the recommended way of merging two maps into a third one? Is it possible with the current MPL implementation?
Sure.
I only found an map::insert metafunction to insert a single element, but not a whole range of pairs.
You can actually to do something along these lines (untested): typedef copy< joint_view<Map1,Map2> , inserter< map0<>, insert<_1,_2> > >::type JointMap; -- Aleksey Gurtovoy MetaCommunications Engineering