1 /*=============================================================================
2 Copyright (c) 2005-2012 Joel de Guzman
3 Copyright (c) 2005-2006 Dan Marsden
5 Distributed under the Boost Software License, Version 1.0. (See accompanying
6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 ==============================================================================*/
8 #if !defined(BOOST_PP_FUSION_DEQUE_26112006_1649)
9 #define BOOST_PP_FUSION_DEQUE_26112006_1649
11 #if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
12 #error "C++03 only! This file should not have been included"
15 #include <boost/fusion/container/deque/detail/cpp03/limits.hpp>
16 #include <boost/fusion/container/deque/front_extended_deque.hpp>
17 #include <boost/fusion/container/deque/back_extended_deque.hpp>
18 #include <boost/fusion/container/deque/detail/cpp03/deque_keyed_values.hpp>
19 #include <boost/fusion/container/deque/detail/cpp03/deque_initial_size.hpp>
20 #include <boost/fusion/support/sequence_base.hpp>
21 #include <boost/fusion/support/detail/access.hpp>
22 #include <boost/fusion/container/deque/detail/keyed_element.hpp>
23 #include <boost/preprocessor/repetition/enum_params.hpp>
24 #include <boost/preprocessor/repetition/enum_binary_params.hpp>
25 #include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
26 #include <boost/type_traits/is_convertible.hpp>
28 #include <boost/fusion/container/deque/deque_fwd.hpp>
29 #include <boost/fusion/container/deque/detail/value_at_impl.hpp>
30 #include <boost/fusion/container/deque/detail/at_impl.hpp>
31 #include <boost/fusion/container/deque/detail/begin_impl.hpp>
32 #include <boost/fusion/container/deque/detail/end_impl.hpp>
33 #include <boost/fusion/container/deque/detail/is_sequence_impl.hpp>
34 #include <boost/fusion/sequence/intrinsic/begin.hpp>
35 #include <boost/mpl/bool.hpp>
37 #include <boost/fusion/support/void.hpp>
38 #include <boost/fusion/support/detail/enabler.hpp>
39 #include <boost/utility/enable_if.hpp>
41 #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
42 #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque.hpp>
44 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
45 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/deque" FUSION_MAX_DEQUE_SIZE_STR ".hpp")
48 /*=============================================================================
49 Copyright (c) 2001-2011 Joel de Guzman
51 Distributed under the Boost Software License, Version 1.0. (See accompanying
52 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
54 This is an auto-generated file. Do not edit!
55 ==============================================================================*/
57 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
58 #pragma wave option(preserve: 1)
63 namespace boost { namespace fusion {
67 template<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename T)>
70 detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type,
71 sequence_base<deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)> >
73 typedef deque_tag fusion_tag;
74 typedef bidirectional_traversal_tag category;
75 typedef typename detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type base;
76 typedef typename detail::deque_initial_size<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type size;
77 typedef mpl::int_<size::value> next_up;
78 typedef mpl::int_<-1> next_down;
79 typedef mpl::false_ is_view;
81 #include <boost/fusion/container/deque/detail/cpp03/deque_forward_ctor.hpp>
83 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
87 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
88 explicit deque(typename detail::call_param<T0>::type t0)
89 : base(t0, detail::nil_keyed_element())
92 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
93 explicit deque(deque const& rhs)
97 template<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename U)>
98 BOOST_FUSION_GPU_ENABLED
99 deque(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)> const& seq)
103 template<typename Sequence>
104 BOOST_FUSION_GPU_ENABLED
105 deque(Sequence const& seq
106 , typename disable_if<is_convertible<Sequence, T0>, detail::enabler_>::type = detail::enabler
107 , typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler)
108 : base(base::from_iterator(fusion::begin(seq)))
111 template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename U)>
112 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
114 operator=(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)> const& rhs)
116 base::operator=(rhs);
120 template <typename T>
121 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
123 operator=(T const& rhs)
125 base::operator=(rhs);
129 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
130 FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
132 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \
133 (defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES))
134 template <typename T0_>
135 BOOST_FUSION_GPU_ENABLED
136 explicit deque(T0_&& t0
137 , typename enable_if<is_convertible<T0_, T0>, detail::enabler_>::type = detail::enabler
139 : base(BOOST_FUSION_FWD_ELEM(T0_, t0), detail::nil_keyed_element())
141 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
142 explicit deque(deque&& rhs)
143 : base(std::forward<deque>(rhs))
145 template<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename U)>
146 BOOST_FUSION_GPU_ENABLED
147 deque(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>&& seq
148 , typename disable_if<
149 is_convertible<deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>, T0>
151 >::type = detail::enabler)
152 : base(std::forward<deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>>(seq))
154 template <typename T>
155 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
159 base::operator=(BOOST_FUSION_FWD_ELEM(T, rhs));
163 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
170 struct deque<> : detail::nil_keyed_element
172 typedef deque_tag fusion_tag;
173 typedef bidirectional_traversal_tag category;
174 typedef mpl::int_<0> size;
175 typedef mpl::int_<0> next_up;
176 typedef mpl::int_<-1> next_down;
177 typedef mpl::false_ is_view;
179 template <typename Sequence>
180 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
181 deque(Sequence const&,
184 traits::is_sequence<Sequence>
185 , result_of::empty<Sequence> >, detail::enabler_>::type = detail::enabler) BOOST_NOEXCEPT
188 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
189 deque() BOOST_NOEXCEPT {}
196 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
197 #pragma wave option(output: null)
200 #endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES