Chris@16
|
1 /*=============================================================================
|
Chris@16
|
2 Copyright (c) 2001-2011 Joel de Guzman
|
Chris@16
|
3
|
Chris@16
|
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
|
Chris@16
|
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
6 ==============================================================================*/
|
Chris@16
|
7 #if !defined(FUSION_LIST_07172005_1153)
|
Chris@16
|
8 #define FUSION_LIST_07172005_1153
|
Chris@16
|
9
|
Chris@16
|
10 #include <boost/fusion/container/list/list_fwd.hpp>
|
Chris@16
|
11 #include <boost/fusion/container/list/detail/list_to_cons.hpp>
|
Chris@16
|
12
|
Chris@16
|
13 #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
|
Chris@16
|
14 #include <boost/fusion/container/list/detail/preprocessed/list.hpp>
|
Chris@16
|
15 #else
|
Chris@16
|
16 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
Chris@16
|
17 #pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/list" FUSION_MAX_LIST_SIZE_STR ".hpp")
|
Chris@16
|
18 #endif
|
Chris@16
|
19
|
Chris@16
|
20 /*=============================================================================
|
Chris@16
|
21 Copyright (c) 2001-2011 Joel de Guzman
|
Chris@16
|
22
|
Chris@16
|
23 Distributed under the Boost Software License, Version 1.0. (See accompanying
|
Chris@16
|
24 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
25
|
Chris@16
|
26 This is an auto-generated file. Do not edit!
|
Chris@16
|
27 ==============================================================================*/
|
Chris@16
|
28
|
Chris@16
|
29 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
Chris@16
|
30 #pragma wave option(preserve: 1)
|
Chris@16
|
31 #endif
|
Chris@16
|
32
|
Chris@16
|
33 namespace boost { namespace fusion
|
Chris@16
|
34 {
|
Chris@16
|
35 struct nil_;
|
Chris@16
|
36 struct void_;
|
Chris@16
|
37
|
Chris@16
|
38 template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, typename T)>
|
Chris@16
|
39 struct list
|
Chris@16
|
40 : detail::list_to_cons<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, T)>::type
|
Chris@16
|
41 {
|
Chris@16
|
42 private:
|
Chris@16
|
43 typedef
|
Chris@16
|
44 detail::list_to_cons<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, T)>
|
Chris@16
|
45 list_to_cons;
|
Chris@16
|
46
|
Chris@16
|
47 public:
|
Chris@16
|
48 typedef typename list_to_cons::type inherited_type;
|
Chris@16
|
49
|
Chris@16
|
50 list()
|
Chris@16
|
51 : inherited_type() {}
|
Chris@16
|
52
|
Chris@16
|
53 template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, typename U)>
|
Chris@16
|
54 list(list<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, U)> const& rhs)
|
Chris@16
|
55 : inherited_type(rhs) {}
|
Chris@16
|
56
|
Chris@16
|
57 template <typename Sequence>
|
Chris@16
|
58 list(Sequence const& rhs)
|
Chris@16
|
59 : inherited_type(rhs) {}
|
Chris@16
|
60
|
Chris@16
|
61 // Expand a couple of forwarding constructors for arguments
|
Chris@16
|
62 // of type (T0), (T0, T1), (T0, T1, T2) etc. Exanple:
|
Chris@16
|
63 //
|
Chris@16
|
64 // list(
|
Chris@16
|
65 // typename detail::call_param<T0>::type _0
|
Chris@16
|
66 // , typename detail::call_param<T1>::type _1)
|
Chris@16
|
67 // : inherited_type(list_to_cons::call(_0, _1)) {}
|
Chris@16
|
68 #include <boost/fusion/container/list/detail/list_forward_ctor.hpp>
|
Chris@16
|
69
|
Chris@16
|
70 template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, typename U)>
|
Chris@16
|
71 list&
|
Chris@16
|
72 operator=(list<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, U)> const& rhs)
|
Chris@16
|
73 {
|
Chris@16
|
74 inherited_type::operator=(rhs);
|
Chris@16
|
75 return *this;
|
Chris@16
|
76 }
|
Chris@16
|
77
|
Chris@16
|
78 template <typename T>
|
Chris@16
|
79 list&
|
Chris@16
|
80 operator=(T const& rhs)
|
Chris@16
|
81 {
|
Chris@16
|
82 inherited_type::operator=(rhs);
|
Chris@16
|
83 return *this;
|
Chris@16
|
84 }
|
Chris@16
|
85 };
|
Chris@16
|
86 }}
|
Chris@16
|
87
|
Chris@16
|
88 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
Chris@16
|
89 #pragma wave option(output: null)
|
Chris@16
|
90 #endif
|
Chris@16
|
91
|
Chris@16
|
92 #endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
|
Chris@16
|
93
|
Chris@16
|
94 #endif
|