mirror of
https://github.com/mfontanini/libtins
synced 2026-01-23 02:35:57 +01:00
Remove use of deprecated std::iterator (#481)
Co-authored-by: Ed Catmur <edward.catmur@mavensecurities.com>
This commit is contained in:
@@ -40,9 +40,13 @@ namespace Tins {
|
|||||||
* \brief AddressRange iterator class.
|
* \brief AddressRange iterator class.
|
||||||
*/
|
*/
|
||||||
template<typename Address>
|
template<typename Address>
|
||||||
class AddressRangeIterator : public std::iterator<std::forward_iterator_tag, const Address> {
|
class AddressRangeIterator {
|
||||||
public:
|
public:
|
||||||
typedef typename std::iterator<std::forward_iterator_tag, const Address>::value_type value_type;
|
typedef std::forward_iterator_tag iterator_category;
|
||||||
|
typedef const Address value_type;
|
||||||
|
typedef std::ptrdiff_t difference_type;
|
||||||
|
typedef const Address* pointer;
|
||||||
|
typedef const Address& reference;
|
||||||
|
|
||||||
struct end_iterator {
|
struct end_iterator {
|
||||||
|
|
||||||
|
|||||||
@@ -465,8 +465,14 @@ HandlerProxy<T> make_sniffer_handler(T* ptr,
|
|||||||
/**
|
/**
|
||||||
* \brief Iterates over packets sniffed by a BaseSniffer.
|
* \brief Iterates over packets sniffed by a BaseSniffer.
|
||||||
*/
|
*/
|
||||||
class SnifferIterator : public std::iterator<std::forward_iterator_tag, Packet> {
|
class SnifferIterator {
|
||||||
public:
|
public:
|
||||||
|
typedef std::forward_iterator_tag iterator_category;
|
||||||
|
typedef Packet value_type;
|
||||||
|
typedef std::ptrdiff_t difference_type;
|
||||||
|
typedef Packet* pointer;
|
||||||
|
typedef Packet& reference;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a SnifferIterator.
|
* Constructs a SnifferIterator.
|
||||||
* \param sniffer The sniffer to iterate.
|
* \param sniffer The sniffer to iterate.
|
||||||
|
|||||||
Reference in New Issue
Block a user