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

Revision 857, 1.3 KB checked in by igarcia, 19 years ago (diff)
Line 
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_SINGLE_VIEW_HPP)
9#define FUSION_SEQUENCE_SINGLE_VIEW_HPP
10
11#include <boost/spirit/fusion/detail/access.hpp>
12#include <boost/spirit/fusion/sequence/detail/as_tuple_element.hpp>
13#include <boost/spirit/fusion/iterator/single_view_iterator.hpp>
14#include <boost/spirit/fusion/sequence/detail/single_view_begin_end_trts.hpp>
15#include <boost/spirit/fusion/sequence/detail/sequence_base.hpp>
16
17namespace boost { namespace fusion
18{
19    struct single_view_tag;
20
21    template <typename T>
22    struct single_view : sequence_base<single_view<T> >
23    {
24        typedef single_view_tag tag;
25        typedef typename detail::as_tuple_element<T>::type value_type;
26
27        single_view()
28            : val() {}
29
30        explicit single_view(typename detail::call_param<T>::type val)
31            : val(val) {}
32
33        value_type val;
34    };
35}}
36
37#endif
38
39
Note: See TracBrowser for help on using the repository browser.