2010-07-27から1日間の記事一覧

戻り値の型をどうにかしたい

C++

boost::bind result type このdecltypeはなんとかならないものか・・・ template <class F> auto foo(F f) -> decltype(boost::bind(f, 3, _1, 5)) { return boost::bind(f, 3, _1, 5); } 同じコードを2回も書きたくないけど、戻り値の型を計算するよりはずっと簡単。</class>…