Skip to content

Default OPTION_BUILD_WITH_STD_REGEX to false with gcc < 4.9 #121

Description

@j4yk

According to https://gcc.gnu.org/gcc-4.8/cxx0x_status.html and StackOverflow, gcc 4.8 which is the latest version shipped with Ubuntu Trusty 14.04 LTS does not support the part of C++11. I get compile errors because one of the overloads of std::regex_replace which is used in source/reflectionzeug/source/util.cpp is missing.

I suggest defaulting the above CMake option to false when a gcc below 4.9 is used. 4.9 officially supports regex. https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.2011 http://isocpp.org/blog/2014/04/gcc-4.9.0
That means boost regex will be required to build reflectionzeug with gcc 4.8 but that is better than an out-of-the-box broken build.

Other solutions or suggestions welcome. At the bare minimum this should be documented somewhere so the issue can be easily resolved by hand in the CMake config (only used the GitHub search for the above option and found only ifdef and cmake code, so blame me when it is already documented).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions