|
Boost Users : |
Subject: [Boost-users] [fusion] How to transform types of fusion::map ?
From: Zeljko Vrba (zvrba_at_[hidden])
Date: 2008-09-17 02:25:20
A very concrete question:
I have map<pair<K1, V1>, pair<K2, V2>, ..> as input. How do I produce
map<pair<K1, std::vector<V1> >, pair<K2, std::vector<V2>, .. > on output?
I do not see an equivalent of LISPs MAPCAR in the list of algorithms..
Is this something that should be done by combining fold and push_back
algorithms? If so, I'm currently in the dark on how to do it (no example
for the fold metafunction algorithm)
===
Few more questions now that I'm already posting:
- what is the difference between accumulate and fold?
- what is the purpose of for_each metafunction when the docs say that it
always returns void? (and no side-effects are possible at compile-time)
Thanks.
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