18 Jun
2002
18 Jun
'02
4:56 a.m.
What follow is the descriptions of a possible bug. Unfortunately I'm using MSVC++ and ran into some unexpected behavior using boost::regex_format and a stringbuf. I compiled 1.27.0 without the /Oa flag as suggested in the installation notes. In summary, this works: stringbuf line; ... string tmp = line.str(); if (regex_match(tmp, matchInfo, linerx)) { string name = regex_format(matchInfo, "$1"); } but this doesn't: stringbuf line; ... if (regex_match(line.str(), matchInfo, linerx)) { string name = regex_format(matchInfo, "$1"); } By "doesn't work" I mean that 'name' has spurious characteres. If this might be a bug, let me know and I'll track it down to a small, compilable example.