Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 2002-02-22 13:22:29


From: "danl_miller" <danl_miller_at_[hidden]>
> > Thanks for all the replies. I'm digesting them.
> >
> > What are the exact semantics of auto?
> >
> > It sounds like the deduced type is not always the exact type, but
> rather the
> > exact type stripped of something -- of references? of const? of
> volatile? of
> > something else?
> >
> > What does auto do exactly in the following cases:
> >
> > T& foo();
> > auto x = foo();
> >
> > const T bar();
> > auto y = bar();
> >
> > Is x a reference? Is y const?
> >
> > Herb
>
> This lack of expressivity (i.e., ambiguity) is exactly why I think
> that the focus should not be on auto, but rather 1) on storage-class
> and/or cv-qualifier without simple-type-speicifier or 2) on the
> template-based proposals such as the one Brain J Parker has been
> advocating in a peer posting to this one as well as others by various
> people in the original tree of threads.
>
> Please re-read my re-direction of this
> type-implied-by-initialization topic away from merely auto toward all
> storage-classes & cv-qualifiers as presented in:
>
> http://groups.yahoo.com/group/boost/message/25595
>
> which in turn is an amendment to a portion of a larger treatment of
> the topic
>
> http://groups.yahoo.com/group/boost/message/25567

I'll need to study the examples more carefully, but at first glance
I am convinced. Thanks.


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