#include #include using namespace boost; struct dummy_input_iterator { typedef std::input_iterator_tag iterator_category; typedef char value_type; typedef size_t difference_type; typedef char * pointer; typedef char & reference; value_type operator*() const { return 42; } dummy_input_iterator & operator++() { return *this; } dummy_input_iterator operator++(int) { return *this; } }; typedef iterator_adaptor< dummy_input_iterator, default_iterator_policies, char, char &, char * > adapted_dummy_iterator; void main() { adapted_dummy_iterator it, end; char c; while (it != end) { c = *it; ++it; } }