
29 Apr
2006
29 Apr
'06
10:37 a.m.
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) { } } }; HTH, Ganesh