
29 Apr
2006
29 Apr
'06
12:19 p.m.
Alberto Ganesh Barbati wrote:
Shunsuke Sogame ha scritto:
I note user workaround:
struct xxx : std::vector<int> { void test() { foreach(*this); }
template< class SelfT > void foreach(SelfT& self) { BOOST_FOREACH (int x, self) { } } };
A much simpler workaround that compiles under VC7.1 is:
struct xxx : std::vector<int> { void test() { xxx* This = this;
BOOST_FOREACH(int x, *This) { } } };
Doh! A mysterious reason prevented me from writing even self type... Bug makes bug. :-) Thanks again! -- Shunsuke Sogame