regex_token_iterator bug?
Dear all,
I just played a little bit with the
regex_token_iterator ( boost v 1.32) and modified the
"html" example.
I found this (strange?) behavior when i "tokenize" a
string.
while (i != j)
{
std::cout << i++->str().length() << std::endl;
}
crashes at runtime at the last sub-match of a match
with:
mtest: ../boost_1_32_0/boost/shared_ptr.hpp:253: T*
boost::shared_ptr<T>::operator->() const [with T =
boost::regex_token_iterator_implementation<__gnu_cxx::__normal_iterator
I just played a little bit with the regex_token_iterator ( boost v 1.32) and modified the "html" example. I found this (strange?) behavior when i "tokenize" a string.
while (i != j) { std::cout << i++->str().length() << std::endl; }
crashes at runtime at the last sub-match of a match with:
Is this behavior a bug, or is it correct, that the first version does not work, if yes, why?
I can't reproduce that, can you provide test case? The assertion will occur if you try to access an end of sequence iterator BTW, but obviously that should not occur with the code snippet you posted. Thanks, John Maddock.
participants (2)
-
John Maddock
-
samantha Quark