Boost logo

Boost :

From: Michael Fawcett (michael.fawcett_at_[hidden])
Date: 2008-01-11 10:03:40


On Jan 11, 2008 8:40 AM, Douglas Gregor <dgregor_at_[hidden]> wrote:
>
> Besides, it's typical for the primary templates of traits to fall back
> to nested types, which solves the ease-of-use problem for derived
> classes (and for most classes, in fact), while still giving the
> flexibility of traits, e.g.,
>
> template<typename Iter>
> struct iterator_traits {
> typedef typename Iter::iterator_category iterator_category;
> typedef typename Iter::value_type value_type;
> typedef typename Iter::reference reference;
> typedef typename Iter::pointer pointer;
> typedef typename Iter::difference_type difference_type;
> };

That is the approach I have been taking.

Doug, Tobias, Gennadiy, thank you all for this very educational (for
me) discussion. I think I understand all of the deciding factors much
better now.

--Michael Fawcett


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk