If <windows.h> is included then max is a macro that clashes
with std::numeric_limits::max, hence undefine it.
For some reason the struct access_record is not recognizes
outside the anonymouse namespace, make it a class.
The patch successfully was tested on AppVeyor.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
using std::setw;
#endif
+/* If <windows.h> is included this is defined and clashes with
+ * std::numeric_limits<>::max()
+ */
+#ifdef max
+#undef max
+#endif
+
using std::numeric_limits;
/* Without c++11 define the nullptr for forward-compatibility
/* Helper class for sorting and searching the registers based
* on life times. */
-struct access_record {
+class access_record {
+public:
int begin;
int end;
int reg;