Boost logo

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

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.


------------------------------------------------------------------------ home: - Simplifying group communications

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