epoc32/include/stdapis/boost/range/const_iterator.hpp
branchSymbian2
changeset 2 2fe1408b6811
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/stdapis/boost/range/const_iterator.hpp	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,127 @@
     1.4 +// Boost.Range library
     1.5 +//
     1.6 +//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
     1.7 +//  distribution is subject to the Boost Software License, Version
     1.8 +//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
     1.9 +//  http://www.boost.org/LICENSE_1_0.txt)
    1.10 +//
    1.11 +// For more information, see http://www.boost.org/libs/range/
    1.12 +//
    1.13 +
    1.14 +#ifndef BOOST_RANGE_CONST_ITERATOR_HPP
    1.15 +#define BOOST_RANGE_CONST_ITERATOR_HPP
    1.16 +
    1.17 +#if defined(_MSC_VER) && (_MSC_VER >= 1200)
    1.18 +# pragma once
    1.19 +#endif
    1.20 +
    1.21 +#include <boost/range/config.hpp>
    1.22 +
    1.23 +#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
    1.24 +#include <boost/range/detail/const_iterator.hpp>
    1.25 +#else
    1.26 +
    1.27 +#include <cstddef>
    1.28 +#include <utility>
    1.29 +
    1.30 +namespace boost
    1.31 +{
    1.32 +    //////////////////////////////////////////////////////////////////////////
    1.33 +    // default
    1.34 +    //////////////////////////////////////////////////////////////////////////
    1.35 +    
    1.36 +    template< typename C >
    1.37 +    struct range_const_iterator
    1.38 +    {
    1.39 +        typedef BOOST_DEDUCED_TYPENAME C::const_iterator type;
    1.40 +    };
    1.41 +    
    1.42 +    //////////////////////////////////////////////////////////////////////////
    1.43 +    // pair
    1.44 +    //////////////////////////////////////////////////////////////////////////
    1.45 +
    1.46 +    template< typename Iterator >
    1.47 +    struct range_const_iterator< std::pair<Iterator,Iterator> >
    1.48 +    {
    1.49 +        typedef Iterator type;
    1.50 +    };
    1.51 +    
    1.52 +    template< typename Iterator >
    1.53 +    struct range_const_iterator< const std::pair<Iterator,Iterator> >
    1.54 +    {
    1.55 +        typedef Iterator type;
    1.56 +    };
    1.57 +
    1.58 +    //////////////////////////////////////////////////////////////////////////
    1.59 +    // array
    1.60 +    //////////////////////////////////////////////////////////////////////////
    1.61 +
    1.62 +    template< typename T, std::size_t sz >
    1.63 +    struct range_const_iterator< T[sz] >
    1.64 +    {
    1.65 +        typedef const T* type;
    1.66 +    };
    1.67 +
    1.68 +    template< typename T, std::size_t sz >
    1.69 +    struct range_const_iterator< const T[sz] >
    1.70 +    {
    1.71 +        typedef const T* type;
    1.72 +    };
    1.73 +
    1.74 +    //////////////////////////////////////////////////////////////////////////
    1.75 +    // string
    1.76 +    //////////////////////////////////////////////////////////////////////////
    1.77 +
    1.78 +    template<>
    1.79 +    struct range_const_iterator< char* >
    1.80 +    {
    1.81 +        typedef const char* type;
    1.82 +    };
    1.83 +
    1.84 +    template<>
    1.85 +    struct range_const_iterator< wchar_t* >
    1.86 +    {
    1.87 +        typedef const wchar_t* type;
    1.88 +    };
    1.89 +
    1.90 +    template<>
    1.91 +    struct range_const_iterator< const char* >
    1.92 +    {
    1.93 +        typedef const char* type;
    1.94 +    };
    1.95 +
    1.96 +    template<>
    1.97 +    struct range_const_iterator< const wchar_t* >
    1.98 +    {
    1.99 +        typedef const wchar_t* type;
   1.100 +    };
   1.101 +
   1.102 +    template<>
   1.103 +    struct range_const_iterator< char* const >
   1.104 +    {
   1.105 +        typedef const char* type;
   1.106 +    };
   1.107 +
   1.108 +    template<>
   1.109 +    struct range_const_iterator< wchar_t* const >
   1.110 +    {
   1.111 +        typedef const wchar_t* type;
   1.112 +    };
   1.113 +
   1.114 +    template<>
   1.115 +    struct range_const_iterator< const char* const >
   1.116 +    {
   1.117 +        typedef const char* type;
   1.118 +    };
   1.119 +
   1.120 +    template<>
   1.121 +    struct range_const_iterator< const wchar_t* const >
   1.122 +    {
   1.123 +        typedef const wchar_t* type;
   1.124 +    };
   1.125 +
   1.126 +} // namespace boost
   1.127 +
   1.128 +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
   1.129 +
   1.130 +#endif