googletest icon indicating copy to clipboard operation
googletest copied to clipboard

No deprecated warning on MSVC compiler

Open BigSeb opened this issue 6 years ago • 2 comments
trafficstars

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 avatar Feb 14 '19 22:02 BigSeb

@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 avatar Feb 25 '19 03:02 gennadiycivil

@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?

tobbi avatar May 14 '24 11:05 tobbi