2008-12-16から1日間の記事一覧

function7-placeholder

C++

前回function6-bind - while( c++ );の続き。 preprocessorを使うのはある程度完成に近づいてからのほうが良さそうなので、先にplaceholderに対応させます。 今日の目標 placeholderを使えるように。 class fuga { public: int func( int, float ) { std::co…

function8-function+bind

C++

前回function7-placeholder - while( c++ );の続き。以前function2 - while( c++ );のサンプルを多少修正したfunctionです。 operator=でcontentの設定 //function.contentが0の場合に投げる例外 class bad_function_call{}; //基本形 template< typename T …