Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Click here to view the latest version of this page.
PrevUpHomeNext

Struct next

boost::proto::functional::next — A PolymorphicFunctionObject type that invokes the std::next() function on its arguments.

Synopsis

// In header: <boost/proto/functional/std/iterator.hpp>


struct next :  proto::callable {
  // member classes/structs/unions
  template<typename This, typename ForwardIterator> 
  struct result<This(ForwardIterator)> {
    // types
    typedef typename boost::remove_const<
      typename boost::remove_reference<ForwardIterator>::type
    >::type type;
  };
  template<typename This, typename ForwardIterator, typename Distance> 
  struct result<This(ForwardIterator, Distance)> {
    // types
    typedef typename boost::remove_const<
      typename boost::remove_reference<ForwardIterator>::type
    >::type type;
  };

  // public member functions
  template<typename ForwardIterator> void operator()(ForwardIterator) const;
  template<typename ForwardIterator> 
    void operator()(ForwardIterator, 
                    typename std::iterator_traits<ForwardIterator>::difference_type) const;
};

Description

A PolymorphicFunctionObject type that invokes the std::next() function on its arguments.

next public member functions

  1. template<typename ForwardIterator> void operator()(ForwardIterator x) const;

    Returns:

    std::next(x)

  2. template<typename ForwardIterator> 
      void operator()(ForwardIterator x, 
                      typename std::iterator_traits<ForwardIterator>::difference_type n) const;

    Returns:

    std::next(x, n)


PrevUpHomeNext