diff --git a/firestore/CMakeLists.txt b/firestore/CMakeLists.txt index 4649e4e58b..b3168bee59 100644 --- a/firestore/CMakeLists.txt +++ b/firestore/CMakeLists.txt @@ -347,7 +347,7 @@ add_custom_target( # are guarded by this flag, such as GetUserAgent and function_registry. set(FIREBASE_FIRESTORE_CPP_DEFINES -DINTERNAL_EXPERIMENTAL=1) -if (WIN32 AND NOT ANDROID AND NOT IOS) +if (MSVC AND NOT ANDROID AND NOT IOS) # On Windows, gRPC gives a compiler error in firebase_metadata_provider_desktop.cc # unless _WIN32_WINNT is defined to this value (0x0600, Windows Vista). # Also set -DNOMINMAX for both Firestore and Firestore Core. diff --git a/firestore/src/include/firebase/firestore/field_value.h b/firestore/src/include/firebase/firestore/field_value.h index c29757c010..e66814104e 100644 --- a/firestore/src/include/firebase/firestore/field_value.h +++ b/firestore/src/include/firebase/firestore/field_value.h @@ -348,7 +348,8 @@ class FieldValue final { // Note: Doxygen will run into trouble if this function's definition is // moved outside the class body. static_assert( - std::numeric_limits::max() <= std::numeric_limits::max(), + (std::numeric_limits::max)() <= + (std::numeric_limits::max)(), "The integer type you provided is larger than can fit in an int64_t. " "If you are sure the value will not be truncated, please explicitly " "cast to int64_t before passing it to FieldValue::Increment()."); @@ -377,7 +378,7 @@ class FieldValue final { // Note: Doxygen will run into trouble if this function's definition is // moved outside the class body. static_assert( - std::numeric_limits::max() <= std::numeric_limits::max(), + (std::numeric_limits::max)() <= (std::numeric_limits::max)(), "The floating point type you provided is larger than can fit in a " "double. If you are sure the value will not be truncated, please " "explicitly cast to double before passing it to "