Boost logo

Boost :

From: Rozental, Gennadiy (gennadiy.rozental_at_[hidden])
Date: 2004-07-23 14:08:30


> 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.


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