AMDG
Daryl Lilburn wrote:
A colleague has recently discovered a problem using tokenizer
with the output from a std::stringstream class in VC8. If we do
the following, we get an "ITERATOR LIST CORRUPTED" exception
thrown:
I can't reproduce this. The following works with vc8 using
1.33.1, 1.34.1, 1.35, and 1.36. If I pass oss.str directly to
the constructor of strList, I get, _DEBUG_ERROR("string iterators
incompatible");
#include
#include <sstream>
typedef boost::char_separator<char> Separators;
typedef boost::tokenizer<Separators > Tokens;
int main() {
std::string str1("ABC");
std::string str2("DEF");
std::stringstream oss;
oss << str1 << "," << str2;
std::string tempStr(oss.str());
Tokens strList(tempStr, Separators(",|"));
Tokens::const_iterator strIter = strList.begin(); // exception
thrown here
}
What version of boost are you using?
Can you post a complete compilable example of your problem?
In Christ,
Steven Watanabe