diff --git a/luabind/detail/crtp_iterator.hpp b/luabind/detail/crtp_iterator.hpp index 7973ba5f..bcf26893 100644 --- a/luabind/detail/crtp_iterator.hpp +++ b/luabind/detail/crtp_iterator.hpp @@ -1,4 +1,4 @@ -#ifndef LUABIND_CRTP_ITERATOR_HPP_INCLUDED +#ifndef LUABIND_CRTP_ITERATOR_HPP_INCLUDED #define LUABIND_CRTP_ITERATOR_HPP_INCLUDED #include @@ -7,13 +7,16 @@ namespace luabind { namespace detail { template< typename CRTP, typename Category, typename ValueType, typename ReferenceType = ValueType&, typename DifferenceType = ptrdiff_t > - class crtp_iterator : - public std::iterator + class crtp_iterator { public: - using base_type = std::iterator; - + using iterator_category = Category; + using value_type = ValueType; + using difference_type = DifferenceType; + using pointer = ValueType * ; + using reference = ReferenceType; + public: CRTP& operator++() { upcast().increment(); @@ -37,12 +40,12 @@ namespace luabind { return !upcast().equal(rhs); } - typename base_type::reference operator*() + reference operator*() { return upcast().dereference(); } - typename base_type::reference operator->() + reference operator->() { return upcast().dereference(); }