make_pair 構造体テンプレート

struct op::make_pair

make_pair は、2 つの引数から std::pair を構築する PolymorphicFunctionObject である。

概要

// ヘッダ:<boost/xpressive/regex_actions.hpp>

struct make_pair {
  // メンバクラス、構造体、共用体
  template<typename Sig>
  struct result {
  };
  template<typename This, typename First, typename Second>
  struct result<This(First, Second)> {
    // 型
    typedef decay< First >::type                 first_type;   // 説明のためにのみ記載。
    typedef decay< Second >::type                second_type;  // 説明のためにのみ記載。
    typedef std::pair< first_type, second_type > type;
  };

  // 公開メンバ関数
  template<typename First, typename Second>
    std::pair< First, Second > operator()(First const &, Second const &) const;
};

説明

make_pair 公開メンバ関数

template<typename First, typename Second>
std::pair<Pair, Second> operator()(First const &first, Second const &second) const
パラメータ
  • first -- 組の第 1 要素。

  • second -- 組の第 2 要素。

戻り値

std::make_pair(first, second)