Commit 83bb7410 authored by Dominik Charousset's avatar Dominik Charousset

Fix build on GCC 4.8

parent 9d6f9d16
...@@ -296,6 +296,8 @@ bool engine::run(bool colorize, ...@@ -296,6 +296,8 @@ bool engine::run(bool colorize,
|| (defined(__clang__) && !defined(_LIBCPP_VERSION)) || (defined(__clang__) && !defined(_LIBCPP_VERSION))
// regex implementation is broken prior to 4.9 // regex implementation is broken prior to 4.9
using strvec = std::vector<std::string>; using strvec = std::vector<std::string>;
using whitelist_type = strvec;
using blacklist_type = strvec;
auto from_psv = [](const std::string& psv) -> strvec { auto from_psv = [](const std::string& psv) -> strvec {
// psv == pipe-separated-values // psv == pipe-separated-values
strvec result; strvec result;
...@@ -318,6 +320,8 @@ bool engine::run(bool colorize, ...@@ -318,6 +320,8 @@ bool engine::run(bool colorize,
|| std::binary_search(whitelist.begin(), whitelist.end(), x)); || std::binary_search(whitelist.begin(), whitelist.end(), x));
}; };
# else # else
using whitelist_type = std::regex;
using blacklist_type = std::regex;
std::regex suites{suites_str}; std::regex suites{suites_str};
std::regex tests{tests_str}; std::regex tests{tests_str};
std::regex not_suites; std::regex not_suites;
...@@ -335,8 +339,8 @@ bool engine::run(bool colorize, ...@@ -335,8 +339,8 @@ bool engine::run(bool colorize,
&& !std::regex_search(x, blacklist); && !std::regex_search(x, blacklist);
}; };
# endif # endif
auto test_enabled = [&](const std::regex& whitelist, auto test_enabled = [&](const whitelist_type& whitelist,
const std::regex& blacklist, const blacklist_type& blacklist,
const test& x) { const test& x) {
// Disabled tests run iff explicitly requested by the user, i.e., // Disabled tests run iff explicitly requested by the user, i.e.,
// tests_str is not the ".*" catch-all default. // tests_str is not the ".*" catch-all default.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment