
On Jan 11, 2008 8:40 AM, Douglas Gregor <dgregor@osl.iu.edu> 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