source:
vendors/XIOS/current/extern/boost/include/boost/range/detail/iterator.hpp
@
3428
Last change on this file since 3428 was 3428, checked in by rblod, 12 years ago | |
---|---|
File size: 2.0 KB |
Line | |
---|---|
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_DETAIL_ITERATOR_HPP |
12 | #define BOOST_RANGE_DETAIL_ITERATOR_HPP |
13 | |
14 | #include <boost/range/detail/common.hpp> |
15 | #include <boost/range/detail/remove_extent.hpp> |
16 | |
17 | #include <boost/static_assert.hpp> |
18 | |
19 | ////////////////////////////////////////////////////////////////////////////// |
20 | // missing partial specialization workaround. |
21 | ////////////////////////////////////////////////////////////////////////////// |
22 | |
23 | namespace boost |
24 | { |
25 | namespace range_detail |
26 | { |
27 | template< typename T > |
28 | struct range_iterator_ { |
29 | template< typename C > |
30 | struct pts |
31 | { |
32 | typedef int type; |
33 | }; |
34 | }; |
35 | |
36 | template<> |
37 | struct range_iterator_<std_container_> |
38 | { |
39 | template< typename C > |
40 | struct pts |
41 | { |
42 | typedef BOOST_RANGE_DEDUCED_TYPENAME C::iterator type; |
43 | }; |
44 | }; |
45 | |
46 | template<> |
47 | struct range_iterator_<std_pair_> |
48 | { |
49 | template< typename P > |
50 | struct pts |
51 | { |
52 | typedef BOOST_RANGE_DEDUCED_TYPENAME P::first_type type; |
53 | }; |
54 | }; |
55 | |
56 | template<> |
57 | struct range_iterator_<array_> |
58 | { |
59 | template< typename T > |
60 | struct pts |
61 | { |
62 | typedef BOOST_RANGE_DEDUCED_TYPENAME |
63 | remove_extent<T>::type* type; |
64 | }; |
65 | }; |
66 | |
67 | } |
68 | |
69 | template< typename C > |
70 | class range_mutable_iterator |
71 | { |
72 | typedef BOOST_RANGE_DEDUCED_TYPENAME range_detail::range<C>::type c_type; |
73 | public: |
74 | typedef typename range_detail::range_iterator_<c_type>::BOOST_NESTED_TEMPLATE pts<C>::type type; |
75 | }; |
76 | } |
77 | |
78 | #endif |
Note: See TracBrowser
for help on using the repository browser.