Boost logo

Boost :

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
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:

  which in turn is an amendment to a portion of a larger treatment of
the topic

Boost list run by bdawes at, gregod at, cpdaniel at, john at