source: NonGTP/Boost/boost/spirit/fusion/iterator/detail/type_sequence_iterator/next_traits.hpp @ 857

Revision 857, 1.7 KB checked in by igarcia, 19 years ago (diff)
RevLine 
[857]1/*=============================================================================
2    Copyright (c) 2003 Joel de Guzman
3    Copyright (c) 2004 Peder Holt
4
5    Use, modification and distribution is subject to the Boost Software
6    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7    http://www.boost.org/LICENSE_1_0.txt)
8==============================================================================*/
9#if !defined(FUSION_ITERATOR_DETAIL_TYPE_SEQUENCE_ITERATOR_NEXT_TRAITS_HPP)
10#define FUSION_ITERATOR_DETAIL_TYPE_SEQUENCE_ITERATOR_NEXT_TRAITS_HPP
11
12#include <boost/spirit/fusion/detail/config.hpp>
13#include <boost/mpl/next.hpp>
14
15namespace boost { namespace fusion
16{
17    struct type_sequence_iterator_tag;
18
19    template <typename Iterator>
20    struct type_sequence_iterator;
21
22    namespace type_sequence_detail {
23        template <typename Iterator>
24        struct next_traits_impl
25        {
26            typedef type_sequence_iterator<
27                typename mpl::next<typename Iterator::iterator_type>::type
28            > type;
29
30            static type
31            call(Iterator);
32        };
33
34        template <typename Iterator>
35        typename next_traits_impl<Iterator>::type
36        next_traits_impl<Iterator>::call(Iterator)
37        {
38            FUSION_RETURN_DEFAULT_CONSTRUCTED;
39        }
40    }
41
42    namespace meta
43    {
44        template <typename Tag>
45        struct next_impl;
46
47        template <>
48        struct next_impl<type_sequence_iterator_tag>
49        {
50            template <typename Iterator>
51            struct apply : type_sequence_detail::next_traits_impl<Iterator>
52            {};
53        };
54    }
55}}
56
57#endif
58
59
Note: See TracBrowser for help on using the repository browser.