$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-users] multi_array: once more about a number of dimensions known only at runtime
From: Hicham Mouline (hicham_at_[hidden])
Date: 2010-05-16 05:26:28
Hello,
I have been directed to this discussion:
http://listarchives.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,