|
Boost : |
From: Justin M. Lewis (boost_at_[hidden])
Date: 2003-05-03 23:15:45
Yes, now imagine we live in a world where there are non-copyable objects
that you sometimes pass to functions, and tell me how you handle that case
with return values.
Or how about objects where you can't easily optimize away the return.
----- Original Message -----
From: "Gregory Colvin" <gregory.colvin_at_[hidden]>
To: "Boost mailing list" <boost_at_[hidden]>
Sent: Saturday, May 03, 2003 9:13 PM
Subject: Re: [boost] Re: in/out parameters, codingstylesandmaintenance
>
> On Saturday, May 3, 2003, at 21:12 America/Denver, Justin M. Lewis
> wrote:
> > Or, how about,
> > void GetFileName(c_in_out<std::string> path, const std::string &filter)
> > {
> > std::string fname;
> > FindFirstFileWithFilter(out(fname), path, filter);
> > path += "/";
> > path += fname;
> > }
>
> std::string GetFileName(std::string path, const std::string &filter) {
> std::string fname = FindFirstWithFilter(path,filter);
> return path + "/" + fname;
> }
>
> _______________________________________________
> Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk