Re: [Boost-users] [Fusion] Understanding Fusion

22 Jul
2009
22 Jul
'09
11:57 a.m.
--- On Sat, 7/18/09, Robert Jones wrote:
Hi All
I'm very much a Fusion newbie, just getting may head around it, so a really basic question!
From the intro page, when we write
#include <boost/fusion/sequence.hpp> #include <boost/fusion/include/sequence.hpp>
vector<int, char, std::string> stuff for_each(stuff, print_xml());
am I correct in believing that there is no loop involved in the for_each, and that this resolves, at compile time, to a linear list of function calls?
Yes. IIRC, it resolves to the equivalent of: print_xml()(int()); print_xml()(char()); print_xml()(std::string()); HTH, Cromwell D. Enage
5812
Age (days ago)
5812
Last active (days ago)
0 comments
1 participants
participants (1)
-
Cromwell Enage