|
Boost Users : |
Subject: Re: [Boost-users] [MultiArray] How to create / handle a collection of multi-array with varying dimensions?
From: joel (joel.falcou_at_[hidden])
Date: 2009-09-28 13:04:42
Oliver Fochler wrote:
> If I was to write the code with fixed N known at compile time (which
> would be sort of ok as a first step), how would I instantiate the
> fusion::vector?
>
> vector< boost::multi_array<int, 3>, boost::multi_array<int,2>,
> boost::multi_array<int,1> > test
>
> wouldn't make that much sense, since it would not be flexible at all.
You cna just make a small meta-function to generate this from a type and
a value of N
make_block<T,N>::type test;
using a simple recursive call to push_back and as_vector
-- ___________________________________________ Joel Falcou - Assistant Professor PARALL Team - LRI - Universite Paris Sud XI Tel : (+33)1 69 15 66 35
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