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 454595b commit 1e1c34b
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 @@ -142,6 +142,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 @@ -219,6 +220,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 1e1c34b

Please sign in to comment.