Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-23 09:35:12

0001 /*=============================================================================
0002     Copyright (c) 2005-2012 Joel de Guzman
0003     Copyright (c) 2005-2006 Dan Marsden
0004 
0005     Distributed under the Boost Software License, Version 1.0. (See accompanying
0006     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0007 ==============================================================================*/
0008 #if !defined(BOOST_PP_FUSION_DEQUE_26112006_1649)
0009 #define BOOST_PP_FUSION_DEQUE_26112006_1649
0010 
0011 #if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
0012 #error "C++03 only! This file should not have been included"
0013 #endif
0014 
0015 #include <boost/fusion/container/deque/detail/cpp03/limits.hpp>
0016 #include <boost/fusion/container/deque/front_extended_deque.hpp>
0017 #include <boost/fusion/container/deque/back_extended_deque.hpp>
0018 #include <boost/fusion/container/deque/detail/cpp03/deque_keyed_values.hpp>
0019 #include <boost/fusion/container/deque/detail/cpp03/deque_initial_size.hpp>
0020 #include <boost/fusion/support/sequence_base.hpp>
0021 #include <boost/fusion/support/detail/access.hpp>
0022 #include <boost/fusion/container/deque/detail/keyed_element.hpp>
0023 #include <boost/preprocessor/repetition/enum_params.hpp>
0024 #include <boost/preprocessor/repetition/enum_binary_params.hpp>
0025 #include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
0026 #include <boost/type_traits/is_convertible.hpp>
0027 #include <boost/type_traits/is_same.hpp>
0028 #include <boost/type_traits/remove_reference.hpp>
0029 
0030 #include <boost/fusion/container/deque/deque_fwd.hpp>
0031 #include <boost/fusion/container/deque/detail/value_at_impl.hpp>
0032 #include <boost/fusion/container/deque/detail/at_impl.hpp>
0033 #include <boost/fusion/container/deque/detail/begin_impl.hpp>
0034 #include <boost/fusion/container/deque/detail/end_impl.hpp>
0035 #include <boost/fusion/container/deque/detail/is_sequence_impl.hpp>
0036 #include <boost/fusion/sequence/intrinsic/begin.hpp>
0037 #include <boost/mpl/bool.hpp>
0038 
0039 #include <boost/fusion/support/void.hpp>
0040 #include <boost/fusion/support/detail/enabler.hpp>
0041 #include <boost/utility/enable_if.hpp>
0042 
0043 #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
0044 #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque.hpp>
0045 #else
0046 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
0047 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/deque" FUSION_MAX_DEQUE_SIZE_STR ".hpp")
0048 #endif
0049 
0050 /*=============================================================================
0051     Copyright (c) 2001-2011 Joel de Guzman
0052 
0053     Distributed under the Boost Software License, Version 1.0. (See accompanying
0054     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0055 
0056     This is an auto-generated file. Do not edit!
0057 ==============================================================================*/
0058 
0059 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
0060 #pragma wave option(preserve: 1)
0061 #endif
0062 
0063 #define FUSION_HASH #
0064 
0065 namespace boost { namespace fusion {
0066 
0067     struct deque_tag;
0068 
0069     template<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename T)>
0070     struct deque
0071         :
0072         detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type,
0073         sequence_base<deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)> >
0074     {
0075         typedef deque_tag fusion_tag;
0076         typedef bidirectional_traversal_tag category;
0077         typedef typename detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type base;
0078         typedef typename detail::deque_initial_size<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type size;
0079         typedef mpl::int_<size::value> next_up;
0080         typedef mpl::int_<-1> next_down;
0081         typedef mpl::false_ is_view;
0082 
0083 #include <boost/fusion/container/deque/detail/cpp03/deque_forward_ctor.hpp>
0084 
0085         BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0086         deque()
0087             {}
0088 
0089         BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0090         explicit deque(typename detail::call_param<T0>::type t0)
0091             : base(t0, detail::nil_keyed_element())
0092             {}
0093 
0094         BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0095         explicit deque(deque const& rhs)
0096             : base(rhs)
0097             {}
0098 
0099         template<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename U)>
0100         BOOST_FUSION_GPU_ENABLED
0101         deque(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)> const& seq)
0102             : base(seq)
0103             {}
0104 
0105         template<typename Sequence>
0106         BOOST_FUSION_GPU_ENABLED
0107         deque(Sequence const& seq
0108             , typename disable_if<is_convertible<Sequence, T0>, detail::enabler_>::type = detail::enabler
0109             , typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler)
0110             : base(base::from_iterator(fusion::begin(seq)))
0111             {}
0112 
0113         template <typename T>
0114         BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0115         deque&
0116         operator=(T const& rhs)
0117         {
0118             base::operator=(rhs);
0119             return *this;
0120         }
0121 
0122 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
0123 FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
0124 #endif
0125 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \
0126     (defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES))
0127         template <typename T0_>
0128         BOOST_FUSION_GPU_ENABLED
0129         explicit deque(T0_&& t0
0130           , typename enable_if<is_convertible<T0_, T0>, detail::enabler_>::type = detail::enabler
0131           , typename disable_if_c<
0132                 boost::is_same<deque const, typename boost::remove_reference<T0_>::type const>::value
0133               , detail::enabler_
0134             >::type = detail::enabler
0135          )
0136             : base(BOOST_FUSION_FWD_ELEM(T0_, t0), detail::nil_keyed_element())
0137             {}
0138         BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0139         explicit deque(deque&& rhs)
0140             : base(std::forward<deque>(rhs))
0141             {}
0142         template<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename U)>
0143         BOOST_FUSION_GPU_ENABLED
0144         deque(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>&& seq
0145             , typename disable_if<
0146                   is_convertible<deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>, T0>
0147                 , detail::enabler_
0148               >::type = detail::enabler)
0149             : base(std::forward<deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>>(seq))
0150             {}
0151         template <typename T>
0152         BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0153         deque&
0154         operator=(T&& rhs)
0155         {
0156             base::operator=(BOOST_FUSION_FWD_ELEM(T, rhs));
0157             return *this;
0158         }
0159         // This copy op= is required because move ctor deletes copy op=.
0160         BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0161         deque&
0162         operator=(deque const& rhs)
0163         {
0164             base::operator=(static_cast<base const&>(rhs));
0165             return *this;
0166         }
0167 #endif
0168 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
0169 FUSION_HASH endif
0170 #endif
0171 
0172     };
0173 
0174     template <>
0175     struct deque<> : detail::nil_keyed_element
0176     {
0177         typedef deque_tag fusion_tag;
0178         typedef bidirectional_traversal_tag category;
0179         typedef mpl::int_<0> size;
0180         typedef mpl::int_<0> next_up;
0181         typedef mpl::int_<-1> next_down;
0182         typedef mpl::false_ is_view;
0183 
0184         template <typename Sequence>
0185         BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0186         deque(Sequence const&,
0187             typename enable_if<
0188                 mpl::and_<
0189                     traits::is_sequence<Sequence>
0190                   , result_of::empty<Sequence> >, detail::enabler_>::type = detail::enabler) BOOST_NOEXCEPT
0191         {}
0192 
0193         BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0194         deque() BOOST_NOEXCEPT {}
0195     };
0196 
0197 }}
0198 
0199 #undef FUSION_HASH
0200 
0201 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
0202 #pragma wave option(output: null)
0203 #endif
0204 
0205 #endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
0206 
0207 #endif