• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*=============================================================================
2     Copyright (c) 2007 Tobias Schwinger
3 
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 ==============================================================================*/
7 
8 #if !defined(BOOST_FUSION_REPETITIVE_VIEW_BEGIN_IMPL_HPP_INCLUDED)
9 #define BOOST_FUSION_REPETITIVE_VIEW_BEGIN_IMPL_HPP_INCLUDED
10 
11 #include <boost/fusion/support/config.hpp>
12 #include <boost/fusion/sequence/intrinsic/begin.hpp>
13 #include <boost/fusion/view/repetitive_view/repetitive_view_fwd.hpp>
14 
15 namespace boost { namespace fusion
16 {
17     struct repetitive_view_tag;
18 
19     template <typename Sequence, typename Pos>
20     struct repetitive_view_iterator;
21 
22     namespace extension
23     {
24         template<typename Tag>
25         struct begin_impl;
26 
27         template<>
28         struct begin_impl<repetitive_view_tag>
29         {
30             template<typename View>
31             struct apply
32             {
33                 typedef typename View::sequence_type sequence_type;
34 
35                 typedef repetitive_view_iterator<sequence_type,
36                     typename result_of::begin<sequence_type>::type > type;
37 
38                 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
callboost::fusion::extension::begin_impl::apply39                 static type call(View const& v)
40                 {
41                     return type(v.seq);
42                 }
43             };
44         };
45 
46     }
47 
48 }}
49 
50 #endif
51 
52