Boost logo

Boost Users :

Subject: [Boost-users] [fusion] transform a heterogeneous vector
From: Jean-Louis Leroy (jl_at_[hidden])
Date: 2009-09-20 11:46:13


In the example from the documentation :

struct triple
{
    typedef int result_type;

    int operator()(int t) const
    {
        return t * 3;
    };
};
...
assert(transform(make_vector(1,2,3), triple()) == make_vector(3,6,9));

...all the elements have the same type. How can it work with
heterogeneous vectors ? What would be typedef'ed to result_type ?

Jean-Louis


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