Skip to content

Commit

Permalink
EnumIface: suppress deprecation warning
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 committed Oct 7, 2023
1 parent 7838ced commit 049eb2d
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 @@ -141,6 +141,7 @@ namespace gz
/// 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 @@ -218,6 +219,7 @@ namespace gz
/// 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 049eb2d

Please sign in to comment.