...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::compute::function_input_iterator — Iterator which returns the result of a function when dereferenced.
// In header: <boost/compute/iterator/function_input_iterator.hpp> template<typename Function> class function_input_iterator { public: // types typedef unspecified super_type; typedef super_type::reference reference; typedef super_type::difference_type difference_type; typedef Function function; // construct/copy/destruct function_input_iterator(const Function &, size_t = 0); function_input_iterator(const function_input_iterator< Function > &); function_input_iterator< Function > & operator=(const function_input_iterator< Function > &); ~function_input_iterator(); // public member functions size_t get_index() const; template<typename Expr> unspecified operator[](const Expr &) const; // private member functions reference dereference() const; bool equal(const function_input_iterator< Function > &) const; void increment(); void decrement(); void advance(difference_type); difference_type distance_to(const function_input_iterator< Function > &) const; };
For example:
See Also:
make_function_input_iterator()
function_input_iterator
public
construct/copy/destructfunction_input_iterator(const Function & function, size_t index = 0);
function_input_iterator(const function_input_iterator< Function > & other);
function_input_iterator< Function > & operator=(const function_input_iterator< Function > & other);
~function_input_iterator();
function_input_iterator
private member functionsreference dereference() const;
bool equal(const function_input_iterator< Function > & other) const;
void increment();
void decrement();
void advance(difference_type n);
difference_type distance_to(const function_input_iterator< Function > & other) const;