diff --git a/CHANGELOG.md b/CHANGELOG.md index 934ff0844f..8fa369b0e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,9 @@ different versioning scheme, following the Haskell community's * Fixed ambiguous call to `maybe::operator==` that breaks GCC 9 build. ([Pull request #975](https://github.com/microsoft/bond/pull/975)) +* Fixed MSVC warning C4296: "'<': expression is always false" in protocol.h. + ([Issue + #981](https://github.com/microsoft/bond/issues/981)) ## 8.1.0: 2019-03-27 ## diff --git a/cpp/inc/bond/core/protocol.h b/cpp/inc/bond/core/protocol.h index 0a85e64ac8..d605f8dbdb 100644 --- a/cpp/inc/bond/core/protocol.h +++ b/cpp/inc/bond/core/protocol.h @@ -194,11 +194,20 @@ namespace detail { #if !defined(_MSC_VER) || _MSC_VER >= 1900 +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable: 4296) // C4296: '<' : expression is always false +#endif // _MSC_VER + // Avoid std::max due to a bug in Visual C++ 2017. template struct max_of : std::integral_constant {}; +#ifdef _MSC_VER +#pragma warning(pop) +#endif // _MSC_VER + template struct max_size;