id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 3643,Auto type deduction in 'foreach',akrzemi1@…,Eric Niebler,"I would like to request a new tool in Boost.Foreach that would emulate the following C++0x construct: for( auto const& x : collection ) { ... } It would look something like: BOOST_FOREACH_AUTO( const& x, collection ) {...} To prove it is doable I enclose the following suboptimal implementation as a proof of concept. It was already pointed out that the faster implementation is possible. #define BOOST_FOREACH_AUTO( INIT, CONT ) \ BOOST_FOREACH( \ BOOST_TYPEOF( *boost::begin(CONT) ) INIT, \ CONT \ ) ",Feature Requests,closed,Boost 1.42.0,foreach,Boost 1.41.0,Problem,wontfix,,