27 Jun
2005
27 Jun
'05
12:17 a.m.
"Peter Dimov"
bool parse_numbers(char const* str, vector<double> &v) { return parse(str, real_p[bind<void>(&F,v,_1)] >> *(',' >> real_p[bind<void>(&F,v,_1)]), space_p).full; }
I've no idea what is the exact problem you're having, but one thing's for sure: bind(&F, v, _1) stores a copy of v. I don't think that this is what you want. Use ref(v). You don't need to use <void> with ordinary functions, and the & in front of F isn't needed, too. bind(&vector<double>::push_back, &v, _1) is also possible.
Technically it's undefined behavior to take the address of a standard library [member] function, but you could probably get away with it. -- Dave Abrahams Boost Consulting www.boost-consulting.com