COIN-OR::LEMON - Graph Library

Opened 23 months ago

#680 new defect

Fix C++17 compilation warnings regarding the use of the deprecated std::iterator.

Reported by: Roberto Turrado Camblor Owned by: Alpar Juttner
Priority: critical Milestone: LEMON 1.4 release
Component: core Version: hg main
Keywords: C++17, warning, iterator Cc:
Revision id:

Description

Compilations with C++17 or newer raise these warnings:

In file included from /home/rturrado/.conan/data/coin-lemon/1.3.1/_/_/build/647d242d497da836490a4de0e700615d1d33a7d5/src/lemon/color.h:24,

from /home/rturrado/.conan/data/coin-lemon/1.3.1/_/_/build/647d242d497da836490a4de0e700615d1d33a7d5/src/lemon/color.cc:22:

/home/rturrado/.conan/data/coin-lemon/1.3.1/_/_/build/647d242d497da836490a4de0e700615d1d33a7d5/src/lemon/maps.h:1973:21: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]

1973 | : public std::iterator<std::forward_iterator_tag, Value> {

| ~

In file included from /usr/include/c++/12.2.0/bits/stl_algobase.h:65,

from /usr/include/c++/12.2.0/vector:60, from /home/rturrado/.conan/data/coin-lemon/1.3.1/_/_/build/647d242d497da836490a4de0e700615d1d33a7d5/src/lemon/color.h:22:

/usr/include/c++/12.2.0/bits/stl_iterator_base_types.h:127:34: note: declared here

127 | struct _GLIBCXX17_DEPRECATED iterator

| ~

/home/rturrado/.conan/data/coin-lemon/1.3.1/_/_/build/647d242d497da836490a4de0e700615d1d33a7d5/src/lemon/maps.h:3135:21: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]

3135 | : public std::iterator<std::forward_iterator_tag, Value> {

| ~

/usr/include/c++/12.2.0/bits/stl_iterator_base_types.h:127:34: note: declared here

127 | struct _GLIBCXX17_DEPRECATED iterator

| ~

This patch intends to remove those warnings.

Attachments (1)

fix_cpp_17_compilation_warnings.patch (1.8 KB) - added by Roberto Turrado Camblor 23 months ago.
Patch with fix.

Download all attachments as: .zip

Change History (1)

Changed 23 months ago by Roberto Turrado Camblor

Patch with fix.

Note: See TracTickets for help on using tickets.