From f97b7c66502f84730dfbe7480a181a535878a19f Mon Sep 17 00:00:00 2001 From: Michael Carroll Date: Tue, 1 Nov 2022 11:26:21 -0500 Subject: [PATCH] Suppress MSVC warning that is not applicable (#446) Signed-off-by: Michael Carroll (cherry picked from commit f2775ac00fd76ca46316ac3d1bbdc1cdb9cc00fa) Signed-off-by: Addisu Z. Taddese --- include/gz/physics/FeatureList.hh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/include/gz/physics/FeatureList.hh b/include/gz/physics/FeatureList.hh index 67aa7dcc4..98c8b77bf 100644 --- a/include/gz/physics/FeatureList.hh +++ b/include/gz/physics/FeatureList.hh @@ -22,6 +22,16 @@ #include +#if defined(_MSC_VER) +#pragma warning(push) +/// Suppress warnings about "base-class is already a base-class" +/// Typically, this would indicate a diamond pattern in inheritance, +/// but there are uses in the plugin mechanism recursive templates. +/// The templates have no base classes, so there are no ambiguity +/// concerns, so we can safely suppress the warning here. +#pragma warning(disable: 4584) +#endif // defined(_MSC_VER) + namespace ignition { namespace physics @@ -111,4 +121,7 @@ namespace ignition #include -#endif +#if defined(_MSC_VER) +#pragma warning(pop) +#endif // defined(_MSC_VER) +#endif // GZ_PHYSICS_FEATURELIST_HH_