Skip to content

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

@acxz

Description

@acxz
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions