Opened 12 years ago
Closed 12 years ago
#4641 closed Bugs (worksforme)
regex_match return true but match_results contain empty entries
Reported by: | Owned by: | John Maddock | |
---|---|---|---|
Milestone: | To Be Determined | Component: | regex |
Version: | Boost 1.44.0 | Severity: | Showstopper |
Keywords: | Cc: |
Description
Hi, Just found a problem with regex when upgrading to boost 1.44.0. Seems like regex_match can return true and match_results contain the correct number of entries, but they are all empty.
I downloaded and compiled 1.44.0 on Ubuntu 8.04 using gcc 4.1.3 using the following cmd: ./bootstrap.sh --with-libraries=serialization,regex --includedir=/usr/include --libdir=/usr/lib; bjam
Attached is a small testcase extracted from our code base, which gives the following result when compiled and executed:
4 >< >< >< terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::bad_lexical_cast> >'
what(): bad lexical cast: source type value could not be interpreted as target
Aborted
Thanks and regards Jannich
Attachments (1)
Change History (3)
by , 12 years ago
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Works for me - Ubuntu 8.0 and gcc-4.4.1
Only thing I can think of is that you have multiple Boost versions installed on that machine, and you got a mismatch between headers and libraries.
To test this try something like:
g++ -I path-to-boost-tree main.cpp path-to-boost-tree/libs/regex/src/*.cpp ./a.out
HTH, John.
PS please reopen if you can verify this is genuine issue that I can reproduce here.
Forgot to add that this testcase works without problems on Ubuntu 10.04 using gcc 4.4.3 and on RHEL4 using gcc 3.4.6 /Jannich