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::type type;
};
};
template<class Args> struct tree
{
typedef Args children;
typedef typename bf::result_of::transform::type contents;
template tree( const T0& t0 , const T1& t1 )
: mArgs( /* what to put here ??? */ ) {}
template typename bf::result_of::at_c::type
get() const
{
return bf::at_c<I>(mArgs);
}
contents mArgs;
};
int main()
{
int k=3;
float u=7.2;
tree< bf::vector > 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