
29 Apr
2006
29 Apr
'06
12:23 a.m.
"Eric Niebler" <eric@boost-consulting.com> wrote in message news:44524BF1.9070801@boost-consulting.com...
Shunsuke Sogame wrote:
Hi gurus,
VC++7.1/8 complains:
error C2355: 'this' : can only be referenced inside non-static member
about:
struct xxx : std::vector<int> { void test() { BOOST_FOREACH(int x, *this) { } } };
GCC compiles. Is this maybe a bug of VC++?
Looks like it. I can't think of a work-around. :-(
What happens if you define test() out of line? Do you still get the error? Joe Gottman