Boost logo

Boost :

From: Noel Yap (Noel.Yap_at_[hidden])
Date: 2003-05-04 07:10:22

"Justin M. Lewis" wrote:
> > For example:
> >
> > noncopyable object;
> >
> > object.f(); // No copy needed, to operate on the object.
> >
> That's all wonderful, assuming that object internally supports everything
> you want to do to it, which probably isn't the case. And, it's hardly
> reasonable to put members that handle all uses of the object inside the
> object. Ok, so, object.f(), that modifies one thing you're interested in,
> now say I want to modify other members, all at once, say I want to do the
> same thing, from several different places inside my code. Now I need a
> function that needs an out param or an in_out param.

What about:

  dumb_ref< Noncopyable > f();
  Noncopyable& object = f().get();


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