first 構造体テンプレート

struct op::first

first は、組の第 1 要素にアクセスする PolymorphicFunctionObject である。

概要

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

struct first {
  // メンバクラス、構造体、共用体
  template<typename Sig>
  struct result {
  };
  template<typename This, typename Pair>
  struct result<This(Pair)> {
    // 型
    typedef remove_reference< Pair >::type::first_type first::result::type;
  };

  // 公開メンバ関数
  template<typename Pair> Pair::first_type operator()(Pair const &) const;
};

説明

first 公開メンバ関数

template<typename Pair>
Pair::first_type operator()(Pair const &p) const
パラメータ

p -- 第 1 要素にアクセスする対象の組。

戻り値

p.first