おまえは、今までを書いた boost::is_same の数を覚えているか?

mpl::same_as なんてあったんですね、知りませんでした。

#include <boost/mpl/same_as.hpp>
#include <boost/mpl/vector.hpp>
#include <boost/mpl/count_if.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/mpl/apply.hpp>
#include <boost/mpl/equal_to.hpp>

namespace mpl = boost::mpl;

BOOST_MPL_ASSERT(( mpl::equal_to<
    mpl::apply<mpl::same_as<int>, int>::type,
    mpl::apply<boost::is_same<int, mpl::_1>, int>::type
> ));

BOOST_MPL_ASSERT(( mpl::equal_to<
    mpl::count_if<mpl::vector<int, int, int>, mpl::same_as<int> >,
    mpl::int_<3>
> ));

int
main(){
    return 0;
}

中身は boost::is_same の apply が書かれているだけです。
ってか、ドキュメントに書いてくれー。


[boost]
ver 1.46.1
[参照]
http://www.boost.org/doc/libs/1_46_1/boost/mpl/same_as.hpp