以下の内容はhttps://so-wh.at/entry/20081222/p1より取得しました。


bind1st、bind2nd

第一引数は「引数を2つとる関数オブジェクト」。
汎用的でないのはplus、minusとかのヘルパ関数だからかな。

#include <iostream>
#include <functional>

using namespace std;

int count(int m, int n) {
  return m * 2 + n;
}

int main() {
  cout << bind1st(ptr_fun(count), 3)(5) << endl;
  cout << bind2nd(ptr_fun(count), 3)(5) << endl;
}


11
13




以上の内容はhttps://so-wh.at/entry/20081222/p1より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14