Boost logo

Boost :

From: Noel Yap (Noel.Yap_at_[hidden])
Date: 2003-05-04 17:53:15


"Justin M. Lewis" wrote:
>
> Pull from your experience as a programmer and think, you've certainly
> encountered places where you're passing polymorphics objects around by
> reference or by pointer, calling member functions inside of them that would
> be modifying their internal state. And, while you may not use non-copyable
> objects very often, a large part of what I do at work is dependent on
> non-copyable objects that I'd like to be able to pass to functions to work
> with.

I think many solutions have been given to this as well. Here are some
for those that don't like pointers (again):

  void f( dumb_ref< T const > in_ );
  void f( dumb_ref< T > inOut_ );
  dumb_ref< T > f(); // out

Don't these address the problem of tracking down what functions change
variables that aren't copyable?

Noel


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