Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Struct prior

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

Synopsis

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


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

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

Description

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

prior public member functions

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

    Returns:

    std::prior(x)

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

    Returns:

    std::prior(x, n)


PrevUpHomeNext