2010-08-18から1日間の記事一覧

decltypeベースのboost::result_of

C++

Boost 1.44.0で、decltypeベースでのboost::result_ofの実装が入ったので試してみました。 #define BOOST_RESULT_OF_USE_DECLTYPE #include <type_traits> #include <boost/utility/result_of.hpp> struct plus_functor { // typedef int result_type; int operator()(int a, int b) const { return a +</boost/utility/result_of.hpp></type_traits>…