Boost logo

Boost :

From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2002-05-06 21:11:18


Noel Yap wrote:
> I found the following in operators.hpp:
> template <class T, class P, class B =
> ::boost::detail::empty_base>
> struct input_iteratable
> : equality_comparable1<T
> , incrementable<T
> , dereferenceable<T, P, B
> > > > {};
>
>
> It looks like it really should be:
> template <class T, class P, class B =
> ::boost::detail::empty_base>
> struct input_iteratable
> : equality_comparable1<T>
> , incrementable<T>
> , dereferenceable<T, P, B
> > {};

Why do you think so? The current code looks perfectly okay to me. It uses
base class chaining to avoid object size bloat usually associated with
multiple inheritance from several empty base classes - see
http://www.boost.org/libs/utility/operators.htm#chaining. The technique is
used through the whole library, and is well documented.

Aleksey


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