Boost logo

Boost Users :

From: Joel de Guzman (joel_at_[hidden])
Date: 2004-07-06 23:41:14


Markus Werle wrote:

> David Abrahams wrote:
>
>
>
>>What you really want is the fusion library (in CVS), which will
>>replace Boost.Tuple:
>>
>> #include <boost/spirit/fusion/sequence/generate.hpp>
>>
>> typedef
>> boost::fusion::result_of_generate<some_type_sequence>::type
>> mytuple;
>>
>>I don't know of another (easy) solution for you.
>
>
> Sorry for being stupid, but I tried to get some compilable
> file out of this information and simply failed due to
> - as far as I can see - missing traits.
>
> Could you please provide a complete example?

Please get the latest version from Spirit's CVS in branch
PHOENIX_V2. The current syntax is:

     boost::fusion::meta::generate<T>::type

given an mpl::vector, say:

     typedef mpl::vector<int, double, std::string> vt;

you get a tuple type:

     boost::fusion::meta::generate<vt>::type // tuple<int, double, std::string>

and you get a tuple object by:

     boost::fusion::generate(vt());

Pardon the confusion. I am currentlly in the process of moving the
bulk of the Spirit's CVS to the boost CVS. The current stuff in the
boost CVS is rather outdated and will be replaced soon.

Please email me if you have further questions.

Regards,

-- 
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net

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