multi_array: once more about a number of dimensions known only at runtime
16 May
2010
16 May
'10
9:26 a.m.
Hello, I have been directed to this discussion: http://lists.boost.org/boost-users/2009/08/50601.php when I asked this question before. There are interesting solutions from OvermindDL1 and from Jesse Perla. Basically, define a variant over all the possible multi_array types as: template <typename T, std::size_t max_dim > class multi_array_runtime_dims { typedef variant< multi_array<T, 2>, multi_array<T, 3>, ... multi_array<T, max_dim>
type;
}; Setting up the extents can be done at runtime as well. I wonder if there has been further thought about the issue, and also what the library designers thinks about it. Regards,
5241
Age (days ago)
5241
Last active (days ago)
0 comments
1 participants
participants (1)
-
Hicham Mouline