mirror of
https://github.com/boostorg/unordered.git
synced 2025-11-11 21:19:59 +01:00
Inheriting std::iterator is deprecated in c++17.
Therefore get rid of all of that and replace inheritance by lifting std::iterator's members into the derived class. Signed-off-by: Daniela Engert <dani@ngrt.de>
This commit is contained in:
@@ -2099,9 +2099,6 @@ namespace boost {
|
||||
|
||||
template <typename Node>
|
||||
struct l_iterator
|
||||
: public std::iterator<std::forward_iterator_tag,
|
||||
typename Node::value_type, std::ptrdiff_t,
|
||||
typename Node::value_type*, typename Node::value_type&>
|
||||
{
|
||||
#if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS)
|
||||
template <typename Node2>
|
||||
@@ -2116,6 +2113,10 @@ namespace boost {
|
||||
|
||||
public:
|
||||
typedef typename Node::value_type value_type;
|
||||
typedef value_type* pointer;
|
||||
typedef value_type& reference;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef std::forward_iterator_tag iterator_category;
|
||||
|
||||
l_iterator() BOOST_NOEXCEPT : ptr_() {}
|
||||
|
||||
@@ -2158,9 +2159,6 @@ namespace boost {
|
||||
|
||||
template <typename Node>
|
||||
struct cl_iterator
|
||||
: public std::iterator<std::forward_iterator_tag,
|
||||
typename Node::value_type, std::ptrdiff_t,
|
||||
typename Node::value_type const*, typename Node::value_type const&>
|
||||
{
|
||||
friend struct boost::unordered::iterator_detail::l_iterator<Node>;
|
||||
|
||||
@@ -2172,6 +2170,10 @@ namespace boost {
|
||||
|
||||
public:
|
||||
typedef typename Node::value_type value_type;
|
||||
typedef value_type const* pointer;
|
||||
typedef value_type const& reference;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef std::forward_iterator_tag iterator_category;
|
||||
|
||||
cl_iterator() BOOST_NOEXCEPT : ptr_() {}
|
||||
|
||||
@@ -2224,9 +2226,6 @@ namespace boost {
|
||||
|
||||
template <typename Node>
|
||||
struct iterator
|
||||
: public std::iterator<std::forward_iterator_tag,
|
||||
typename Node::value_type, std::ptrdiff_t,
|
||||
typename Node::value_type*, typename Node::value_type&>
|
||||
{
|
||||
#if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS)
|
||||
template <typename>
|
||||
@@ -2240,6 +2239,10 @@ namespace boost {
|
||||
|
||||
public:
|
||||
typedef typename Node::value_type value_type;
|
||||
typedef value_type* pointer;
|
||||
typedef value_type& reference;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef std::forward_iterator_tag iterator_category;
|
||||
|
||||
iterator() BOOST_NOEXCEPT : node_() {}
|
||||
|
||||
@@ -2278,9 +2281,6 @@ namespace boost {
|
||||
|
||||
template <typename Node>
|
||||
struct c_iterator
|
||||
: public std::iterator<std::forward_iterator_tag,
|
||||
typename Node::value_type, std::ptrdiff_t,
|
||||
typename Node::value_type const*, typename Node::value_type const&>
|
||||
{
|
||||
friend struct boost::unordered::iterator_detail::iterator<Node>;
|
||||
|
||||
@@ -2295,6 +2295,10 @@ namespace boost {
|
||||
|
||||
public:
|
||||
typedef typename Node::value_type value_type;
|
||||
typedef value_type const* pointer;
|
||||
typedef value_type const& reference;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef std::forward_iterator_tag iterator_category;
|
||||
|
||||
c_iterator() BOOST_NOEXCEPT : node_() {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user