googletest
googletest copied to clipboard
No deprecated warning on MSVC compiler
No warning is generated when using MSVC compiler for deprecated functions (ex : TYPED_TEST_CASE).
GoogleTest is wrapping the deprecated flag inside GTEST_INTERNAL_DEPRECATED which use __declspec(deprecated) attribute. This is fine but it looks like that MSVC does not report the warning when the call is evaluated in a constexpr way (in this case, inside a static_assert).
See the reported issue on VisualStudio forum. https://developercommunity.visualstudio.com/content/problem/458246/no-deprecated-warning-on-constexpr-evaluation.html
Maybe a workaround could be implemented inside GoogleTest?
@BigSeb Thank you very much for this report. The best way to approach this would be to create a proper PR and submit it for consideration.
@gennadiycivil @BigSeb I just looked at the linked issue and it seems like it's been fixed in Visual Studio. Can this issue be closed?