2012-12-10から1日間の記事一覧

Boost.Coroutine で乱数のジェネレータ

とりあえず、簡単に。 ジェネレータといいつつ、なんか違うような気がしないでもない。 [ソース] #include <boost/coroutine/coroutine.hpp> #include <boost/coroutine/all.hpp> #include <vector> #include <iostream> #include <random> #include <functional> #include <cstdint> typedef boost::coroutines::coroutine<int()> coroutine_type; void random_generat…</int()></cstdint></functional></random></iostream></vector></boost/coroutine/all.hpp></boost/coroutine/coroutine.hpp>