OctoMap/octomap

build error: deprecated iterator treated as error gcc 12/cxx17

acxz opened this issue · 0 comments

acxz commented
In file included from /home/acxz/vcs/git/github/acxz/pkgbuilds/octomap/src/octomap-1.9.8/octomap/include/octomap/OcTreeBaseImpl.h:83,
                 from /home/acxz/vcs/git/github/acxz/pkgbuilds/octomap/src/octomap-1.9.8/octomap/include/octomap/OccupancyOcTreeBase.h:44,
                 from /home/acxz/vcs/git/github/acxz/pkgbuilds/octomap/src/octomap-1.9.8/octomap/include/octomap/OcTree.h:38,
                 from /home/acxz/vcs/git/github/acxz/pkgbuilds/octomap/src/octomap-1.9.8/octomap/src/OcTree.cpp:34:
/home/acxz/vcs/git/github/acxz/pkgbuilds/octomap/src/octomap-1.9.8/octomap/include/octomap/OcTreeIterator.hxx:42:39: error: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Werror=deprecated-declarations]
   42 |     class iterator_base : public std::iterator<std::forward_iterator_tag, NodeType>{
      |                                       ^~~~~~~~
In file included from /usr/include/c++/12.1.0/bits/stl_algobase.h:65,
                 from /usr/include/c++/12.1.0/list:60,
                 from /home/acxz/vcs/git/github/acxz/pkgbuilds/octomap/src/octomap-1.9.8/octomap/include/octomap/OccupancyOcTreeBase.h:38:
/usr/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
cc1plus: all warnings being treated as errors

sysinfo:
os: archlinux
comp: gcc 12.1.0
octomap: 1.9.8