-public:
- generator_iterator_policies() { }
-
- template<class Base>
- void initialize(Base& base) {
- m_value = (*base)();
- }
-
- // The Iter template argument is necessary for compatibility with a MWCW
- // bug workaround
- template <class IteratorAdaptor>
- void increment(IteratorAdaptor& iter) {
- m_value = (*iter.base())();
+ typedef iterator_facade<
+ generator_iterator<Generator>
+ , typename Generator::result_type
+ , single_pass_traversal_tag
+ , typename Generator::result_type const&
+ > super_t;
+
+ public:
+ generator_iterator() {}
+ generator_iterator(Generator* g) : m_g(g), m_value((*m_g)()) {}
+
+ void increment()
+ {
+ m_value = (*m_g)();