Guard NOMINMAX to prevent redefinition error (#1581) (#1582)

Fixes #1581.
This commit is contained in:
Andrii Dushko 2023-03-30 21:17:14 +00:00 committed by GitHub
parent f7547e29cc
commit b177433f3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,9 @@
#define BENCHMARK_OS_WINDOWS 1
// WINAPI_FAMILY_PARTITION is defined in winapifamily.h.
// We include windows.h which implicitly includes winapifamily.h for compatibility.
#define NOMINMAX
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h>
#if defined(WINAPI_FAMILY_PARTITION)
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)