2012-03-08から1日間の記事一覧

Boost.Context デストラクタの挙動

C++

継続のコンテキスト内で生成したオブジェクトのデストラクタはどういう挙動をするのか調べました。 まず、デストラクタが呼ばれないno_stack_unwindの場合: #include <iostream> #include <boost/context/all.hpp> #include <boost/function.hpp> class continuation { boost::contexts::context ctx_; boost::fun</boost/function.hpp></boost/context/all.hpp></iostream>…