
23 Jul
2004
23 Jul
'04
7:08 p.m.
There is a hidden variable in BOOST_FOREACH that tracks this information, but it is scoped, so you can't get at it. (And rightly so; the scoping of hidden control variables is what makes BOOST_FOREACH well-behaved.)
BTW, while we are on topic. Your implementation uses code like this struct any_t {...}; template<typename T> struct static_any_t : any_t {...} template<typename T> static_any_t<T> foo(...); If( any_t const& ref = foo() ) { // here you are using ref } Is it indeed allowed in standard and ref is valid reference to temp? Gennadiy.