1
0
mirror of https://github.com/google/benchmark.git synced 2025-04-17 23:12:30 +08:00

libstdc++ has a bug in 4.9.0 where their regex assignment doesnt work. Test for this in feature check

This commit is contained in:
Eric Fiselier 2015-03-05 21:34:34 -05:00
parent 2fc65ff973
commit 04f9e8b3da

View File

@ -2,9 +2,9 @@
#include <string>
int main() {
const std::string str = "test0159";
const std::regex re(
"^[a-z]+[0-9]+$",
std::regex_constants::extended | std::regex_constants::nosubs);
std::regex re;
re = std::regex("^[a-z]+[0-9]+$",
std::regex_constants::extended | std::regex_constants::nosubs);
return std::regex_search(str, re) ? 0 : -1;
}