STRUCT FIRST(3)

NAME
boost::proto::functional::first - A PolymorphicFunctionObject type that returns the first element of a std::pair<>.

SYNOPSIS

// In header: <boost/proto/functional/utility.hpp>
struct first :  proto::callable {
  // member classes/structs/unions
  template<typename This, typename Pair>
  struct result<This(Pair)> {
    // types
    typedef typename Pair::first_type type;
  };
  template<typename This, typename Pair>
  struct result<This(Pair &)> {
    // types
    typedef typename Pair::first_type & type;
  };
  template<typename This, typename Pair>
  struct result<This(Pair const &)> {
    // types
    typedef typename Pair::first_type const & type;
  };
  // public member functions
  template<typename Pair> typename Pair::first_type & operator()(Pair &) const;
  template<typename Pair>
    typename Pair::first_type const & operator()(Pair const &) const;
};

DESCRIPTION

A PolymorphicFunctionObject type that returns the first element of a std::pair<>.

  first public member functions

    1.

    template<typename Pair>
      typename Pair::first_type & operator()(Pair & pair) const;

    Returns:
        pair.first

    2.

    template<typename Pair>
      typename Pair::first_type const & operator()(Pair const & pair) const;

    Returns:
        pair.first