2011-04-21から1日間の記事一覧

MPL Sequence を slice

パッと見なかったので書いてみた。 #include <boost/mpl/vector.hpp> #include <boost/mpl/begin.hpp> #include <boost/mpl/iterator_range.hpp> #include <boost/mpl/int.hpp> #include <boost/mpl/advance.hpp> namespace mpl = boost::mpl; template<typename Seq, typename N, typename M> struct slice : mpl::iterator_range< typenam…</typename></boost/mpl/advance.hpp></boost/mpl/int.hpp></boost/mpl/iterator_range.hpp></boost/mpl/begin.hpp></boost/mpl/vector.hpp>