Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-02-22 08:09:07


----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Friday, February 22, 2002 7:58 AM
Subject: Re: [boost] Re: More on auto

> From: "brianjparker" <brianjparker_at_[hidden]>
> > --- In boost_at_y..., "Peter Dimov" <pdimov_at_m...> wrote:
> > > From: "Fernando Cacciola" <fcacciola_at_g...>
> > > > I don't think that the very small increased complexity of
> > requiring auto
> > > > declarations to have a type name are not worth the increased
> > safety.
> > > > Don't you think it does improves safety a lot?
> > >
> > > No, actually, I don't. Partly because the right time to use auto
> > > declarations is exactly when the actual type doesn't matter, and
> > partly
> > > because I don't see how requiring a dummy identifier would improve
> > safety
> > > somehow.
> >
> > Having the deduced type available is essential for functionality
> > reasons as well as type safety improvements.
>
> It's simple. When the deduced type is important, use a function template.
> Otherwise, use an autodeclaration.

Of course, if we have typeof(), we can discover the identity of any
autodeduced type.


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