Boost logo

Boost :

From: Ivan Matek (libbooze_at_[hidden])
Date: 2022-01-01 10:42:08


I don't know much about library development, but with variadic templates
does not seem so hard, although every library development is much harder
than regular user code.

Sure boost::array probably wants to support ancient compilers, but variadic
version could exist only for "modern"(I do not consider >10y old standards
modern) C++.

I found this std:: proposal
http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2013/n3794.html#Ch05
from 9 y ago,
also author seemed to have some working impl on github
https://github.com/CTMacUser/ArrayMD/tree/master/include/boost/container

But I guess none of it ever progressed.

Does anybody knows more about this?
It is not trivial since there are probably a ton of edge cases, typdefs,
semantics(what should size return?, I would say array of dims) to deal
with, but I think it would be a nice extension since I find nested
std::array hideous (with current syntax), e.g.:

std::array<std::array<int,3>, 4> arr;

I would like to have this
boost::array<int,4,3> arr;

P.S. I know I can use Eigen or some other library, but I think if not std
then at least boost should support simple way to have multidim arrays.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk