2010-01-08から1日間の記事一覧

user defined tagsを用いたBoost.BimapとBoost.Foreachを組み合わせて使う

どの型をtypedefしてどれをBoost.Foreachに渡せばいいのかよく分からなかったのでメモ. #include <iostream> #include <boost/foreach.hpp> #include <boost/bimap/bimap.hpp> #include <boost/bimap/multiset_of.hpp> using namespace std; struct name {}; struct place {}; int main(int argc, char const* argv[]) { using namespace boost</boost/bimap/multiset_of.hpp></boost/bimap/bimap.hpp></boost/foreach.hpp></iostream>…