1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/stdapis/boost/mpl/vector/aux_/item.hpp Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,103 @@
1.4 +
1.5 +#ifndef BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED
1.6 +#define BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED
1.7 +
1.8 +// Copyright Aleksey Gurtovoy 2000-2004
1.9 +//
1.10 +// Distributed under the Boost Software License, Version 1.0.
1.11 +// (See accompanying file LICENSE_1_0.txt or copy at
1.12 +// http://www.boost.org/LICENSE_1_0.txt)
1.13 +//
1.14 +// See http://www.boost.org/libs/mpl for documentation.
1.15 +
1.16 +// $Source: /cvsroot/boost/boost/boost/mpl/vector/aux_/item.hpp,v $
1.17 +// $Date: 2005/05/15 00:39:04 $
1.18 +// $Revision: 1.8 $
1.19 +
1.20 +#include <boost/mpl/long.hpp>
1.21 +#include <boost/mpl/void.hpp>
1.22 +#include <boost/mpl/next_prior.hpp>
1.23 +#include <boost/mpl/aux_/type_wrapper.hpp>
1.24 +#include <boost/mpl/aux_/config/typeof.hpp>
1.25 +#include <boost/mpl/aux_/config/ctps.hpp>
1.26 +
1.27 +namespace boost { namespace mpl {
1.28 +
1.29 +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
1.30 +
1.31 +template<
1.32 + typename T
1.33 + , typename Base
1.34 + , int at_front = 0
1.35 + >
1.36 +struct v_item
1.37 + : Base
1.38 +{
1.39 + typedef typename Base::upper_bound_ index_;
1.40 + typedef typename next<index_>::type upper_bound_;
1.41 + typedef typename next<typename Base::size>::type size;
1.42 + typedef Base base;
1.43 + typedef v_item type;
1.44 +
1.45 + // agurt 10/sep/04: MWCW <= 9.3 workaround here and below; the compiler
1.46 + // breaks if using declaration comes _before_ the new overload
1.47 + static aux::type_wrapper<T> item_(index_);
1.48 + using Base::item_;
1.49 +};
1.50 +
1.51 +template<
1.52 + typename T
1.53 + , typename Base
1.54 + >
1.55 +struct v_item<T,Base,1>
1.56 + : Base
1.57 +{
1.58 + typedef typename prior<typename Base::lower_bound_>::type index_;
1.59 + typedef index_ lower_bound_;
1.60 + typedef typename next<typename Base::size>::type size;
1.61 + typedef Base base;
1.62 + typedef v_item type;
1.63 +
1.64 + static aux::type_wrapper<T> item_(index_);
1.65 + using Base::item_;
1.66 +};
1.67 +
1.68 +// "erasure" item
1.69 +template<
1.70 + typename Base
1.71 + , int at_front
1.72 + >
1.73 +struct v_mask
1.74 + : Base
1.75 +{
1.76 + typedef typename prior<typename Base::upper_bound_>::type index_;
1.77 + typedef index_ upper_bound_;
1.78 + typedef typename prior<typename Base::size>::type size;
1.79 + typedef Base base;
1.80 + typedef v_mask type;
1.81 +
1.82 + static aux::type_wrapper<void_> item_(index_);
1.83 + using Base::item_;
1.84 +};
1.85 +
1.86 +template<
1.87 + typename Base
1.88 + >
1.89 +struct v_mask<Base,1>
1.90 + : Base
1.91 +{
1.92 + typedef typename Base::lower_bound_ index_;
1.93 + typedef typename next<index_>::type lower_bound_;
1.94 + typedef typename prior<typename Base::size>::type size;
1.95 + typedef Base base;
1.96 + typedef v_mask type;
1.97 +
1.98 + static aux::type_wrapper<void_> item_(index_);
1.99 + using Base::item_;
1.100 +};
1.101 +
1.102 +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
1.103 +
1.104 +}}
1.105 +
1.106 +#endif // BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED