Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Struct pop_front

boost::proto::functional::pop_front — A PolymorphicFunctionObject type that invokes the fusion::pop_front() algorithm on its argument.

Synopsis

// In header: <boost/proto/functional/fusion/pop_front.hpp>


struct pop_front :  proto::callable {
  // member classes/structs/unions
  template<typename This, typename Seq> 
  struct result<This(Seq)> :  result< This(Seq const &) > {
  };
  template<typename This, typename Seq> 
  struct result<This(Seq &)> :  fusion::result_of::pop_front< Seq > {
  };

  // public member functions
  template<typename Seq> 
    typename fusion::result_of::pop_front< Seq >::type operator()(Seq &) const;
  template<typename Seq> 
    typename fusion::result_of::pop_front< Seq const >::type 
    operator()(Seq const &) const;
};

Description

A PolymorphicFunctionObject type that invokes the fusion::pop_front() algorithm on its argument. This is useful for defining a CallableTransform such as pop_front(_), which removes the first child from a Proto expression node. Such a transform might be used as the first argument to the proto::fold<> transform; that is, fold all but the first child.

pop_front public member functions

  1. template<typename Seq> 
      typename fusion::result_of::pop_front< Seq >::type 
      operator()(Seq & seq) const;

    Returns:

    fusion::pop_front(seq)

  2. template<typename Seq> 
      typename fusion::result_of::pop_front< Seq const >::type 
      operator()(Seq const & seq) const;

    Returns:

    fusion::pop_front(seq)


PrevUpHomeNext