Boost logo

Boost :

From: Noel Yap (Noel.Yap_at_[hidden])
Date: 2003-05-04 09:47:43


Gregory Colvin wrote:
>
> I don't see the point of providing this
>
> void SetArea(c_out<CShape> s)
> {
> CShape &ls = s.get_ref();
> ls.SetArea(100);
> }
>
> and then writing this
>
> SetArea(out(psq));
>
> instead of just writing this in the first place
>
> psq->SetArea(100);

I think a larger point that should be emphasized is that noone so far
has been able to come up with a function that takes an out parameter
that cannot be rewritten to return a value. IMHO, it makes sense to do
so stylistically.

I can understand some rationale for c_in and c_in_out, but not for
c_out.

Noel


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