➕ using Google Benchmark #921
This commit is contained in:
parent
a8f711a2f1
commit
b406e3704b
53 changed files with 8039 additions and 0 deletions
12
benchmarks/thirdparty/benchmark/cmake/gnu_posix_regex.cpp
vendored
Normal file
12
benchmarks/thirdparty/benchmark/cmake/gnu_posix_regex.cpp
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#include <gnuregex.h>
|
||||
#include <string>
|
||||
int main() {
|
||||
std::string str = "test0159";
|
||||
regex_t re;
|
||||
int ec = regcomp(&re, "^[a-z]+[0-9]+$", REG_EXTENDED | REG_NOSUB);
|
||||
if (ec != 0) {
|
||||
return ec;
|
||||
}
|
||||
return regexec(&re, str.c_str(), 0, nullptr, 0) ? -1 : 0;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue