2011-01-11から1日間の記事一覧

mpl::map に特化した mpl::find_if

特化というか、単に first で判断して、second を返すような処理が欲しかったので書いてみました。 久々にコーディングするので若干怪しい。 #include <boost/static_assert.hpp> #include <boost/type_traits/is_same.hpp> #include <boost/mpl/assert.hpp> #include <boost/mpl/map.hpp> #include <boost/mpl/pair.hpp> #include <boost/mpl/find_if.hpp> #include </boost/mpl/find_if.hpp></boost/mpl/pair.hpp></boost/mpl/map.hpp></boost/mpl/assert.hpp></boost/type_traits/is_same.hpp></boost/static_assert.hpp>