This patch fixed the compiled error which prevent user from deriving from std::iterator when using C++17 compiler.

This commit is contained in:
Tanki Zhang 2018-04-04 19:59:34 -05:00
parent f996468a6a
commit eb910ee916

View File

@ -19,8 +19,7 @@ namespace detail {
struct iterator_value;
template <typename V>
class iterator_base : public std::iterator<std::forward_iterator_tag, V,
std::ptrdiff_t, V*, V> {
class iterator_base {
private:
template <typename>
@ -37,8 +36,11 @@ class iterator_base : public std::iterator<std::forward_iterator_tag, V,
};
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:
iterator_base() : m_iterator(), m_pMemory() {}
explicit iterator_base(base_type rhs, shared_memory_holder pMemory)