From f83d16aa460119d8788ac296612a228b4cebfc34 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 26 Dec 2017 04:29:42 +0100 Subject: [PATCH] Undefine min and max before using them in wx/valnum.h Avoid problems when using this header in code also include (and not doing it via wx/msw/wrapwin.h) by ensuring that min and max used here are not defined as macros. --- include/wx/valnum.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/wx/valnum.h b/include/wx/valnum.h index 166206138d..540f9d6b82 100644 --- a/include/wx/valnum.h +++ b/include/wx/valnum.h @@ -18,6 +18,12 @@ #include "wx/textentry.h" #include "wx/validate.h" +// This header uses std::numeric_limits<>::min/max, but these symbols are, +// unfortunately, often defined as macros and the code here wouldn't compile in +// this case, so preventively undefine them to avoid this problem. +#undef min +#undef max + #include // Bit masks used for numeric validator styles.