Skip to content

Commit

Permalink
Suppress MSVC warning that is not applicable (#446)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Carroll <[email protected]>
  • Loading branch information
mjcarroll authored Nov 1, 2022
1 parent 924e0b4 commit f2775ac
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 gz
{
namespace physics
Expand Down Expand Up @@ -111,4 +121,7 @@ namespace gz

#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 f2775ac

Please sign in to comment.