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

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Struct top

boost::xpressive::op::top — top is a PolymorphicFunctionObject for fetching the top element of a stack.

Synopsis

// In header: <boost/xpressive/regex_actions.hpp>


struct top {
  // member classes/structs/unions
  template<typename Sig> 
  struct result {
  };
  template<typename This, typename Sequence> 
  struct result<This(Sequence)> {
    // types
    typedef remove_reference< Sequence >::type                                                                                                 sequence_type;
    typedef mpl::if_c< is_const< sequence_type >::value, typenamesequence_type::value_typeconst &, typenamesequence_type::value_type & >::type type;         
  };

  // public member functions
  template<typename Sequence> 
    result< top(Sequence &)>::type operator()(Sequence &) const;
};

Description

top public member functions

  1. template<typename Sequence> 
      result< top(Sequence &)>::type operator()(Sequence & seq) const;

    Parameters:

    seq

    The sequence from which to fetch the top.

    Returns:

    seq.top()


PrevUpHomeNext