Boost logo

Boost Users :

Subject: [Boost-users] [multiarray] How to make a generic one from an existing C multi-array.
From: Mostafa (mostafa_working_away_at_[hidden])
Date: 2013-11-26 20:17:01


Given the following:

template <typename T, std::size_t D1>
void foo(T (&arr)[D1])
{
   typedef boost::multi_array_ref
   <
     typename boost::remove_all_extents<T>::type,
     boost::rank<T[D1]>::value
> arr_type;

   // ? = ExtentList or extents_tuple.
   arr_type ma(arr, ?);
}

Are there any existing tools to create an ExtentList or extents_tuple obj
 from the type of arr?

Thanks,

Mostafa


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