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>
27 #include <boost/type_traits/is_same.hpp>
28 #include <boost/type_traits/remove_reference.hpp>
30 #include <boost/fusion/container/deque/deque_fwd.hpp>
31 #include <boost/fusion/container/deque/detail/value_at_impl.hpp>
32 #include <boost/fusion/container/deque/detail/at_impl.hpp>
33 #include <boost/fusion/container/deque/detail/begin_impl.hpp>
34 #include <boost/fusion/container/deque/detail/end_impl.hpp>
35 #include <boost/fusion/container/deque/detail/is_sequence_impl.hpp>
36 #include <boost/fusion/sequence/intrinsic/begin.hpp>
37 #include <boost/mpl/bool.hpp>
39 #include <boost/fusion/support/void.hpp>
40 #include <boost/fusion/support/detail/enabler.hpp>
41 #include <boost/utility/enable_if.hpp>
43 #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
44 #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque.hpp>
46 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
47 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/deque" FUSION_MAX_DEQUE_SIZE_STR ".hpp")
50 /*=============================================================================
51 Copyright (c) 2001-2011 Joel de Guzman
53 Distributed under the Boost Software License, Version 1.0. (See accompanying
54 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
56 This is an auto-generated file. Do not edit!
57 ==============================================================================*/
59 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
60 #pragma wave option(preserve: 1)
65 namespace boost { namespace fusion {
69 template<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename T)>
72 detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type,
73 sequence_base<deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)> >
75 typedef deque_tag fusion_tag;
76 typedef bidirectional_traversal_tag category;
77 typedef typename detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type base;
78 typedef typename detail::deque_initial_size<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type size;
79 typedef mpl::int_<size::value> next_up;
80 typedef mpl::int_<-1> next_down;
81 typedef mpl::false_ is_view;
83 #include <boost/fusion/container/deque/detail/cpp03/deque_forward_ctor.hpp>
85 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
89 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
90 explicit deque(typename detail::call_param<T0>::type t0)
91 : base(t0, detail::nil_keyed_element())
94 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
95 explicit deque(deque const& rhs)
99 template<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename U)>
100 BOOST_FUSION_GPU_ENABLED
101 deque(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)> const& seq)
105 template<typename Sequence>
106 BOOST_FUSION_GPU_ENABLED
107 deque(Sequence const& seq
108 , typename disable_if<is_convertible<Sequence, T0>, detail::enabler_>::type = detail::enabler
109 , typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler)
110 : base(base::from_iterator(fusion::begin(seq)))
113 template <typename T>
114 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
116 operator=(T const& rhs)
118 base::operator=(rhs);
122 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
123 FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
125 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \
126 (defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES))
127 template <typename T0_>
128 BOOST_FUSION_GPU_ENABLED
129 explicit deque(T0_&& t0
130 , typename enable_if<is_convertible<T0_, T0>, detail::enabler_>::type = detail::enabler
131 , typename disable_if_c<
132 boost::is_same<deque const, typename boost::remove_reference<T0_>::type const>::value
134 >::type = detail::enabler
136 : base(BOOST_FUSION_FWD_ELEM(T0_, t0), detail::nil_keyed_element())
138 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
139 explicit deque(deque&& rhs)
140 : base(std::forward<deque>(rhs))
142 template<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename U)>
143 BOOST_FUSION_GPU_ENABLED
144 deque(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>&& seq
145 , typename disable_if<
146 is_convertible<deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>, T0>
148 >::type = detail::enabler)
149 : base(std::forward<deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>>(seq))
151 template <typename T>
152 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
156 base::operator=(BOOST_FUSION_FWD_ELEM(T, rhs));
159 // This copy op= is required because move ctor deletes copy op=.
160 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
162 operator=(deque const& rhs)
164 base::operator=(static_cast<base const&>(rhs));
168 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
175 struct deque<> : detail::nil_keyed_element
177 typedef deque_tag fusion_tag;
178 typedef bidirectional_traversal_tag category;
179 typedef mpl::int_<0> size;
180 typedef mpl::int_<0> next_up;
181 typedef mpl::int_<-1> next_down;
182 typedef mpl::false_ is_view;
184 template <typename Sequence>
185 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
186 deque(Sequence const&,
189 traits::is_sequence<Sequence>
190 , result_of::empty<Sequence> >, detail::enabler_>::type = detail::enabler) BOOST_NOEXCEPT
193 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
194 deque() BOOST_NOEXCEPT {}
201 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
202 #pragma wave option(output: null)
205 #endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES