2008-01-15から1日間の記事一覧

functionバグ修正

C++

以下のようにfunctionのインスタンスを作成して「何もしない」と落ちるバグを修正しました functionはこちら 再現コード #include <shand/function.hpp> using namespace shand; int main() { function<void()> f; return 0; } 「何もしない」というテストが抜けていた・・・</void()></shand/function.hpp>

mem_fn作ってみた

C++

Boostのソースは見てないのでたぶん使い方が同じだけで内部でやってることは違います サンプル #include <iostream> #include <string> #include <vector> #include <algorithm> #include <shand/mem_fn.hpp> using namespace std; using namespace shand; class person { string name_; public: person(const string</shand/mem_fn.hpp></algorithm></vector></string></iostream>…