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 make_pair

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

Synopsis

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


struct make_pair :  proto::callable {
  // member classes/structs/unions
  template<typename This, typename First, typename Second> 
  struct result<This(First, Second)> {
    // types
    typedef std::pair<
        typename boost::remove_const<typename boost::remove_reference<First>::type>::type
      , typename boost::remove_const<typename boost::remove_reference<Second>::type>::type
    > type;
  };

  // public member functions
  template<typename First, typename Second> 
    typename std::pair< First, Second > 
    operator()(First const &, Second const &) const;
};

Description

A PolymorphicFunctionObject type that invokes std::make_pair() on its arguments.

make_pair public member functions

  1. template<typename First, typename Second> 
      typename std::pair< First, Second > 
      operator()(First const & first, Second const & second) const;

    Returns:

    std::make_pair(first, second)


PrevUpHomeNext