1 /*=============================================================================
2 Copyright (c) 2007 Tobias Schwinger
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 ==============================================================================*/
8 #if !defined(BOOST_FUSION_REPETITIVE_REPETITIVE_VIEW_VIEW_HPP_INCLUDED)
9 #define BOOST_FUSION_REPETITIVE_VIEW_REPETITIVE_VIEW_HPP_INCLUDED
11 #include <boost/type_traits/remove_reference.hpp>
12 #include <boost/mpl/if.hpp>
14 #include <boost/fusion/support/is_view.hpp>
15 #include <boost/fusion/support/category_of.hpp>
17 #include <boost/fusion/view/repetitive_view/detail/begin_impl.hpp>
18 #include <boost/fusion/view/repetitive_view/detail/end_impl.hpp>
21 namespace boost
{ namespace fusion
23 struct repetitive_view_tag
;
24 struct fusion_sequence_tag
;
26 template<typename Sequence
> struct repetitive_view
27 : sequence_base
< repetitive_view
<Sequence
> >
29 typedef repetitive_view_tag fusion_tag
;
30 typedef fusion_sequence_tag tag
; // this gets picked up by MPL
31 typedef mpl::true_ is_view
;
33 typedef single_pass_traversal_tag category
;
35 typedef typename
boost::remove_reference
<Sequence
>::type sequence_type
;
37 mpl::if_
<traits::is_view
<Sequence
>, Sequence
, sequence_type
&>::type
40 repetitive_view(Sequence
& seq
)