annotate DEPENDENCIES/generic/include/boost/fusion/container/deque/detail/cpp03/deque.hpp @ 47:fe753ff3d0b5

Simpler solution to .cat test
author Chris Cannam
date Thu, 07 Aug 2014 15:05:37 +0100
parents 2665513ce2d3
children c530137014c0
rev   line source
Chris@16 1 /*=============================================================================
Chris@16 2 Copyright (c) 2005-2012 Joel de Guzman
Chris@16 3 Copyright (c) 2005-2006 Dan Marsden
Chris@16 4
Chris@16 5 Distributed under the Boost Software License, Version 1.0. (See accompanying
Chris@16 6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Chris@16 7 ==============================================================================*/
Chris@16 8 #if !defined(BOOST_PP_FUSION_DEQUE_26112006_1649)
Chris@16 9 #define BOOST_PP_FUSION_DEQUE_26112006_1649
Chris@16 10
Chris@16 11 #if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
Chris@16 12 #error "C++03 only! This file should not have been included"
Chris@16 13 #endif
Chris@16 14
Chris@16 15 #include <boost/fusion/container/deque/detail/cpp03/limits.hpp>
Chris@16 16 #include <boost/fusion/container/deque/front_extended_deque.hpp>
Chris@16 17 #include <boost/fusion/container/deque/back_extended_deque.hpp>
Chris@16 18 #include <boost/fusion/container/deque/detail/cpp03/deque_keyed_values.hpp>
Chris@16 19 #include <boost/fusion/container/deque/detail/cpp03/deque_initial_size.hpp>
Chris@16 20 #include <boost/fusion/support/sequence_base.hpp>
Chris@16 21 #include <boost/fusion/container/deque/detail/keyed_element.hpp>
Chris@16 22 #include <boost/preprocessor/repetition/enum_params.hpp>
Chris@16 23 #include <boost/preprocessor/repetition/enum_binary_params.hpp>
Chris@16 24 #include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
Chris@16 25 #include <boost/type_traits/add_reference.hpp>
Chris@16 26 #include <boost/type_traits/add_const.hpp>
Chris@16 27 #include <boost/type_traits/is_convertible.hpp>
Chris@16 28
Chris@16 29 #include <boost/fusion/container/deque/deque_fwd.hpp>
Chris@16 30 #include <boost/fusion/container/deque/detail/value_at_impl.hpp>
Chris@16 31 #include <boost/fusion/container/deque/detail/at_impl.hpp>
Chris@16 32 #include <boost/fusion/container/deque/detail/begin_impl.hpp>
Chris@16 33 #include <boost/fusion/container/deque/detail/end_impl.hpp>
Chris@16 34 #include <boost/fusion/container/deque/detail/is_sequence_impl.hpp>
Chris@16 35 #include <boost/fusion/sequence/intrinsic/begin.hpp>
Chris@16 36 #include <boost/mpl/bool.hpp>
Chris@16 37
Chris@16 38 #include <boost/fusion/support/sequence_base.hpp>
Chris@16 39 #include <boost/fusion/support/void.hpp>
Chris@16 40 #include <boost/utility/enable_if.hpp>
Chris@16 41
Chris@16 42 #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
Chris@16 43 #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque.hpp>
Chris@16 44 #else
Chris@16 45 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
Chris@16 46 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/deque" FUSION_MAX_DEQUE_SIZE_STR ".hpp")
Chris@16 47 #endif
Chris@16 48
Chris@16 49 /*=============================================================================
Chris@16 50 Copyright (c) 2001-2011 Joel de Guzman
Chris@16 51
Chris@16 52 Distributed under the Boost Software License, Version 1.0. (See accompanying
Chris@16 53 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Chris@16 54
Chris@16 55 This is an auto-generated file. Do not edit!
Chris@16 56 ==============================================================================*/
Chris@16 57
Chris@16 58 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
Chris@16 59 #pragma wave option(preserve: 1)
Chris@16 60 #endif
Chris@16 61
Chris@16 62 namespace boost { namespace fusion {
Chris@16 63
Chris@16 64 struct deque_tag;
Chris@16 65
Chris@16 66 template<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename T)>
Chris@16 67 struct deque
Chris@16 68 :
Chris@16 69 detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type,
Chris@16 70 sequence_base<deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)> >
Chris@16 71 {
Chris@16 72 typedef deque_tag fusion_tag;
Chris@16 73 typedef bidirectional_traversal_tag category;
Chris@16 74 typedef typename detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type base;
Chris@16 75 typedef typename detail::deque_initial_size<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type size;
Chris@16 76 typedef mpl::int_<size::value> next_up;
Chris@16 77 typedef mpl::int_<
Chris@16 78 mpl::if_<mpl::equal_to<size, mpl::int_<0> >, mpl::int_<0>, mpl::int_<-1> >::type::value> next_down;
Chris@16 79 typedef mpl::false_ is_view;
Chris@16 80
Chris@16 81 #include <boost/fusion/container/deque/detail/cpp03/deque_forward_ctor.hpp>
Chris@16 82
Chris@16 83 deque()
Chris@16 84 {}
Chris@16 85
Chris@16 86 explicit deque(typename add_reference<typename add_const<T0>::type>::type t0)
Chris@16 87 : base(t0, detail::nil_keyed_element())
Chris@16 88 {}
Chris@16 89
Chris@16 90 explicit deque(deque const& rhs)
Chris@16 91 : base(rhs)
Chris@16 92 {}
Chris@16 93
Chris@16 94 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
Chris@16 95 template <typename T0_>
Chris@16 96 explicit deque(T0_&& t0
Chris@16 97 , typename enable_if<is_convertible<T0_, T0> >::type* /*dummy*/ = 0
Chris@16 98 )
Chris@16 99 : base(std::forward<T0_>(t0), detail::nil_keyed_element())
Chris@16 100 {}
Chris@16 101
Chris@16 102 explicit deque(deque&& rhs)
Chris@16 103 : base(std::forward<deque>(rhs))
Chris@16 104 {}
Chris@16 105 #endif
Chris@16 106
Chris@16 107 template<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename U)>
Chris@16 108 deque(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)> const& seq)
Chris@16 109 : base(seq)
Chris@16 110 {}
Chris@16 111
Chris@16 112 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
Chris@16 113 template<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename U)>
Chris@16 114 deque(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>&& seq)
Chris@16 115 : base(std::forward<deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>>(seq))
Chris@16 116 {}
Chris@16 117 #endif
Chris@16 118
Chris@16 119 template<typename Sequence>
Chris@16 120 deque(Sequence const& seq, typename disable_if<is_convertible<Sequence, T0> >::type* /*dummy*/ = 0)
Chris@16 121 : base(base::from_iterator(fusion::begin(seq)))
Chris@16 122 {}
Chris@16 123
Chris@16 124 template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename U)>
Chris@16 125 deque&
Chris@16 126 operator=(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)> const& rhs)
Chris@16 127 {
Chris@16 128 base::operator=(rhs);
Chris@16 129 return *this;
Chris@16 130 }
Chris@16 131
Chris@16 132 template <typename T>
Chris@16 133 deque&
Chris@16 134 operator=(T const& rhs)
Chris@16 135 {
Chris@16 136 base::operator=(rhs);
Chris@16 137 return *this;
Chris@16 138 }
Chris@16 139
Chris@16 140 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
Chris@16 141 template <typename T>
Chris@16 142 deque&
Chris@16 143 operator=(T&& rhs)
Chris@16 144 {
Chris@16 145 base::operator=(std::forward<T>(rhs));
Chris@16 146 return *this;
Chris@16 147 }
Chris@16 148 #endif
Chris@16 149
Chris@16 150 };
Chris@16 151
Chris@16 152 template <>
Chris@16 153 struct deque<> : detail::nil_keyed_element
Chris@16 154 {
Chris@16 155 typedef deque_tag fusion_tag;
Chris@16 156 typedef bidirectional_traversal_tag category;
Chris@16 157 typedef mpl::int_<0> size;
Chris@16 158 typedef mpl::int_<0> next_up;
Chris@16 159 typedef mpl::int_<0> next_down;
Chris@16 160 typedef mpl::false_ is_view;
Chris@16 161
Chris@16 162 template <typename Sequence>
Chris@16 163 deque(Sequence const&,
Chris@16 164 typename enable_if<
Chris@16 165 mpl::and_<
Chris@16 166 traits::is_sequence<Sequence>
Chris@16 167 , result_of::empty<Sequence> > >::type* /*dummy*/ = 0)
Chris@16 168 {}
Chris@16 169
Chris@16 170 deque() {}
Chris@16 171 };
Chris@16 172
Chris@16 173 }}
Chris@16 174
Chris@16 175 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
Chris@16 176 #pragma wave option(output: null)
Chris@16 177 #endif
Chris@16 178
Chris@16 179 #endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
Chris@16 180
Chris@16 181 #endif