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

Revision 857, 1.7 KB checked in by igarcia, 18 years ago (diff)
Line 
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_SINGLE_VIEW_ITERATOR_NEXT_TRAITS_HPP)
10#define FUSION_ITERATOR_DETAIL_SINGLE_VIEW_ITERATOR_NEXT_TRAITS_HPP
11
12#include <boost/spirit/fusion/detail/config.hpp>
13
14namespace boost { namespace fusion
15{
16    struct single_view_iterator_tag;
17
18    template <typename SingleView>
19    struct single_view_iterator_end;
20
21    template <typename SingleView>
22    struct single_view_iterator;
23
24    namespace single_view_detail
25    {
26        template<typename Iterator>
27        struct next_traits_impl
28        {
29            typedef single_view_iterator_end<
30                typename Iterator::single_view_type>
31            type;
32
33            static type
34            call(Iterator);
35        };
36
37        template<typename Iterator>
38        typename next_traits_impl<Iterator>::type
39        next_traits_impl<Iterator>::call(Iterator)
40        {
41            FUSION_RETURN_DEFAULT_CONSTRUCTED;
42        }
43    }
44
45    namespace meta
46    {
47        template <typename Tag>
48        struct next_impl;
49
50        template <>
51        struct next_impl<single_view_iterator_tag>
52        {
53            template <typename Iterator>
54            struct apply : single_view_detail::next_traits_impl<Iterator>
55            {};
56        };
57    }
58}}
59
60#endif
61
62
Note: See TracBrowser for help on using the repository browser.