2014-02-13から1日間の記事一覧

Boost.Functional/OverloadedFunction を試してみた

以前から気になっていたんですがやっと試してみました。 OverloadedFunction を使用すれば複数の関数を1つの関数オブジェクトにまとめる事ができます。 [ソース] #include <boost/functional/overloaded_function.hpp> #include <boost/lexical_cast.hpp> #include <string> #include <iostream> std::string to_string(int n){ return boost::lexi</iostream></string></boost/lexical_cast.hpp></boost/functional/overloaded_function.hpp>…