Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2007-10-05 14:31:35

I'm seeing an inexplicable failure in xpressive on HP Tru64. My highly
scientific approach of randomly changing stuff and hoping for the best
hasn't panned out. Is there anybody with this compiler who would like to
help out tracking down this bug: <>?

Just try compiling the following program:

#include <iostream>
#include <boost/xpressive/xpressive.hpp>
using namespace boost;
using namespace xpressive;

int main()
     sregex rex = +_w;
     std::string str("foo bar baz");
     std::string fmt("\\u$&");

     str = regex_replace(str, rex, fmt,

     std::cout << "Expected : Foo Bar Baz" << std::endl;
     std::cout << "Actual : " << str << std::endl;

     return 0;

Based on the test failure, I'm guessing the actual output will be:

Expected : Foo Bar Baz
Actual : FOO BAR BAZ

If that's the case, I'll be asking you to fire up a debugger. I can tell
you exactly where to look, but only you can tell me what you'll find!

Eric Niebler
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at