2 #ifndef BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED
\r
3 #define BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED
\r
5 // Copyright Aleksey Gurtovoy 2000-2004
\r
7 // Distributed under the Boost Software License, Version 1.0.
\r
8 // (See accompanying file LICENSE_1_0.txt or copy at
\r
9 // http://www.boost.org/LICENSE_1_0.txt)
\r
11 // See http://www.boost.org/libs/mpl for documentation.
\r
13 // $Id: item.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
\r
14 // $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
\r
15 // $Revision: 49267 $
\r
17 #include <boost/mpl/long.hpp>
\r
18 #include <boost/mpl/void.hpp>
\r
19 #include <boost/mpl/next_prior.hpp>
\r
20 #include <boost/mpl/aux_/type_wrapper.hpp>
\r
21 #include <boost/mpl/aux_/config/typeof.hpp>
\r
22 #include <boost/mpl/aux_/config/ctps.hpp>
\r
24 namespace boost { namespace mpl {
\r
26 #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
\r
36 typedef typename Base::upper_bound_ index_;
\r
37 typedef typename next<index_>::type upper_bound_;
\r
38 typedef typename next<typename Base::size>::type size;
\r
40 typedef v_item type;
\r
42 // agurt 10/sep/04: MWCW <= 9.3 workaround here and below; the compiler
\r
43 // breaks if using declaration comes _before_ the new overload
\r
44 static aux::type_wrapper<T> item_(index_);
\r
52 struct v_item<T,Base,1>
\r
55 typedef typename prior<typename Base::lower_bound_>::type index_;
\r
56 typedef index_ lower_bound_;
\r
57 typedef typename next<typename Base::size>::type size;
\r
59 typedef v_item type;
\r
61 static aux::type_wrapper<T> item_(index_);
\r
73 typedef typename prior<typename Base::upper_bound_>::type index_;
\r
74 typedef index_ upper_bound_;
\r
75 typedef typename prior<typename Base::size>::type size;
\r
77 typedef v_mask type;
\r
79 static aux::type_wrapper<void_> item_(index_);
\r
86 struct v_mask<Base,1>
\r
89 typedef typename Base::lower_bound_ index_;
\r
90 typedef typename next<index_>::type lower_bound_;
\r
91 typedef typename prior<typename Base::size>::type size;
\r
93 typedef v_mask type;
\r
95 static aux::type_wrapper<void_> item_(index_);
\r
99 #endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
\r
103 #endif // BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED
\r