Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:41:44

0001 
0002 #ifndef BOOST_MPL_SET_AUX_ITEM_HPP_INCLUDED
0003 #define BOOST_MPL_SET_AUX_ITEM_HPP_INCLUDED
0004 
0005 // Copyright Aleksey Gurtovoy 2003-2007
0006 // Copyright David Abrahams 2003-2004
0007 //
0008 // Distributed under the Boost Software License, Version 1.0. 
0009 // (See accompanying file LICENSE_1_0.txt or copy at 
0010 // http://www.boost.org/LICENSE_1_0.txt)
0011 //
0012 // See http://www.boost.org/libs/mpl for documentation.
0013 
0014 // $Id$
0015 // $Date$
0016 // $Revision$
0017 
0018 #include <boost/mpl/long.hpp>
0019 #include <boost/mpl/void.hpp>
0020 #include <boost/mpl/next.hpp>
0021 #include <boost/mpl/prior.hpp>
0022 #include <boost/mpl/set/aux_/set0.hpp>
0023 #include <boost/mpl/aux_/type_wrapper.hpp>
0024 #include <boost/mpl/aux_/config/arrays.hpp>
0025 
0026 namespace boost { namespace mpl {
0027 
0028 template< typename T, typename Base >
0029 struct s_item
0030     : Base
0031 {
0032     typedef s_item<T,Base> item_;
0033     typedef void_       last_masked_;
0034     typedef T           item_type_;
0035     typedef typename Base::item_ base;
0036     typedef s_item type;
0037     
0038     typedef typename next< typename Base::size >::type  size;
0039     typedef typename next< typename Base::order >::type order;
0040 
0041 #if defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES)
0042     typedef typename aux::weighted_tag<BOOST_MPL_AUX_MSVC_VALUE_WKND(order)::value>::type order_tag_;
0043 #else
0044     typedef char (&order_tag_)[BOOST_MPL_AUX_MSVC_VALUE_WKND(order)::value];
0045 #endif
0046 
0047     BOOST_MPL_AUX_SET_OVERLOAD( order_tag_, ORDER_BY_KEY, s_item, aux::type_wrapper<T>* );
0048     BOOST_MPL_AUX_SET_OVERLOAD( aux::no_tag, IS_MASKED, s_item, aux::type_wrapper<T>* );
0049 };
0050 
0051 
0052 template< typename T, typename Base >
0053 struct s_mask
0054     : Base
0055 {
0056     typedef s_mask<T,Base> item_;
0057     typedef T       last_masked_;
0058     typedef void_   item_type_;
0059     typedef typename Base::item_ base;
0060     typedef typename prior< typename Base::size >::type  size;
0061     typedef s_mask type;
0062 
0063     BOOST_MPL_AUX_SET_OVERLOAD( aux::yes_tag, IS_MASKED, s_mask, aux::type_wrapper<T>* );
0064 };
0065 
0066 
0067 template< typename T, typename Base >
0068 struct s_unmask
0069     : Base
0070 {
0071     typedef s_unmask<T,Base> item_;
0072     typedef void_   last_masked_;
0073     typedef T       item_type_;
0074     typedef typename Base::item_ base;
0075     typedef typename next< typename Base::size >::type  size;
0076 
0077     BOOST_MPL_AUX_SET_OVERLOAD( aux::no_tag, IS_MASKED, s_unmask, aux::type_wrapper<T>* );
0078 };
0079 
0080 }}
0081 
0082 #endif // BOOST_MPL_SET_AUX_ITEM_HPP_INCLUDED