williamr@2: williamr@2: #ifndef BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED williamr@2: #define BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED williamr@2: williamr@2: // Copyright Aleksey Gurtovoy 2000-2004 williamr@2: // williamr@2: // Distributed under the Boost Software License, Version 1.0. williamr@2: // (See accompanying file LICENSE_1_0.txt or copy at williamr@2: // http://www.boost.org/LICENSE_1_0.txt) williamr@2: // williamr@2: // See http://www.boost.org/libs/mpl for documentation. williamr@2: williamr@2: // $Source: /cvsroot/boost/boost/boost/mpl/vector/aux_/item.hpp,v $ williamr@2: // $Date: 2005/05/15 00:39:04 $ williamr@2: // $Revision: 1.8 $ williamr@2: williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: williamr@2: namespace boost { namespace mpl { williamr@2: williamr@2: #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) williamr@2: williamr@2: template< williamr@2: typename T williamr@2: , typename Base williamr@2: , int at_front = 0 williamr@2: > williamr@2: struct v_item williamr@2: : Base williamr@2: { williamr@2: typedef typename Base::upper_bound_ index_; williamr@2: typedef typename next::type upper_bound_; williamr@2: typedef typename next::type size; williamr@2: typedef Base base; williamr@2: typedef v_item type; williamr@2: williamr@2: // agurt 10/sep/04: MWCW <= 9.3 workaround here and below; the compiler williamr@2: // breaks if using declaration comes _before_ the new overload williamr@2: static aux::type_wrapper item_(index_); williamr@2: using Base::item_; williamr@2: }; williamr@2: williamr@2: template< williamr@2: typename T williamr@2: , typename Base williamr@2: > williamr@2: struct v_item williamr@2: : Base williamr@2: { williamr@2: typedef typename prior::type index_; williamr@2: typedef index_ lower_bound_; williamr@2: typedef typename next::type size; williamr@2: typedef Base base; williamr@2: typedef v_item type; williamr@2: williamr@2: static aux::type_wrapper item_(index_); williamr@2: using Base::item_; williamr@2: }; williamr@2: williamr@2: // "erasure" item williamr@2: template< williamr@2: typename Base williamr@2: , int at_front williamr@2: > williamr@2: struct v_mask williamr@2: : Base williamr@2: { williamr@2: typedef typename prior::type index_; williamr@2: typedef index_ upper_bound_; williamr@2: typedef typename prior::type size; williamr@2: typedef Base base; williamr@2: typedef v_mask type; williamr@2: williamr@2: static aux::type_wrapper item_(index_); williamr@2: using Base::item_; williamr@2: }; williamr@2: williamr@2: template< williamr@2: typename Base williamr@2: > williamr@2: struct v_mask williamr@2: : Base williamr@2: { williamr@2: typedef typename Base::lower_bound_ index_; williamr@2: typedef typename next::type lower_bound_; williamr@2: typedef typename prior::type size; williamr@2: typedef Base base; williamr@2: typedef v_mask type; williamr@2: williamr@2: static aux::type_wrapper item_(index_); williamr@2: using Base::item_; williamr@2: }; williamr@2: williamr@2: #endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES williamr@2: williamr@2: }} williamr@2: williamr@2: #endif // BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED