epoc32/include/stdapis/boost/mpl/vector/aux_/item.hpp
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@2
     1
williamr@2
     2
#ifndef BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED
williamr@2
     3
#define BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED
williamr@2
     4
williamr@2
     5
// Copyright Aleksey Gurtovoy 2000-2004
williamr@2
     6
//
williamr@2
     7
// Distributed under the Boost Software License, Version 1.0. 
williamr@2
     8
// (See accompanying file LICENSE_1_0.txt or copy at 
williamr@2
     9
// http://www.boost.org/LICENSE_1_0.txt)
williamr@2
    10
//
williamr@2
    11
// See http://www.boost.org/libs/mpl for documentation.
williamr@2
    12
williamr@2
    13
// $Source: /cvsroot/boost/boost/boost/mpl/vector/aux_/item.hpp,v $
williamr@2
    14
// $Date: 2005/05/15 00:39:04 $
williamr@2
    15
// $Revision: 1.8 $
williamr@2
    16
williamr@2
    17
#include <boost/mpl/long.hpp>
williamr@2
    18
#include <boost/mpl/void.hpp>
williamr@2
    19
#include <boost/mpl/next_prior.hpp>
williamr@2
    20
#include <boost/mpl/aux_/type_wrapper.hpp>
williamr@2
    21
#include <boost/mpl/aux_/config/typeof.hpp>
williamr@2
    22
#include <boost/mpl/aux_/config/ctps.hpp>
williamr@2
    23
williamr@2
    24
namespace boost { namespace mpl {
williamr@2
    25
williamr@2
    26
#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
williamr@2
    27
williamr@2
    28
template< 
williamr@2
    29
      typename T
williamr@2
    30
    , typename Base
williamr@2
    31
    , int at_front = 0
williamr@2
    32
    >
williamr@2
    33
struct v_item
williamr@2
    34
    : Base
williamr@2
    35
{
williamr@2
    36
    typedef typename Base::upper_bound_ index_;
williamr@2
    37
    typedef typename next<index_>::type upper_bound_;
williamr@2
    38
    typedef typename next<typename Base::size>::type size;
williamr@2
    39
    typedef Base base;
williamr@2
    40
    typedef v_item type;
williamr@2
    41
williamr@2
    42
    // agurt 10/sep/04: MWCW <= 9.3 workaround here and below; the compiler
williamr@2
    43
    // breaks if using declaration comes _before_ the new overload
williamr@2
    44
    static aux::type_wrapper<T> item_(index_);
williamr@2
    45
    using Base::item_;
williamr@2
    46
};
williamr@2
    47
williamr@2
    48
template<
williamr@2
    49
      typename T
williamr@2
    50
    , typename Base
williamr@2
    51
    >
williamr@2
    52
struct v_item<T,Base,1>
williamr@2
    53
    : Base
williamr@2
    54
{
williamr@2
    55
    typedef typename prior<typename Base::lower_bound_>::type index_;
williamr@2
    56
    typedef index_ lower_bound_;
williamr@2
    57
    typedef typename next<typename Base::size>::type size;
williamr@2
    58
    typedef Base base;
williamr@2
    59
    typedef v_item type;
williamr@2
    60
williamr@2
    61
    static aux::type_wrapper<T> item_(index_);
williamr@2
    62
    using Base::item_;
williamr@2
    63
};
williamr@2
    64
williamr@2
    65
// "erasure" item
williamr@2
    66
template< 
williamr@2
    67
      typename Base
williamr@2
    68
    , int at_front
williamr@2
    69
    >
williamr@2
    70
struct v_mask
williamr@2
    71
    : Base
williamr@2
    72
{
williamr@2
    73
    typedef typename prior<typename Base::upper_bound_>::type index_;
williamr@2
    74
    typedef index_ upper_bound_;
williamr@2
    75
    typedef typename prior<typename Base::size>::type size;
williamr@2
    76
    typedef Base base;
williamr@2
    77
    typedef v_mask type;
williamr@2
    78
williamr@2
    79
    static aux::type_wrapper<void_> item_(index_);
williamr@2
    80
    using Base::item_;
williamr@2
    81
};
williamr@2
    82
williamr@2
    83
template< 
williamr@2
    84
      typename Base
williamr@2
    85
    >
williamr@2
    86
struct v_mask<Base,1>
williamr@2
    87
    : Base
williamr@2
    88
{
williamr@2
    89
    typedef typename Base::lower_bound_ index_;
williamr@2
    90
    typedef typename next<index_>::type lower_bound_;
williamr@2
    91
    typedef typename prior<typename Base::size>::type size;
williamr@2
    92
    typedef Base base;
williamr@2
    93
    typedef v_mask type;
williamr@2
    94
williamr@2
    95
    static aux::type_wrapper<void_> item_(index_);
williamr@2
    96
    using Base::item_;
williamr@2
    97
};
williamr@2
    98
williamr@2
    99
#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
williamr@2
   100
williamr@2
   101
}}
williamr@2
   102
williamr@2
   103
#endif // BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED