1 | /*============================================================================= |
---|---|
2 | Copyright (c) 2001-2011 Joel de Guzman |
3 | |
4 | Distributed under the Boost Software License, Version 1.0. (See accompanying |
5 | file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
6 | ==============================================================================*/ |
7 | #if !defined(FUSION_MPL_ITERATOR_CATEGORY_07212005_0923) |
8 | #define FUSION_MPL_ITERATOR_CATEGORY_07212005_0923 |
9 | |
10 | namespace boost { namespace mpl |
11 | { |
12 | struct forward_iterator_tag; |
13 | struct bidirectional_iterator_tag; |
14 | struct random_access_iterator_tag; |
15 | }} |
16 | |
17 | namespace boost { namespace fusion |
18 | { |
19 | struct forward_traversal_tag; |
20 | struct bidirectional_traversal_tag; |
21 | struct random_access_traversal_tag; |
22 | }} |
23 | |
24 | namespace boost { namespace fusion { namespace detail |
25 | { |
26 | template <typename Category> |
27 | struct mpl_iterator_category; |
28 | |
29 | template <> |
30 | struct mpl_iterator_category<mpl::forward_iterator_tag> |
31 | { |
32 | typedef forward_traversal_tag type; |
33 | }; |
34 | |
35 | template <> |
36 | struct mpl_iterator_category<mpl::bidirectional_iterator_tag> |
37 | { |
38 | typedef bidirectional_traversal_tag type; |
39 | }; |
40 | |
41 | template <> |
42 | struct mpl_iterator_category<mpl::random_access_iterator_tag> |
43 | { |
44 | typedef random_access_traversal_tag type; |
45 | }; |
46 | |
47 | template <> |
48 | struct mpl_iterator_category<forward_traversal_tag> |
49 | { |
50 | typedef forward_traversal_tag type; |
51 | }; |
52 | |
53 | template <> |
54 | struct mpl_iterator_category<bidirectional_traversal_tag> |
55 | { |
56 | typedef bidirectional_traversal_tag type; |
57 | }; |
58 | |
59 | template <> |
60 | struct mpl_iterator_category<random_access_traversal_tag> |
61 | { |
62 | typedef random_access_traversal_tag type; |
63 | }; |
64 | }}} |
65 | |
66 | #endif |
67 |