Boost logo

Boost :

From: tatsu (blza.box_at_[hidden])
Date: 2007-07-03 10:14:38


SourceForge.net wrote:
>
>
> Using BOOST.1.33.1 with Borland C++.
> I've suddenly got a Message Box saying:
> Assertion failed: valid_, file ...boost/token_iterator.hpp, line 52
>
> Line 52 in token_iterator.hpp is: assert(valid_); in void increment(){}.
>
> Could anybody give me a clue as to what might be going on and why it has
> suddenly started happening, please?
>

Probably, you're trying to increment an iterator pointing to end() . Even if
you check (pos != end) and everithing seems ok, it may be caused by passing
a string like "###/#_#" to tokenizer<>. This produces no tokens, that's why
your tokenizer.begin() == tokenizer.end(). If you want to tokenize such
string and get <###> and <#_#> tokens, try following:

string s("###/#_#");
char_separator<char> sep("/");
tokenizer< char_separator<char> > tok(s, sep);

-- 
View this message in context: http://www.nabble.com/-Boost-bugs----boost-Support-Requests-1707948---Assertion-failed-in%09token_iterator.hpp-tf3650733.html#a11247842
Sent from the Boost - Dev mailing list archive at Nabble.com.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk