Skip to content

Commit

Permalink
EnumIface: suppress deprecation warning (#540)
Browse files Browse the repository at this point in the history
The EnumIterator inherits from std::iterator, which has
been deprecated in c++17. There is a fix in gz-common6
but it breaks API, so it can't be merged to Garden. So
just suppress the deprecation warning in Garden.

Signed-off-by: Steve Peters <[email protected]>
  • Loading branch information
scpeters authored and Crola1702 committed Apr 25, 2024
1 parent e1a21e0 commit fb9f701
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/gz/common/EnumIface.hh
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ namespace ignition
/// std::cout << "Type++ Name[" << myTypeIface.Str(*i) << "]\n";
/// }
/// \verbatim
GZ_UTILS_WARN_IGNORE__DEPRECATED_DECLARATION
template<typename Enum>
class EnumIterator
: std::iterator<std::bidirectional_iterator_tag, Enum>
Expand Down Expand Up @@ -217,6 +218,7 @@ namespace ignition
/// member value ever used.
private: Enum c;
};
GZ_UTILS_WARN_RESUME__DEPRECATED_DECLARATION

/// \brief Equality operator
/// \param[in] _e1 First iterator
Expand Down

0 comments on commit fb9f701

Please sign in to comment.