|
Boost : |
From: Noel Yap (Noel.Yap_at_[hidden])
Date: 2003-05-04 17:23:16
"Justin M. Lewis" 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);
> >
>
> You're not addressing the purpose of the idea here, just the specifics of an
> example I through together real fast. You can see the point, and the
> proposed useage, how about responding to that, rather than nitpicking?
I think the real point is that functions taking out parameters can be
written to return values and doing so is a better style in C++.
Have you considered that if you didn't have out parameters, your hunting
would be that much easier?
Noel
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk