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.

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.

On 2014-07-07 16:59, Bård Skaflestad wrote:
> Worst case, I'll build a debug-mode Boost myself.

There is good support for building with a custom Boost (I do it when I compile with clang, for instance), so I am not sure that is the worst case. :-)

--
        Roland.

_______________________________________________
Opm mailing list
[email protected]
http://www.opm-project.org/mailman/listinfo/opm

Reply via email to