~ubuntu-branches/ubuntu/wily/bombono-dvd/wily

« back to all changes in this revision

Viewing changes to libs/boost-lib/boost/range/mutable_iterator.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2010-11-04 11:46:25 UTC
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20101104114625-8xfdhvhpsm51i0nu
Tags: upstream-0.8.0
ImportĀ upstreamĀ versionĀ 0.8.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Boost.Range library
 
2
//
 
3
//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
 
4
//  distribution is subject to the Boost Software License, Version
 
5
//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
 
6
//  http://www.boost.org/LICENSE_1_0.txt)
 
7
//
 
8
// For more information, see http://www.boost.org/libs/range/
 
9
//
 
10
 
 
11
#ifndef BOOST_RANGE_MUTABLE_ITERATOR_HPP
 
12
#define BOOST_RANGE_MUTABLE_ITERATOR_HPP
 
13
 
 
14
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
 
15
# pragma once
 
16
#endif
 
17
 
 
18
#include <boost/range/config.hpp>
 
19
 
 
20
#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
 
21
#include <boost/range/detail/iterator.hpp>
 
22
#else
 
23
 
 
24
#include <boost/range/detail/extract_optional_type.hpp>
 
25
#include <boost/iterator/iterator_traits.hpp>
 
26
#include <cstddef>
 
27
#include <utility>
 
28
 
 
29
namespace boost
 
30
{
 
31
    //////////////////////////////////////////////////////////////////////////
 
32
    // default
 
33
    //////////////////////////////////////////////////////////////////////////
 
34
    
 
35
    namespace range_detail {
 
36
        BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( iterator )
 
37
    }
 
38
 
 
39
    template< typename C >
 
40
    struct range_mutable_iterator : range_detail::extract_iterator<C>
 
41
    {};
 
42
    
 
43
    //////////////////////////////////////////////////////////////////////////
 
44
    // pair
 
45
    //////////////////////////////////////////////////////////////////////////
 
46
 
 
47
    template< typename Iterator >
 
48
    struct range_mutable_iterator< std::pair<Iterator,Iterator> >
 
49
    {
 
50
        typedef Iterator type;
 
51
    };
 
52
 
 
53
    //////////////////////////////////////////////////////////////////////////
 
54
    // array
 
55
    //////////////////////////////////////////////////////////////////////////
 
56
 
 
57
    template< typename T, std::size_t sz >
 
58
    struct range_mutable_iterator< T[sz] >
 
59
    {
 
60
        typedef T* type;
 
61
    };
 
62
 
 
63
} // namespace boost
 
64
 
 
65
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
 
66
 
 
67
#endif