source: NonGTP/Boost/boost/spirit/fusion/sequence/range.hpp @ 857

Revision 857, 1.3 KB checked in by igarcia, 19 years ago (diff)
RevLine 
[857]1/*=============================================================================
2    Copyright (c) 2003 Joel de Guzman
3
4    Use, modification and distribution is subject to the Boost Software
5    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6    http://www.boost.org/LICENSE_1_0.txt)
7==============================================================================*/
8#if !defined(FUSION_SEQUENCE_RANGE_HPP)
9#define FUSION_SEQUENCE_RANGE_HPP
10
11#include <boost/spirit/fusion/detail/access.hpp>
12#include <boost/spirit/fusion/sequence/detail/range_begin_end_traits.hpp>
13#include <boost/spirit/fusion/sequence/detail/sequence_base.hpp>
14#include <boost/spirit/fusion/iterator/as_fusion_iterator.hpp>
15
16namespace boost { namespace fusion
17{
18    struct range_tag;
19
20    template <typename First, typename Last>
21    struct range : sequence_base<range<First, Last> >
22    {
23        typedef typename as_fusion_iterator<First>::type begin_type;
24        typedef typename as_fusion_iterator<Last>::type end_type;
25        typedef range_tag tag;
26
27        range(First const& first, Last const& last)
28            : first(as_fusion_iterator<First>::convert(first))
29            , last(as_fusion_iterator<Last>::convert(last)) {}
30
31        begin_type first;
32        end_type last;
33    };
34}}
35
36#endif
37
38
Note: See TracBrowser for help on using the repository browser.