
18 Jul
2006
18 Jul
'06
12:17 p.m.
- is this IMO bad design intentional?
Does vector<T>::iterator throw if it goes past .end() ? no. I think boost simply models after the standard. What I agree it lack is some kind of .count() so you know how much tokens there is, but what you can do to get the info is : if(std::distance(tok.begin(), tok.end()) < 3) { std::cout << "not enough arguments\n"; exit(1); } arg1=*pos++; arg2=*pos++; arg3=*pos++; Philippe