|
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.
-Steve
-----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
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 ------------------------------------------------------------------------ Just Tell Us What You Want... Respond.com - Shopping the World for You! http://clickhere.egroups.com/click/390 eGroups.com home: http://www.egroups.com/group/boost http://www.egroups.com - Simplifying group communications ------------------------------------------------------------------------ eGroups.com home: http://www.egroups.com/group/boost http://www.egroups.com - Simplifying group communications
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk