This patch fixed the compiled error which prevent user from deriving from std::iterator when using C++17 compiler.
This commit is contained in:
parent
f996468a6a
commit
eb910ee916
@ -19,8 +19,7 @@ namespace detail {
|
|||||||
struct iterator_value;
|
struct iterator_value;
|
||||||
|
|
||||||
template <typename V>
|
template <typename V>
|
||||||
class iterator_base : public std::iterator<std::forward_iterator_tag, V,
|
class iterator_base {
|
||||||
std::ptrdiff_t, V*, V> {
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
template <typename>
|
template <typename>
|
||||||
@ -37,8 +36,11 @@ class iterator_base : public std::iterator<std::forward_iterator_tag, V,
|
|||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef typename iterator_base::value_type value_type;
|
using iterator_category = std::forward_iterator_tag;
|
||||||
|
using value_type = V;
|
||||||
|
using difference_type = std::ptrdiff_t;
|
||||||
|
using pointer = V * ;
|
||||||
|
using reference = V;
|
||||||
public:
|
public:
|
||||||
iterator_base() : m_iterator(), m_pMemory() {}
|
iterator_base() : m_iterator(), m_pMemory() {}
|
||||||
explicit iterator_base(base_type rhs, shared_memory_holder pMemory)
|
explicit iterator_base(base_type rhs, shared_memory_holder pMemory)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user