2015-09-06から1日間の記事一覧

boost::bindとboost::functionをメンバ関数に使う

C++

タイトル通り。 boost::bindはメンバ関数を指定すると、第一引数にクラスを引数に取る関数として解釈される。 例 #include <iostream> #include <boost/function.hpp> #include <boost/bind.hpp> struct LinearExtrapolation { LinearExtrapolation( const double leftPoint, const double leftValue, const</boost/bind.hpp></boost/function.hpp></iostream>…