wt., 10 mar 2026 o 13:38 Rainer Deyke via Boost <boost@lists.boost.org> napisaĆ(a):
On 3/9/26 20:30, Alfredo Correa via Boost wrote:
The proposed library uses an array-of-arrays model.
Multi supports both models array-of-array and flattened view this is prominently mentioned in the documentation, in the Iteration section (
https://correaa.github.io/boost-multi/multi/tutorial.html#tutorial_iteration
)
My bad. I wrote my first message before fully reading the documentation, so I (somehow) missed the elements function.
for(auto indices : a.extensions().elements() ) { apply(a, indices) = get<0>(indices) + 10*get<1>(indices); }
I don't see subarray::extensions()::elements in the documentation at all. In fact, the reference documentation for subarray::extensions() read "returns a tuple with the extensions in each dimension", and std::tuple does not have a elements member function. I see one reference to multi::extensions_t and two references to subarray::extensions_type, neither of which mentions an elements member function. So this one isn't my fault.
This is an important point. Reference documentation is what determines the contract and the API of the library. without it, we don't know what we are reviewing. The contents of the header files cannot be treated as the contract: we do not know which parts are intended to be used by users, which are the implementation details, and which are leftovers from the past incarnations. For instance, there are three ways to provide a "restriction": multi::extensions_t exts {4, 4}; const auto fun = [](int i, int j) { return 10 * i + 100 * j; }; auto A1 = restricted(fun, exts); auto A2 = fun ^ exts; auto A3 = exts ->* fun; Are all three intended? Do the reviewers know about it? Regards, &rzej;