2010-11-15から1日間の記事一覧

boost::fusion::map

C++

boost::fusion::mapは、各要素に名前の付いたタプル(named tuple)として扱えます。 型に対して、対応する要素を割り当てます。 #include <boost/assert.hpp> #include <boost/fusion/include/map.hpp> #include <boost/fusion/include/at_key.hpp> namespace fusion = boost::fusion; struct x {}; struct y {}; struct z {}; typedef fusion::m</boost/fusion/include/at_key.hpp></boost/fusion/include/map.hpp></boost/assert.hpp>…