Boost logo

Boost :

From: Floris van den Berg (flvdberg_at_[hidden])
Date: 2003-05-04 11:24:47


--------------------------------------------------
My Console Museum:
http://home.wxs.nl/~flvdberg
----- Original Message -----
From: "Noel Yap" <Noel.Yap_at_[hidden]>
To: "Boost mailing list" <boost_at_[hidden]>
Sent: Sunday, May 04, 2003 5:49 PM
Subject: Re: [boost] Re: in/out parameters, codingstylesandmaintenance

> Floris van den Berg wrote:
> > I think that c_out is practically the same as c_in_out, only with c_out
the
> > called function doesn't care about the initial value of the passed
> > parameter.
>
> Can we agree, then, that there's no need for c_out?

It can be usefull i guess. If you want to show in your sourcecode that a
function doesn't care about an initial value in your parameter you'd use
c_out, otherwise c_in_out. But it's impossible to enforce such a thing (e.g.
generate a compiler error when the variable IS read), so you would have to
trust the function implementer that it indeed doesn't care about the initial
value and so that it doesn't read it.

Floris


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