Boost logo

Boost :

From: Noel Yap (Noel.Yap_at_[hidden])
Date: 2003-05-04 06:37:26

"Victor A. Wagner, Jr." wrote:
> At Saturday 5/3/2003 10:29 PM, you wrote:
> >Rene Rivera wrote:
> > > But I know of at least one need for "out" parameters:
> > >
> > > An asynchronous call that needs to "return" results. But because it's
> > > asynch it can't return it as the result of the call.
> >
> >Good point. OTOH, can't this be considered an in/out parameter since
> >the caller must own the object being set?
> No. The compiler must be able to tell whether a use before initialized
> condition exists which is one way in which out and in_out are different.

I think I'm missing something here. For example:

  T t;
  f( out( t ) );

How is the compiler enforcing that 'f' is not using any state of t and
is just setting it?


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