Boost

Boost.勉強会に参加してきました!

12/12に開催されたBoost.勉強会に参加してきました。 当日は会場も広く、非常にいい環境だったと思います。 ネット接続については、wifiに繋ぐのに乗り遅れて、外向けのセッションを張れなくなってしまったので(ルータの上限数?) N82でテザリングしてつぶ…

boost::bindが返してくるファンクタ

boost::bindが返してくるファンクタの引数を過剰に与えるといらない部分は無視されるらしい(というか過剰に渡しても普通に動く) #include <iostream> #include <string> #include <boost/bind.hpp> struct Functor { typedef void result_type; result_type operator()(std::string message){</boost/bind.hpp></string></iostream>…

decltypeでboost::bindに渡すファンクタの戻り値を指定できないか頑張る(conceptGCC)

boost::bindは、ファンクタを渡した場合に戻り値の推測することができないので、 std::function系を継承してないファンクタを渡す場合は下のようにファンクタの中で戻り値をresult_typeとしてtypedefするか #include <iostream> #include <string> #include <boost/bind.hpp> struct Functor { </boost/bind.hpp></string></iostream>…