Hi, On Tuesday 08 July 2014 09:57:42 Roland Kaufmann wrote: > On 2014-07-07 16:24, Joakim Hove wrote: > > libstdc++ comes in a DEBUG version which is linked in when > > –DGLIBCXX_DEBUG is used. > > On 2014-07-07 16:33, Andreas Lauser wrote: > > as a work-around for newish (>= GCC 4.9 ?) compilers, we could modify > > the build system to check if std::regex is supported and if yes, use > > that. > > On 2014-07-07 17:14, Bård Skaflestad wrote: > > Just for the record, std::regex appears to be available on GCC 4.7 > > too. I don't know how complete that support is, though. > > std::regex is in GCC 4.6.3, too, sort of.
sort of, right ;) We now get a test failure in opm-parser because of this on Arne's machine, which I suspect uses GCC 4.7 (right, Arne?): http://www.opm-project.org/CDash/viewTest.php?onlyfailed&buildid=21857 I.e., I am now looking for a valid regular expression which fails on these oldish compilers... > Note that Boost::regex follows Perl 5 conventions, whereas std::regex > follows ECMAScript conventions, so there are some subtle differences > between them, e.g.: > > #include <iostream> > #include <regex> > #include <boost/regex.hpp> > > int main () { > std::string filename = "foo.*"; > std::string pattern = "foo\\.\\*.*?"; > std::regex std_rgx (pattern); > boost::regex boost_rgx (pattern); > std::cout << "std matches: " << > std::regex_match (filename, std_rgx) << std::endl; > std::cout << "boost matches: " << > boost::regex_match (filename, boost_rgx) << std::endl; > return 0; > } > > which on my setup (Ubuntu 12.04, GCC 4.6.3, Boost 1.46) returns > > std matches: 0 > boost matches: 1 > > (reportedly libc++ also have variations from libstdc++ in std::regex, > but I don't have the Mac running here, so I'm unable to verify that), > implying that there is possibly one more permutation to test. feel free to add more patterns to the test, it's appreciated. Bear in mind though, that the primary purpose of this test is to determine if std::regex is usable for opm-parser and not whether it is feature complete... cheers Andreas -- Notice: "String" and "Thread" are the same thing to non-computing people. — Programming.com
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Opm mailing list [email protected] http://www.opm-project.org/mailman/listinfo/opm
