|
Boost : |
From: scleary_at_[hidden]
Date: 1999-07-08 10:01:14
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 (or constant reference for non-mutable
iterators).
i.e.:
template <class Iterator>
struct iterator_trait_is_reference
{
static const bool is_reference = false;
};
template <class T>
struct iterator_trait_is_reference<T *>
{
static const bool is_reference = true;
};
The presence of this trait would allow some (inplace) algorithms (like
iter_swap) to be more efficient.
-Steve
------------------------------------------------------------------------
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