[zeromq-dev] std::numeric_limits <size_t> invalid

Steven McCoy steven.mccoy at miru.hk
Tue May 22 04:00:48 CEST 2012


On 21 May 2012 21:54, Steven McCoy <steven.mccoy at miru.hk> wrote:

> Not supported with MSVC, needs an alternative method.  C99 route is an
> alternative:  SIZE_MAX.  I'm sure something old hates that.
>
> https://github.com/zeromq/libzmq/blob/master/src/decoder.cpp#L117
>
>
Yay, usual crap with "windows.hpp" defining max() as a macro.

diff --git a/src/decoder.cpp b/src/decoder.cpp
index 30714da..fa7bc72 100644
--- a/src/decoder.cpp
+++ b/src/decoder.cpp
@@ -23,6 +23,11 @@
 #include <string.h>
 #include <limits>

+#include "platform.hpp"
+#if defined ZMQ_HAVE_WINDOWS
+#include "windows.hpp"
+#endif
+
 #include "decoder.hpp"
 #include "session_base.hpp"
 #include "likely.hpp"

-- 
Steve-o
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120521/fc9f96cf/attachment.htm>


More information about the zeromq-dev mailing list