epoc32/include/stdapis/boost/range/const_iterator.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
// Boost.Range library
williamr@2
     2
//
williamr@2
     3
//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
williamr@2
     4
//  distribution is subject to the Boost Software License, Version
williamr@2
     5
//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
williamr@2
     6
//  http://www.boost.org/LICENSE_1_0.txt)
williamr@2
     7
//
williamr@2
     8
// For more information, see http://www.boost.org/libs/range/
williamr@2
     9
//
williamr@2
    10
williamr@2
    11
#ifndef BOOST_RANGE_CONST_ITERATOR_HPP
williamr@2
    12
#define BOOST_RANGE_CONST_ITERATOR_HPP
williamr@2
    13
williamr@2
    14
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
williamr@2
    15
# pragma once
williamr@2
    16
#endif
williamr@2
    17
williamr@2
    18
#include <boost/range/config.hpp>
williamr@2
    19
williamr@2
    20
#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
williamr@2
    21
#include <boost/range/detail/const_iterator.hpp>
williamr@2
    22
#else
williamr@2
    23
williamr@2
    24
#include <cstddef>
williamr@2
    25
#include <utility>
williamr@2
    26
williamr@2
    27
namespace boost
williamr@2
    28
{
williamr@2
    29
    //////////////////////////////////////////////////////////////////////////
williamr@2
    30
    // default
williamr@2
    31
    //////////////////////////////////////////////////////////////////////////
williamr@2
    32
    
williamr@2
    33
    template< typename C >
williamr@2
    34
    struct range_const_iterator
williamr@2
    35
    {
williamr@2
    36
        typedef BOOST_DEDUCED_TYPENAME C::const_iterator type;
williamr@2
    37
    };
williamr@2
    38
    
williamr@2
    39
    //////////////////////////////////////////////////////////////////////////
williamr@2
    40
    // pair
williamr@2
    41
    //////////////////////////////////////////////////////////////////////////
williamr@2
    42
williamr@2
    43
    template< typename Iterator >
williamr@2
    44
    struct range_const_iterator< std::pair<Iterator,Iterator> >
williamr@2
    45
    {
williamr@2
    46
        typedef Iterator type;
williamr@2
    47
    };
williamr@2
    48
    
williamr@2
    49
    template< typename Iterator >
williamr@2
    50
    struct range_const_iterator< const std::pair<Iterator,Iterator> >
williamr@2
    51
    {
williamr@2
    52
        typedef Iterator type;
williamr@2
    53
    };
williamr@2
    54
williamr@2
    55
    //////////////////////////////////////////////////////////////////////////
williamr@2
    56
    // array
williamr@2
    57
    //////////////////////////////////////////////////////////////////////////
williamr@2
    58
williamr@2
    59
    template< typename T, std::size_t sz >
williamr@2
    60
    struct range_const_iterator< T[sz] >
williamr@2
    61
    {
williamr@2
    62
        typedef const T* type;
williamr@2
    63
    };
williamr@2
    64
williamr@2
    65
    template< typename T, std::size_t sz >
williamr@2
    66
    struct range_const_iterator< const T[sz] >
williamr@2
    67
    {
williamr@2
    68
        typedef const T* type;
williamr@2
    69
    };
williamr@2
    70
williamr@2
    71
    //////////////////////////////////////////////////////////////////////////
williamr@2
    72
    // string
williamr@2
    73
    //////////////////////////////////////////////////////////////////////////
williamr@2
    74
williamr@2
    75
    template<>
williamr@2
    76
    struct range_const_iterator< char* >
williamr@2
    77
    {
williamr@2
    78
        typedef const char* type;
williamr@2
    79
    };
williamr@2
    80
williamr@2
    81
    template<>
williamr@2
    82
    struct range_const_iterator< wchar_t* >
williamr@2
    83
    {
williamr@2
    84
        typedef const wchar_t* type;
williamr@2
    85
    };
williamr@2
    86
williamr@2
    87
    template<>
williamr@2
    88
    struct range_const_iterator< const char* >
williamr@2
    89
    {
williamr@2
    90
        typedef const char* type;
williamr@2
    91
    };
williamr@2
    92
williamr@2
    93
    template<>
williamr@2
    94
    struct range_const_iterator< const wchar_t* >
williamr@2
    95
    {
williamr@2
    96
        typedef const wchar_t* type;
williamr@2
    97
    };
williamr@2
    98
williamr@2
    99
    template<>
williamr@2
   100
    struct range_const_iterator< char* const >
williamr@2
   101
    {
williamr@2
   102
        typedef const char* type;
williamr@2
   103
    };
williamr@2
   104
williamr@2
   105
    template<>
williamr@2
   106
    struct range_const_iterator< wchar_t* const >
williamr@2
   107
    {
williamr@2
   108
        typedef const wchar_t* type;
williamr@2
   109
    };
williamr@2
   110
williamr@2
   111
    template<>
williamr@2
   112
    struct range_const_iterator< const char* const >
williamr@2
   113
    {
williamr@2
   114
        typedef const char* type;
williamr@2
   115
    };
williamr@2
   116
williamr@2
   117
    template<>
williamr@2
   118
    struct range_const_iterator< const wchar_t* const >
williamr@2
   119
    {
williamr@2
   120
        typedef const wchar_t* type;
williamr@2
   121
    };
williamr@2
   122
williamr@2
   123
} // namespace boost
williamr@2
   124
williamr@2
   125
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
williamr@2
   126
williamr@2
   127
#endif