Re: [multi] Formal Review Begins

Andrzej Krzemienski via Boost <[email protected]>
Newsgroups gmane.comp.lib.boost.devel
Message-ID <CAOenAXiMwKWbQ_FOwN01WPfmL48BvB7kz6Ad3C99Kt09YQ27BA@mail.gmail.com>
wt., 10 mar 2026 o 13:38 Rainer Deyke via Boost <[email protected]>
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;
_______________________________________________
Boost mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://lists.boost.org/mailman3/lists/boost.lists.boost.org/
Archived at: https://lists.boost.org/archives/list/[email protected]/message/M4WZI4BS7AEG5LV4MDEKDU2MUJFNXPGM/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.