2011-08-12から1日間の記事一覧

Boost.Phoenix で再帰処理 その2

アンドキュメントですが、Boost.Phoenix に this_ が用意されていて、こんな事が出来るみたいです。 [ソース] #include <boost/phoenix.hpp> #include <boost/phoenix/scope/this.hpp> #include <iostream> int main(){ namespace phx = boost::phoenix; using phx::arg_names::arg1; phx::if_(arg1 <= 0)[ std::cout << </iostream></boost/phoenix/scope/this.hpp></boost/phoenix.hpp>…