diff options
author | Vincent Richard <[email protected]> | 2018-04-01 09:29:07 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2018-04-01 09:29:07 +0000 |
commit | 8564b2f8b0d563a2c328a09916e9e4e3def5978f (patch) | |
tree | f7d2a3022b79f4769dcb3a96c4693f981c764842 /cmake/cmake-cxx11/Modules/CheckCXX11Features/cxx11-test-regex.cpp | |
parent | Merge pull request #181 from rusdevops/patch-2 (diff) | |
download | vmime-8564b2f8b0d563a2c328a09916e9e4e3def5978f.tar.gz vmime-8564b2f8b0d563a2c328a09916e9e4e3def5978f.zip |
#193 Dropped support for boot::shared_ptr<>, enabled C++11 support in CMake
Diffstat (limited to 'cmake/cmake-cxx11/Modules/CheckCXX11Features/cxx11-test-regex.cpp')
-rw-r--r-- | cmake/cmake-cxx11/Modules/CheckCXX11Features/cxx11-test-regex.cpp | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/cmake/cmake-cxx11/Modules/CheckCXX11Features/cxx11-test-regex.cpp b/cmake/cmake-cxx11/Modules/CheckCXX11Features/cxx11-test-regex.cpp deleted file mode 100644 index 2fe01c4f..00000000 --- a/cmake/cmake-cxx11/Modules/CheckCXX11Features/cxx11-test-regex.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include <algorithm> -#include <regex> - -int parse_line(std::string const& line) -{ - std::string tmp; - if(std::regex_search(line, std::regex("(\\s)+(-)?(\\d)+//(-)?(\\d)+(\\s)+"))) { - tmp = std::regex_replace(line, std::regex("(-)?(\\d)+//(-)?(\\d)+"), std::string("V")); - } else if(std::regex_search(line, std::regex("(\\s)+(-)?(\\d)+/(-)?(\\d)+(\\s)+"))) { - tmp = std::regex_replace(line, std::regex("(-)?(\\d)+/(-)?(\\d)+"), std::string("V")); - } else if(std::regex_search(line, std::regex("(\\s)+(-)?(\\d)+/(-)?(\\d)+/(-)?(\\d)+(\\s)+"))) { - tmp = std::regex_replace(line, std::regex("(-)?(\\d)+/(-)?(\\d)+/(-)?(\\d)+"), std::string("V")); - } else { - tmp = std::regex_replace(line, std::regex("(-)?(\\d)+"), std::string("V")); - } - return static_cast<int>(std::count(tmp.begin(), tmp.end(), 'V')); -} - -int main() -{ - bool test = (parse_line("f 7/7/7 -3/3/-3 2/-2/2") == 3) && - (parse_line("f 7//7 3//-3 -2//2") == 3) && - (parse_line("f 7/7 3/-3 -2/2") == 3) && - (parse_line("f 7 3 -2") == 3); - return test ? 0 : 1; -} |