From 58c0b9ac59ca847fdb1d9fba5b8f992be17d1b9a Mon Sep 17 00:00:00 2001 From: Won Seong-Yeon Date: Sat, 13 Jul 2019 23:11:39 +0900 Subject: [PATCH] Fixing Syntax Error caused by "Windows.h" (#7) OMG! Windows.h define wack macro...max() min()! --- include/magic_enum.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/magic_enum.hpp b/include/magic_enum.hpp index a4ddd4d..360bf22 100644 --- a/include/magic_enum.hpp +++ b/include/magic_enum.hpp @@ -69,12 +69,12 @@ struct enum_range final { static_assert(MAGIC_ENUM_RANGE_MAX > 0, "MAGIC_ENUM_RANGE_MAX must be greater than 0."); -static_assert(MAGIC_ENUM_RANGE_MAX < std::numeric_limits::max(), +static_assert(MAGIC_ENUM_RANGE_MAX < (std::numeric_limits::max)(), "MAGIC_ENUM_RANGE_MAX must be less than INT_MAX."); static_assert(MAGIC_ENUM_RANGE_MIN <= 0, "MAGIC_ENUM_RANGE_MIN must be less or equals than 0."); -static_assert(MAGIC_ENUM_RANGE_MIN > std::numeric_limits::min(), +static_assert(MAGIC_ENUM_RANGE_MIN > (std::numeric_limits::min)(), "MAGIC_ENUM_RANGE_MIN must be greater than INT_MIN."); namespace detail {