Boost logo

Boost :

From: Justin M. Lewis (boost_at_[hidden])
Date: 2003-05-03 23:21:35


----- Original Message -----
From: "Noel Yap" <Noel.Yap_at_[hidden]>
To: "Boost mailing list" <boost_at_[hidden]>
Sent: Saturday, May 03, 2003 9:20 PM
Subject: Re: [boost] Re: in/out parameters, codingstylesandmaintenance

> "Justin M. Lewis" wrote:
> > I don't know where to find docs for dumb_ptr, but for ref
>
> dumb_ptr<> is something I've made up. You might've missed it the first
> time I suggested it in this thread.
>
> > reference_wrapper(T&);
> >
> > The constructor isn't explicit so you can have implicit type conversions
at
> > the point of invocation, so there's not necessarily any information
given at
> > the point of invocation. Plus there is a cast operator, which, like I
said,
> > I removed from c_out and c_in_out to prevent it from being implicitly
cast
> > into a function call that doesn't take a c_out or c_in_out as a param to
> > prevent confusion.
> >
> > Keep in mind, the point of this is to have the compiler enforce
decorating
> > the params to functions.
>
> Then all you really need is one reference wrapper that does what ref<>
> does without the implicit type casts.
>

It still wouldn't tell you the intended use, unless you're willing to type
template notation all over your code. So, you couldn't use the ref()
function anymore, as well. And, even then, it doesn't differentiate between
out and in_out, and in, if you're using my version of in.

> Noel
> _______________________________________________
> 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