How to use std::regex in QtCreator?
the following C++ code line causes a crash (segfault) when debugging in QtCreator:
The following variant crashes as well:
std::basic_string<char> s("^\\s*someText\\s*"); std::regex rg(s);
Is there some special handling which is needed for std::regex?
(P.S. I know about Qt regex classes. Can std::regex be used in Qt?)
Hi, and welcome to the Qt forum! That's not a problem specific to Qt but to your compiler. I guess you run GCC 4.8.x. You'll need at least 4.9.x for regex to work as expected. See also: http://en.cppreference.com/w/cpp/regex
Thank you very much for quick response and solving the problem.