Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/fusion/view/repetitive_view/repetitive_view.hpp @ 16:2665513ce2d3
Add boost headers
author | Chris Cannam |
---|---|
date | Tue, 05 Aug 2014 11:11:38 +0100 |
parents | |
children | c530137014c0 |
comparison
equal
deleted
inserted
replaced
15:663ca0da4350 | 16:2665513ce2d3 |
---|---|
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_REPETITIVE_VIEW_VIEW_HPP_INCLUDED) | |
9 #define BOOST_FUSION_REPETITIVE_VIEW_REPETITIVE_VIEW_HPP_INCLUDED | |
10 | |
11 #include <boost/type_traits/remove_reference.hpp> | |
12 #include <boost/mpl/if.hpp> | |
13 | |
14 #include <boost/fusion/support/is_view.hpp> | |
15 #include <boost/fusion/support/category_of.hpp> | |
16 | |
17 #include <boost/fusion/view/repetitive_view/detail/begin_impl.hpp> | |
18 #include <boost/fusion/view/repetitive_view/detail/end_impl.hpp> | |
19 | |
20 | |
21 namespace boost { namespace fusion | |
22 { | |
23 struct repetitive_view_tag; | |
24 struct fusion_sequence_tag; | |
25 | |
26 template<typename Sequence> struct repetitive_view | |
27 : sequence_base< repetitive_view<Sequence> > | |
28 { | |
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; | |
32 | |
33 typedef single_pass_traversal_tag category; | |
34 | |
35 typedef typename boost::remove_reference<Sequence>::type sequence_type; | |
36 typedef typename | |
37 mpl::if_<traits::is_view<Sequence>, Sequence, sequence_type&>::type | |
38 stored_seq_type; | |
39 | |
40 repetitive_view(Sequence& in_seq) | |
41 : seq(in_seq) {} | |
42 | |
43 stored_seq_type seq; | |
44 | |
45 private: | |
46 // silence MSVC warning C4512: assignment operator could not be generated | |
47 repetitive_view& operator= (repetitive_view const&); | |
48 }; | |
49 | |
50 }} | |
51 | |
52 #endif |