summaryrefslogtreecommitdiff
path: root/boost/phoenix/function/lazy_list.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/phoenix/function/lazy_list.hpp')
-rw-r--r--boost/phoenix/function/lazy_list.hpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/boost/phoenix/function/lazy_list.hpp b/boost/phoenix/function/lazy_list.hpp
index d6cf58000d..184ab8309d 100644
--- a/boost/phoenix/function/lazy_list.hpp
+++ b/boost/phoenix/function/lazy_list.hpp
@@ -388,8 +388,7 @@ void intrusive_ptr_release( const strict_cons<T>* p ) {
}
template <class T>
-class strict_list_iterator
-: public std::iterator<std::input_iterator_tag,T,ptrdiff_t> {
+class strict_list_iterator {
typedef boost::intrusive_ptr<strict_cons<T> > rep_type;
rep_type l;
bool is_nil;
@@ -406,6 +405,12 @@ class strict_list_iterator
const T* operator->() const { return &x; }
};
public:
+ typedef std::input_iterator_tag iterator_category;
+ typedef T value_type;
+ typedef ptrdiff_t difference_type;
+ typedef T* pointer;
+ typedef T& reference;
+
strict_list_iterator() : l(), is_nil(true) {}
explicit strict_list_iterator( const rep_type& ll ) : l(ll), is_nil(!ll) {}
@@ -991,8 +996,7 @@ template <class T, class F> struct ListHelp<T,F,odd_list<T> > {
};
template <class T>
-class list_iterator
-: public std::iterator<std::input_iterator_tag,T,ptrdiff_t> {
+class list_iterator {
list<T> l;
bool is_nil;
void advance() {
@@ -1008,6 +1012,12 @@ class list_iterator
const T* operator->() const { return &x; }
};
public:
+ typedef std::input_iterator_tag iterator_category;
+ typedef T value_type;
+ typedef ptrdiff_t difference_type;
+ typedef T* pointer;
+ typedef T& reference;
+
list_iterator() : l(), is_nil(true) {}
explicit list_iterator( const list<T>& ll ) : l(ll), is_nil(!ll) {}