Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 2000-09-06 09:59:11

From: Peter Dimov <pdimov_at_[hidden]>
> > > Unfortunately, due to technical constraints, I had to replace r.f() with
> > > r->f() and added *r as a companion.
> >
> > There is some precedent in existing practice (the
> > original Great Circle smart pointer library) for
> > using an operator() that returns a reference.
> You mean r().f()? Is this better than r->f()? r->f() is iterator-compatible
> syntax, while r().f() is a nullary function object syntax. I'll have to
> think about it.

Is it important that ref<T> be an iterator over one object?

What I don't like about the operator-> and operator* for
this sort of thing is that it is not a pointer, in the
sense that copying a pointer does not create a copy of the
object pointed to. Without an operator. we do what we
must, and I find operator() less distasteful.

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