2013-02-27から1日間の記事一覧

mpl::equalに渡すところをstd::is_sameにしてしまった

ちょっとハマったのでメモ。 ある日、以下の様なコードを書いてました。 typedef mpl::vector_c<int, 1, 2, 3> foo; typedef mpl::transform<foo, mpl::plus<_1, mpl::int_<1>>>::type bar; typedef mpl::vector_c<int, 2, 3, 4> expected; int main() { BOOST_STATIC_ASSERT(( std::is_same<bar, expected>::value )); } てっきり mpl::t</bar,></int,></foo,></int,>…