/* Boost.MultiIndex test for MPL operations. * * Copyright 2003-2008 Joaquin M Lopez Munoz. * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * See http://www.boost.org/libs/multi_index for library home page. */ #include "test_mpl_ops.hpp" #include /* keep it first to prevent nasty warns in MSVC */ #include "pre_multi_index.hpp" #include #include #include #include #include #include using namespace boost::multi_index; void test_mpl_ops() { typedef multi_index_container< int, indexed_by< ordered_unique >, ordered_non_unique > > > indexed_t1; BOOST_STATIC_ASSERT((boost::is_same< boost::mpl::at_c::type, ordered_unique > >::value)); BOOST_STATIC_ASSERT((boost::is_same< boost::mpl::at_c::type, ordered_non_unique > >::value)); typedef boost::mpl::push_front< indexed_t1::index_specifier_type_list, sequenced<> >::type index_list_t; typedef multi_index_container< int, index_list_t > indexed_t2; BOOST_STATIC_ASSERT((boost::is_same< boost::mpl::at_c::type, sequenced<> >::value)); BOOST_STATIC_ASSERT((boost::is_same< boost::mpl::at_c::type, boost::mpl::at_c::type>::value)); BOOST_STATIC_ASSERT((boost::is_same< boost::mpl::at_c::type, boost::mpl::at_c::type>::value)); typedef multi_index_container< int, boost::mpl::list< ordered_unique >, ordered_non_unique > > > indexed_t3; BOOST_STATIC_ASSERT((boost::is_same< boost::mpl::at_c::type, boost::mpl::at_c::type>::value)); BOOST_STATIC_ASSERT((boost::is_same< boost::mpl::at_c::type, boost::mpl::at_c::type>::value)); }