mfontanini / libtins

High-level, multiplatform C++ network packet sniffing and crafting library.
http://libtins.github.io/
BSD 2-Clause "Simplified" License
1.91k stars 377 forks source link

Usage of std::iterator is deprecated #312

Open echo-Mike opened 6 years ago

echo-Mike commented 6 years ago

The std::iterator class template is depricated (LINK1, LINK2) in C++17 and may be removed from future releases of C++ standard.
Plase remove inheritance from Tins::SnifferIterator at: https://github.com/mfontanini/libtins/blob/3659d89c257676da6e6ddf6298252aecc5756bdb/include/tins/sniffer.h#L452
If You still need types defined by std::iterator then add them by hand in Tins::SnifferIterator class deffinition:

typedef iterator_category std::forward_iterator_tag;
typedef value_type Packet;
typedef difference_type std::ptrdiff_t;
typedef pointer Packet*;
typedef reference Packet&;