Boost logo

Boost :

From: Herb Sutter (hsutter_at_[hidden])
Date: 2002-02-21 01:54:06


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


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