Boost logo

Boost :

From: Julien Blanc (julien.blanc_at_[hidden])
Date: 2022-06-02 06:59:36


Le 2022-06-02 08:06, Gavin Lambert via Boost a écrit :
> On 2/06/2022 17:57, Julien Blanc wrote:
>> I've written and released a (rather small) library which allows
>> defining arrays with arbitrary index mechanisms (hence the name,
>> indexed_array). This especially allows indexing with scoped enums, use
>> non zero-starting indexes, or use sparse indexes. This is not a view,
>> but an array in the sense that it owns the data, and provides the same
>> guarantees and functionalities as std::array, such as triviality
>> propagation, being able to reside in read-only program sections, etc.
>
> How does it compare with Boost.MultiIndex?

I need to fill the feature comparison table, thanks for suggesting
including MultiIndex. Unless i'm mistaken, multi-index is intended for
dynamic-sized containers, and for providing different ways of accessing
the same set of elements. It is never trivial, and cannot reside in a
read-only program section (this is an important use case for me,
targetting MCUs running program from flash). Its goal is to provide fast
access via different ways (i see it as an equivalent of database
indexes).

On the other side, indexed_array provides a single indexing mechanism,
guarantees triviality propagation and contiguity of elements.

So, i believe they address different use cases.

Regards,

Julien


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