Boost logo

Boost :

From: Wyss, Felix (felixw_at_[hidden])
Date: 2002-02-19 00:42:17


What about allowing to qualify "auto" further, such as:

  for( const auto it = v.begin(); it != v.end(); ++it )

If we assume that "auto" corresponds to "typeof( <rhs> )", then the above should fit nicely.

Felix

-----Original Message-----
From: Herb Sutter [mailto:hsutter_at_[hidden]]
Sent: Tuesday, February 19, 2002 00:35
To: boost_at_[hidden]
Subject: RE: [boost] Most needed/desired features in C++

> Or how about allowing
>
> std::vector< ...complex sub-types, ... > v;
> for( v::const_iterator it = v.begin(); it != v.end() ++it)

Wouldn't the "auto" proposal (almost) do that?

  for( auto it = v.begin(); it != v.end(); ++it )

In this case it becomes an iterator, not a const_iterator, though. Is that a
big deal, or is "auto" alone sufficient to cover most of the desired
functionality?

Herb

Info: http://www.boost.org Send unsubscribe requests to: <mailto:boost-unsubscribe_at_[hidden]>

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/


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