// (C) Copyright Tobias Schwinger // // Use modification and distribution are subject to the boost Software License, // Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). //------------------------------------------------------------------------------ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace ft = boost::function_types; namespace mpl = boost::mpl; using boost::is_same; class C; typedef C (C::* mem_func_ptr)(int); typedef ft::components c; // front BOOST_MPL_ASSERT(( is_same< ::boost::mpl::front::type, C > )); // back BOOST_MPL_ASSERT(( is_same< ::boost::mpl::back::type, int > )); // at BOOST_MPL_ASSERT(( is_same< ::boost::mpl::at_c::type, C > )); BOOST_MPL_ASSERT(( is_same< ::boost::mpl::at_c::type, C & > )); BOOST_MPL_ASSERT(( is_same< ::boost::mpl::at_c::type, int > )); // begin/end BOOST_MPL_ASSERT(( mpl::equal< c, mpl::vector > )); // clear BOOST_MPL_ASSERT(( mpl::equal< mpl::clear, mpl::vector<> > )); // push_front BOOST_MPL_ASSERT(( mpl::equal< mpl::push_front::type, mpl::vector > )); // pop_front BOOST_MPL_ASSERT(( mpl::equal< mpl::pop_front::type, mpl::vector > )); // push_back BOOST_MPL_ASSERT(( mpl::equal< mpl::push_back::type, mpl::vector > )); // pop_back BOOST_MPL_ASSERT(( mpl::equal< mpl::pop_back::type, mpl::vector > )); // size BOOST_MPL_ASSERT_RELATION( ::boost::mpl::size::value, ==, 3 ); // empty BOOST_MPL_ASSERT_NOT(( mpl::empty )); BOOST_MPL_ASSERT(( mpl::empty< mpl::clear > ));