Skip to content

Commit

Permalink
Suppress MSVC warning that is not applicable (#446) (#666)
Browse files Browse the repository at this point in the history
(cherry picked from commit f2775ac)

Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Addisu Z. Taddese <[email protected]>
Co-authored-by: Michael Carroll <[email protected]>
  • Loading branch information
mergify[bot] and mjcarroll authored Jul 16, 2024
1 parent 33bbf42 commit 5101d8b
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion include/gz/physics/FeatureList.hh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@

#include <gz/physics/Feature.hh>

#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
Expand Down Expand Up @@ -111,4 +121,7 @@ namespace ignition

#include <gz/physics/detail/FeatureList.hh>

#endif
#if defined(_MSC_VER)
#pragma warning(pop)
#endif // defined(_MSC_VER)
#endif // GZ_PHYSICS_FEATURELIST_HH_

0 comments on commit 5101d8b

Please sign in to comment.