Boost logo

Boost :

From: scleary_at_[hidden]
Date: 1999-07-09 13:15:50

Yes, my mistake - I was looking at the Input Iterator requirements for
dereferencing instead of Forward. There is no need for a "reference"
iterator trait.


-----Original Message-----
From: Valentin Bonnard [mailto:Bonnard.V_at_[hidden]]
Sent: Thursday, July 08, 1999 7:27 PM
To: boost_at_[hidden]
Subject: [boost] Re: container traits

scleary_at_[hidden] wrote:

> I don't have many suggestions for container traits, but I would like to
> 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
Just Tell Us What You Want... - Shopping the World for You! home: - Simplifying group communications
------------------------------------------------------------------------ home: - Simplifying group communications

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