I don't mind admitting that I'm finding Fusion a struggle to get my head round; there's
something about the compile time/run time duality that makes my brain hurt!

So, a really basic question...

When I write this, pretty much verbatim from the examples, despite there being the
appearance of a loop, this is in fact a linear invocation of three calls to print::operator(),
and since the fusion vector is entirely known at compile time, as all fusion types must
be, regardless of how constructed, this "loop" is completely "unrolled" at compile time.

Is this correct?

Thanks,

- Rob.

#include <typeinfo>
#include <iostream>
#include <boost/fusion/include/sequence.hpp>
#include <boost/fusion/include/algorithm.hpp>

struct print
{
    template <typename T>
    void operator()(T const& x) const
    {  
        std::cout << x << " ";
    }  
};

int main( )
{
    using namespace boost::fusion;

    vector<int, char, std::string> stuff(1, 'x', "howdy");
    for_each(stuff, print());
    std::cout << std::endl;
}