|
Boost Users : |
From: John Maddock (john_maddock_at_[hidden])
Date: 2002-06-18 05:46:23
>
> 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.
Weird, but looks more like a VC bug than a regex one - after all the *only*
difference between the two examples is whether the string passed to
regex_format is a variable or a temporary, so unless I'm missing something
it's got to be a compiler problem?
John.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net