From 3fe4d394a585b89df51ec2eaa6307d33358e527f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Fri, 23 Feb 2018 13:06:52 +0100 Subject: [PATCH] Wrap all uses in min and max in extra parentheses This prevents `min` and `max` macros from windows headers (!@#$) from breaking compilation. Related to #1191 --- include/internal/catch_test_case_registry_impl.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/internal/catch_test_case_registry_impl.hpp b/include/internal/catch_test_case_registry_impl.hpp index 879884d6..43af1887 100644 --- a/include/internal/catch_test_case_registry_impl.hpp +++ b/include/internal/catch_test_case_registry_impl.hpp @@ -27,9 +27,9 @@ namespace Catch { result_type operator()( result_type n ) const { return std::rand() % n; } #ifdef CATCH_CONFIG_CPP11_SHUFFLE - static constexpr result_type min() { return 0; } - static constexpr result_type max() { return 1000000; } - result_type operator()() const { return std::rand() % max(); } + static constexpr result_type (min)() { return 0; } + static constexpr result_type (max)() { return 1000000; } + result_type operator()() const { return std::rand() % (max)(); } #endif template static void shuffle( V& vector ) {