Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
MSVC C5046 warning is unavailable in MSVC 2015. #2226
Per the MSVC documentation, the warning is new as of Visual Studio 2017, version 15.8.
GTest users building on MSVC 2015 or older versions of 2017 will, when C4616 is enabled, see a warning like:
[...]gtest-matchers.h(53): error C2220: warning treated as error - no 'object' file generated
Guard the mention of 5046 by an _MSC_VER check. VS2017 15.8 corresponds to an _MSC_VER of 1915.
VS2017 15.7 is not very old (15.7 was released August 2018 and 15.8 was released November 2018), and I believe VS2015 is still covered under Abseil's support guarantees. (BoringSSL have some consumers who sadly still support VS2015, so we have to apply this patch to update googletest.)