2005-06-28から1日間の記事一覧

軽く追記

どうでもいいですが、久々に GCC の拡張文法http://www-cms.phys.s.u-tokyo.ac.jp/~naoki/CIPINTRO/gccextend.htmlを見ていて、なんとなく int main() { goto f; printf("%d\n", ({ int f; f:; f = 0; })); }とか書いてたコードを適当にふくらませて #includ…

ポータブルなコルーチンライブラリ

が書けた! #include <assert.h> #include <boost/preprocessor.hpp> #define GOTOC_CASE_GOTO_(Z, I, DATA) \ case BOOST_PP_ADD(I, 1): \ goto BOOST_PP_CAT(gotoc_label_, BOOST_PP_ADD(I, 1)); #define GOTOC_FUNC(NUM) \ static int gotoc_call_cnt_ = 0; \ switch (gotoc_call_cnt_) { \ </boost/preprocessor.hpp></assert.h>…

なにかあれば下記メールアドレスへ。
shinichiro.hamaji _at_ gmail.com
shinichiro.h