Skip to content

Commit

Permalink
mingw-gcc doesn't not define min/max in its <Windows.h>, so the prepr…
Browse files Browse the repository at this point in the history
…ocessor check in 'win_compat_test.cpp' needs to be excluded in this case.
  • Loading branch information
helmesjo authored and krzysztof-jusiak committed Dec 19, 2023
1 parent 0f8d85d commit cb4800e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test/ut/win_compat_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@
// ensure no conflict between `Windows.h` and `ut.hpp`
#include <Windows.h>

#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;
Expand Down

0 comments on commit cb4800e

Please sign in to comment.