Boost logo

Boost Users :

From: imre_at_[hidden]
Date: 2006-08-16 05:20:14


From: Joel de Guzman <joel_at_[hidden]>
> > Maybe boost::fusion can help.
>
> Sure:
>
> typename boost::fusion::result_of::as_vector<your_type_list>::type

I am new to boost, so could you elaborate this a bit?

I can't seem to find anything called result_of in the boost::fusion
namespace. If this name is hidden by some macro magic, could you give the
header file I have to #include? Else could you explain what am I missing?

I was able to do something like this:

#include <boost/mpl/vector.hpp>
#include <boost/spirit/fusion/sequence/generate.hpp>
#include <boost/spirit/fusion/sequence/make_tuple.hpp>
#include <boost/utility/result_of.hpp>

using namespace boost::mpl;
using namespace boost::fusion;
using namespace boost;

typedef vector<int, char, double>::type typelist;
typedef meta::generate<typelist>::type my_tuple;

int
main()
{
        my_tuple t;
        t = make_tuple(1, 'a', 0.25);
}

But I have the feeling this might not be the intended way of usage ...

Regards

ImRe


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