[cpp-sp] 01/06: Windows Build: undef min and max

Rod Widdowson rdw at steadingsoftware.com
Wed Jan 15 16:51:13 UTC 2025


This is an automated email from the git hooks/post-receive script.

rdw pushed a commit to branch main
in repository cpp-sp.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=ebc7bed7497d5fe3b8cc757a55feee5f1ec10dc5

commit ebc7bed7497d5fe3b8cc757a55feee5f1ec10dc5
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Wed Jan 8 14:54:11 2025 +0000

    Windows Build: undef min and max
    
    Windows #defines 'min' and 'max' so we cannot just
    declare methods of that name in Date.h.
---
 shibsp/util/Date.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/shibsp/util/Date.h b/shibsp/util/Date.h
index 3fc1f74f..ee934fe4 100644
--- a/shibsp/util/Date.h
+++ b/shibsp/util/Date.h
@@ -32,6 +32,15 @@
 // been invented (that would involve another several millennia of evolution).
 // We did not mean to shout.
 
+#ifdef min
+#undef min
+#endif
+
+#ifdef max
+#undef max
+#endif
+
+
 #ifndef HAS_STRING_VIEW
 #  if __cplusplus >= 201703 || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)
 #    define HAS_STRING_VIEW 1

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list