From: danl_miller (danl_miller_at_[hidden])
Date: 2002-02-21 09:55:48
--- In boost_at_y..., "Herb Sutter" <hsutter_at_a...> wrote:
> 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
> exact type stripped of something -- of references? of const? 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?
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:
which in turn is an amendment to a portion of a larger treatment of
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk