Boost logo

Boost :

Subject: Re: [boost] [multi_index] Doc suggestion.
From: Joaquin M Lopez Munoz (joaquin_at_[hidden])
Date: 2014-11-11 17:13:11


Mostafa <mostafa_working_away <at> yahoo.com> writes:

>
> On Tue, 11 Nov 2014 12:30:17 -0800, Joaquin M Lopez Munoz <joaquin
> <at> tid.es>
> wrote:
> >
> > https://github.com/boostorg/multi_index/
> > commit/e18ece1ec13a8050aa5e75a522b8833dc37df37c
> >
> > Does this look any better?
>
> Yes, thanks! I just have two nitpicks:
>
> 1) line 1076: I think the following: "sequenced index iterator's
> value_type is <i>constant</i>" is a little more clear. IMO the previous
> wording gave the impression that only const_iteratorS are available.

Well, "constant iterator" is standardese for precisely what it's meant.
Anyway, changed to make it more clear:

https://github.com/boostorg/multi_index/
commit/f471d61d0b76aba27154a9a738e73271d03ec040

> 2) I'm kind of leery about picking out sequenced_index for special
> treatment since the same thing also applies to all other indices, so why
> isn't the same thing repeated for them also?

For key-based indices there is no need to stress this as the containers
they are inspired on (std::[multi]set and std::unordered_[multi]set)
behave the same (constant iterators). For random access indices, the
initial explanation is that they're modeled after sequenced indices,
so this restriction must be assumed also --besides, by this point
the issue has been mentioned twice and the user is expected to be
familiar enough with the lib (random access indices are not for the
newcomer) that no further explanations on this particular detail should
be needed (IMHO).

Joaquín M López Muñoz
Telefónica


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