Boost logo

Boost :

From: Valentin Bonnard (Bonnard.V_at_[hidden])
Date: 1999-07-08 18:27:20

scleary_at_[hidden] wrote:

> I don't have many suggestions for container traits, but I would like to see
> an additional iterator trait, denoting whether or not the dereferencing of
> the iterator results in a reference

You mean a lvalue.

> (or constant reference for non-mutable
> iterators).

Mutable forward iterators return a modifiable lvalue, by definition.

> The presence of this trait would allow some (inplace) algorithms (like
> iter_swap) to be more efficient.

I don't see how.

You can already assume that the iterator is modifiable in iter_swap,
it does return a modifiable lvalue.

Could you please explain the kind of optimisations you want
to apply ?

Valentin Bonnard
------------------------------------------------------------------------ home: - Simplifying group communications

Boost list run by bdawes at, gregod at, cpdaniel at, john at