Skip to content

Commit

Permalink
Patch json.hpp to compile even if Windows.h header is included before…
Browse files Browse the repository at this point in the history
… that.

Unfortunately Windows.h defines macros for min and max , which is breaking
std::min and std::max on Visual Studio.
  • Loading branch information
maxgolov committed Sep 17, 2019
1 parent 20616fd commit a9c2234
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/include/mat/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ SOFTWARE.
#ifndef NLOHMANN_JSON_HPP
#define NLOHMANN_JSON_HPP

#ifdef _WIN32
#undef max
#undef min
#endif

#include <algorithm> // all_of, copy, fill, find, for_each, none_of, remove, reverse, transform
#include <array> // array
#include <cassert> // assert
Expand Down

0 comments on commit a9c2234

Please sign in to comment.