|
Boost Users : |
From: Joel FALCOU (joel.falcou_at_[hidden])
Date: 2008-07-19 16:08:29
I started porting over some old codes that used hand-made MPL<->concrete
object code to Fusion.
I'm currently trying to have the following to work with no results so far :
struct make_arg
{
template<class Type> struct result
{
typedef typename boost::add_reference<typename
boost::add_const<Type>::type >::type type;
};
};
template<class Args> struct tree
{
typedef Args children;
typedef typename bf::result_of::transform<Args,make_arg>::type contents;
template<class T0,class T1> tree( const T0& t0 , const T1& t1 )
: mArgs( /* what to put here ??? */ ) {}
template<size_t I> typename bf::result_of::at_c<contents,I>::type
get() const
{
return bf::at_c<I>(mArgs);
}
contents mArgs;
};
int main()
{
int k=3;
float u=7.2;
tree< bf::vector<int, float> > tree(k,u);
return 0;
}
The question - as stated - in the code is how to simply build the mArgs
member from the t0,...,tn arguments ?
Thanks in advance.
-- Joel FALCOU Research Engineer @ Institut d'Electronique Fondamentale Université PARIS SUD XI France
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