From: Herb Sutter (hsutter_at_[hidden])
Date: 2002-02-21 10:09:50
> From: "Herb Sutter" <hsutter_at_[hidden]>
> > Thanks for all the replies. I'm digesting them.
> > What are the exact semantics of auto?
> auto x = expr;
> // do something with x
> is equivalent to
> template<class X> void do_something_with_x(X x);
Sounds good to me.
New question: It seems that strict typeof would give the same result as the
above. Then what do you need strict typeof for: What contexts can strict
typeof be used in that wouldn't already be covered with this definition of
auto? In particular, this already covers return types and local variables the
same way typeof would.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk