2013-02-05から1日間の記事一覧

Boost.Coroutineのローカル変数の寿命

C++

Boost1.53.0リリースされてましたね。個人的に気になっているのはCoroutine。 pythonのyeildみたいなことが出来るライブラリ。ローカル変数の寿命が気になったのでちょいと調べた。 #include <boost/coroutine/coroutine.hpp> #include <iostream> typedef boost::coroutines::coroutine<int()> coroutine_typ</int()></iostream></boost/coroutine/coroutine.hpp>…