From ffeee51c0e33562fa4a4608b9e5d62eae691331f Mon Sep 17 00:00:00 2001 From: helmesjo Date: Tue, 19 Dec 2023 12:33:44 +0100 Subject: [PATCH] mingw-gcc doesn't not define min/max in its , so the preprocessor check in 'win_compat_test.cpp' needs to be excluded in this case. --- test/ut/win_compat_test.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/ut/win_compat_test.cpp b/test/ut/win_compat_test.cpp index bcecf511..e89b23b1 100644 --- a/test/ut/win_compat_test.cpp +++ b/test/ut/win_compat_test.cpp @@ -9,14 +9,18 @@ // ensure no conflict between `Windows.h` and `ut.hpp` #include -#if not defined(min) || not defined(max) -#error 'min' and 'max' should be defined +#ifndef __MINGW32__ + #if not defined(min) || not defined(max) + #error 'min' and 'max' should be defined + #endif #endif #include "boost/ut.hpp" -#if not defined(min) || not defined(max) -#error 'min' and 'max' should still be defined +#ifndef __MINGW32__ + #if not defined(min) || not defined(max) + #error 'min' and 'max' should still be defined + #endif #endif namespace ut = boost::ut;