diff --git a/performance/time_boost.cpp b/performance/time_boost.cpp index 8355eecb..2e7dc24c 100644 --- a/performance/time_boost.cpp +++ b/performance/time_boost.cpp @@ -45,7 +45,7 @@ double time_match(const std::string& re, const std::string& text, bool icase) boost::regex_match(text, what, e); } run = tim.elapsed(); - result = std::min(run, result); + result = (std::min)(run, result); } return result / iter; } @@ -86,7 +86,7 @@ double time_find_all(const std::string& re, const std::string& text, bool icase) boost::regex_grep(&dummy_grep_proc, text, e); } run = tim.elapsed(); - result = std::min(run, result); + result = (std::min)(run, result); } return result / iter; } diff --git a/performance/time_greta.cpp b/performance/time_greta.cpp index 62c902a0..22b1d9f6 100644 --- a/performance/time_greta.cpp +++ b/performance/time_greta.cpp @@ -48,7 +48,7 @@ double time_match(const std::string& re, const std::string& text, bool icase) e.match(text, what); } run = tim.elapsed(); - result = std::min(run, result); + result = (std::min)(run, result); } return result / iter; } @@ -94,7 +94,7 @@ double time_find_all(const std::string& re, const std::string& text, bool icase) } } run = tim.elapsed(); - result = std::min(run, result); + result = (std::min)(run, result); } return result / iter; } diff --git a/performance/time_localised_boost.cpp b/performance/time_localised_boost.cpp index 9729a0bd..33266e2a 100644 --- a/performance/time_localised_boost.cpp +++ b/performance/time_localised_boost.cpp @@ -45,7 +45,7 @@ double time_match(const std::string& re, const std::string& text, bool icase) boost::regex_match(text, what, e); } run = tim.elapsed(); - result = std::min(run, result); + result = (std::min)(run, result); } return result / iter; } @@ -86,7 +86,7 @@ double time_find_all(const std::string& re, const std::string& text, bool icase) boost::regex_grep(&dummy_grep_proc, text, e); } run = tim.elapsed(); - result = std::min(run, result); + result = (std::min)(run, result); } return result / iter; } diff --git a/performance/time_pcre.cpp b/performance/time_pcre.cpp index ea649776..47d6ce8c 100644 --- a/performance/time_pcre.cpp +++ b/performance/time_pcre.cpp @@ -69,7 +69,7 @@ double time_match(const std::string& re, const std::string& text, bool icase) erroffset = pcre_exec(ppcre, pe, text.c_str(), text.size(), 0, 0, what, sizeof(what)/sizeof(int)); } run = tim.elapsed(); - result = std::min(run, result); + result = (std::min)(run, result); } free(ppcre); free(pe); @@ -152,7 +152,7 @@ double time_find_all(const std::string& re, const std::string& text, bool icase) } } run = tim.elapsed(); - result = std::min(run, result); + result = (std::min)(run, result); } return result / iter; } diff --git a/performance/time_posix.cpp b/performance/time_posix.cpp index 6027f180..f5192187 100644 --- a/performance/time_posix.cpp +++ b/performance/time_posix.cpp @@ -50,7 +50,7 @@ double time_match(const std::string& re, const std::string& text, bool icase) regexec(&e, text.c_str(), e.re_nsub, what, 0); } run = tim.elapsed(); - result = std::min(run, result); + result = (std::min)(run, result); } regfree(&e); return result / iter; @@ -116,7 +116,7 @@ double time_find_all(const std::string& re, const std::string& text, bool icase) } } run = tim.elapsed(); - result = std::min(run, result); + result = (std::min)(run, result); } return result / iter; } diff --git a/performance/time_safe_greta.cpp b/performance/time_safe_greta.cpp index 3366db54..c68cfb34 100644 --- a/performance/time_safe_greta.cpp +++ b/performance/time_safe_greta.cpp @@ -49,7 +49,7 @@ double time_match(const std::string& re, const std::string& text, bool icase) e.match(text, what); } run = tim.elapsed(); - result = std::min(run, result); + result = (std::min)(run, result); } return result / iter; } @@ -96,7 +96,7 @@ double time_find_all(const std::string& re, const std::string& text, bool icase) } } run = tim.elapsed(); - result = std::min(run, result); + result = (std::min)(run, result); } return result / iter; } diff --git a/test/unicode/unicode_iterator_test.cpp b/test/unicode/unicode_iterator_test.cpp index 792ae0b2..4ce6ec0c 100644 --- a/test/unicode/unicode_iterator_test.cpp +++ b/test/unicode/unicode_iterator_test.cpp @@ -110,10 +110,7 @@ void test(const std::vector< ::boost::uint32_t>& v) j = i; std::advance(j, (std::min)(v.size(), v32.size())); k = v32.begin(); - BOOST_CHECK_EQUAL_COLLECTIONS( - i, - j, - k); + BOOST_CHECK_EQUAL_COLLECTIONS(v.begin(), v.end(), v32.begin(), v32.end()); // // test backward iteration, of 32-16 bit interconversions: // @@ -133,10 +130,7 @@ void test(const std::vector< ::boost::uint32_t>& v) j = i; std::advance(j, (std::min)(v.size(), v32.size())); k = v32.begin(); - BOOST_CHECK_EQUAL_COLLECTIONS( - i, - j, - k); + BOOST_CHECK_EQUAL_COLLECTIONS(v.begin(), v.end(), v32.begin(), v32.end()); #endif // // Test forward iteration, of 32-8 bit interconversions: @@ -164,10 +158,7 @@ void test(const std::vector< ::boost::uint32_t>& v) j = i; std::advance(j, (std::min)(v.size(), v32.size())); k = v32.begin(); - BOOST_CHECK_EQUAL_COLLECTIONS( - i, - j, - k); + BOOST_CHECK_EQUAL_COLLECTIONS(v.begin(), v.end(), v32.begin(), v32.end()); // // test backward iteration, of 32-8 bit interconversions: // @@ -187,10 +178,7 @@ void test(const std::vector< ::boost::uint32_t>& v) j = i; std::advance(j, (std::min)(v.size(), v32.size())); k = v32.begin(); - BOOST_CHECK_EQUAL_COLLECTIONS( - i, - j, - k); + BOOST_CHECK_EQUAL_COLLECTIONS(v.begin(), v.end(), v32.begin(), v32.end()); #endif }