2007-10-21 00:52:09 +00:00
|
|
|
/*=============================================================================
|
2012-04-07 07:34:00 +00:00
|
|
|
Copyright (c) 2005-2012 Joel de Guzman
|
2007-10-21 00:52:09 +00:00
|
|
|
Copyright (c) 2005-2006 Dan Marsden
|
|
|
|
|
2011-09-18 10:03:59 +00:00
|
|
|
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
2007-10-21 00:52:09 +00:00
|
|
|
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
==============================================================================*/
|
2012-09-04 05:04:26 +00:00
|
|
|
#if !defined(BOOST_PP_FUSION_DEQUE_26112006_1649)
|
|
|
|
#define BOOST_PP_FUSION_DEQUE_26112006_1649
|
2007-10-21 00:52:09 +00:00
|
|
|
|
2012-09-04 05:04:26 +00:00
|
|
|
#if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
|
2012-04-07 10:57:10 +00:00
|
|
|
#error "C++03 only! This file should not have been included"
|
|
|
|
#endif
|
|
|
|
|
2013-02-03 10:31:46 +00:00
|
|
|
#include <boost/fusion/container/deque/detail/cpp03/limits.hpp>
|
2007-10-21 00:52:09 +00:00
|
|
|
#include <boost/fusion/container/deque/front_extended_deque.hpp>
|
|
|
|
#include <boost/fusion/container/deque/back_extended_deque.hpp>
|
2013-02-03 10:31:46 +00:00
|
|
|
#include <boost/fusion/container/deque/detail/cpp03/deque_keyed_values.hpp>
|
|
|
|
#include <boost/fusion/container/deque/detail/cpp03/deque_initial_size.hpp>
|
2007-10-21 00:52:09 +00:00
|
|
|
#include <boost/fusion/support/sequence_base.hpp>
|
2014-11-21 00:53:50 +09:00
|
|
|
#include <boost/fusion/support/detail/access.hpp>
|
2007-10-21 00:52:09 +00:00
|
|
|
#include <boost/fusion/container/deque/detail/keyed_element.hpp>
|
|
|
|
#include <boost/preprocessor/repetition/enum_params.hpp>
|
|
|
|
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
|
|
|
|
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
|
|
|
|
#include <boost/type_traits/is_convertible.hpp>
|
|
|
|
|
|
|
|
#include <boost/fusion/container/deque/deque_fwd.hpp>
|
|
|
|
#include <boost/fusion/container/deque/detail/value_at_impl.hpp>
|
|
|
|
#include <boost/fusion/container/deque/detail/at_impl.hpp>
|
|
|
|
#include <boost/fusion/container/deque/detail/begin_impl.hpp>
|
|
|
|
#include <boost/fusion/container/deque/detail/end_impl.hpp>
|
2010-11-06 12:21:18 +00:00
|
|
|
#include <boost/fusion/container/deque/detail/is_sequence_impl.hpp>
|
2007-10-21 00:52:09 +00:00
|
|
|
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
|
|
|
#include <boost/mpl/bool.hpp>
|
|
|
|
|
|
|
|
#include <boost/fusion/support/void.hpp>
|
|
|
|
#include <boost/utility/enable_if.hpp>
|
|
|
|
|
2011-09-18 10:03:59 +00:00
|
|
|
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
|
2013-02-03 10:31:46 +00:00
|
|
|
#include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque.hpp>
|
2011-09-18 10:03:59 +00:00
|
|
|
#else
|
|
|
|
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
2013-02-03 10:31:46 +00:00
|
|
|
#pragma wave option(preserve: 2, line: 0, output: "preprocessed/deque" FUSION_MAX_DEQUE_SIZE_STR ".hpp")
|
2011-09-18 10:03:59 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/*=============================================================================
|
|
|
|
Copyright (c) 2001-2011 Joel de Guzman
|
|
|
|
|
|
|
|
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
|
|
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
|
|
|
|
This is an auto-generated file. Do not edit!
|
|
|
|
==============================================================================*/
|
|
|
|
|
|
|
|
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
|
|
|
#pragma wave option(preserve: 1)
|
|
|
|
#endif
|
|
|
|
|
2014-01-21 14:17:09 -08:00
|
|
|
#define FUSION_HASH #
|
|
|
|
|
2007-10-21 00:52:09 +00:00
|
|
|
namespace boost { namespace fusion {
|
|
|
|
|
|
|
|
struct deque_tag;
|
|
|
|
|
|
|
|
template<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename T)>
|
|
|
|
struct deque
|
|
|
|
:
|
|
|
|
detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type,
|
|
|
|
sequence_base<deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)> >
|
|
|
|
{
|
|
|
|
typedef deque_tag fusion_tag;
|
2009-10-25 22:59:54 +00:00
|
|
|
typedef bidirectional_traversal_tag category;
|
2007-10-21 00:52:09 +00:00
|
|
|
typedef typename detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type base;
|
|
|
|
typedef typename detail::deque_initial_size<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type size;
|
|
|
|
typedef mpl::int_<size::value> next_up;
|
2014-11-30 03:58:20 +09:00
|
|
|
typedef mpl::int_<-1> next_down;
|
2007-10-21 00:52:09 +00:00
|
|
|
typedef mpl::false_ is_view;
|
|
|
|
|
2013-02-03 10:31:46 +00:00
|
|
|
#include <boost/fusion/container/deque/detail/cpp03/deque_forward_ctor.hpp>
|
2007-10-21 00:52:09 +00:00
|
|
|
|
2015-03-03 02:21:02 +09:00
|
|
|
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
2007-10-21 00:52:09 +00:00
|
|
|
deque()
|
|
|
|
{}
|
|
|
|
|
2015-03-03 02:21:02 +09:00
|
|
|
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
2014-11-21 00:53:50 +09:00
|
|
|
explicit deque(typename detail::call_param<T0>::type t0)
|
2007-10-21 00:52:09 +00:00
|
|
|
: base(t0, detail::nil_keyed_element())
|
|
|
|
{}
|
|
|
|
|
2015-03-03 02:21:02 +09:00
|
|
|
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
2012-08-31 14:33:12 +00:00
|
|
|
explicit deque(deque const& rhs)
|
|
|
|
: base(rhs)
|
|
|
|
{}
|
|
|
|
|
2007-10-21 00:52:09 +00:00
|
|
|
template<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename U)>
|
2015-03-03 02:21:02 +09:00
|
|
|
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
2012-08-31 14:33:12 +00:00
|
|
|
deque(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)> const& seq)
|
2007-10-21 00:52:09 +00:00
|
|
|
: base(seq)
|
|
|
|
{}
|
|
|
|
|
|
|
|
template<typename Sequence>
|
2015-03-03 02:21:02 +09:00
|
|
|
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
2012-08-31 14:33:12 +00:00
|
|
|
deque(Sequence const& seq, typename disable_if<is_convertible<Sequence, T0> >::type* /*dummy*/ = 0)
|
2007-10-21 00:52:09 +00:00
|
|
|
: base(base::from_iterator(fusion::begin(seq)))
|
|
|
|
{}
|
|
|
|
|
|
|
|
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename U)>
|
2015-03-03 02:21:02 +09:00
|
|
|
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
2007-10-21 00:52:09 +00:00
|
|
|
deque&
|
|
|
|
operator=(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)> const& rhs)
|
|
|
|
{
|
|
|
|
base::operator=(rhs);
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename T>
|
2015-03-03 02:21:02 +09:00
|
|
|
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
2007-10-21 00:52:09 +00:00
|
|
|
deque&
|
|
|
|
operator=(T const& rhs)
|
|
|
|
{
|
|
|
|
base::operator=(rhs);
|
|
|
|
return *this;
|
|
|
|
}
|
2012-09-01 01:04:12 +00:00
|
|
|
|
2014-01-21 14:17:09 -08:00
|
|
|
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
|
|
|
FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
|
|
|
#endif
|
|
|
|
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \
|
|
|
|
(defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES))
|
|
|
|
template <typename T0_>
|
2015-03-03 02:21:02 +09:00
|
|
|
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
2014-01-21 14:17:09 -08:00
|
|
|
explicit deque(T0_&& t0
|
|
|
|
, typename enable_if<is_convertible<T0_, T0> >::type* /*dummy*/ = 0
|
|
|
|
)
|
2014-11-25 22:23:55 +09:00
|
|
|
: base(BOOST_FUSION_FWD_ELEM(T0_, t0), detail::nil_keyed_element())
|
2014-01-21 14:17:09 -08:00
|
|
|
{}
|
2015-03-03 02:21:02 +09:00
|
|
|
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
2014-01-21 14:17:09 -08:00
|
|
|
explicit deque(deque&& rhs)
|
|
|
|
: base(std::forward<deque>(rhs))
|
|
|
|
{}
|
|
|
|
template<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename U)>
|
2015-03-03 02:21:02 +09:00
|
|
|
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
2015-01-18 02:23:40 +09:00
|
|
|
deque(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>&& seq
|
|
|
|
, typename disable_if<
|
|
|
|
is_convertible<deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>, T0>
|
|
|
|
>::type* /*dummy*/ = 0)
|
2014-01-21 14:17:09 -08:00
|
|
|
: base(std::forward<deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>>(seq))
|
|
|
|
{}
|
2012-09-01 01:04:12 +00:00
|
|
|
template <typename T>
|
2015-03-03 02:21:02 +09:00
|
|
|
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
2012-09-01 01:04:12 +00:00
|
|
|
deque&
|
|
|
|
operator=(T&& rhs)
|
|
|
|
{
|
2014-11-25 22:23:55 +09:00
|
|
|
base::operator=(BOOST_FUSION_FWD_ELEM(T, rhs));
|
2012-09-01 01:04:12 +00:00
|
|
|
return *this;
|
|
|
|
}
|
2014-01-21 14:17:09 -08:00
|
|
|
#endif
|
|
|
|
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
|
|
|
FUSION_HASH endif
|
2012-09-01 01:04:12 +00:00
|
|
|
#endif
|
|
|
|
|
2007-10-21 00:52:09 +00:00
|
|
|
};
|
2013-01-27 12:15:26 +00:00
|
|
|
|
|
|
|
template <>
|
|
|
|
struct deque<> : detail::nil_keyed_element
|
|
|
|
{
|
|
|
|
typedef deque_tag fusion_tag;
|
|
|
|
typedef bidirectional_traversal_tag category;
|
|
|
|
typedef mpl::int_<0> size;
|
|
|
|
typedef mpl::int_<0> next_up;
|
2014-11-30 03:58:20 +09:00
|
|
|
typedef mpl::int_<-1> next_down;
|
2013-01-27 12:15:26 +00:00
|
|
|
typedef mpl::false_ is_view;
|
|
|
|
|
|
|
|
template <typename Sequence>
|
2015-03-03 02:21:02 +09:00
|
|
|
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
2013-01-27 12:15:26 +00:00
|
|
|
deque(Sequence const&,
|
|
|
|
typename enable_if<
|
|
|
|
mpl::and_<
|
|
|
|
traits::is_sequence<Sequence>
|
2015-03-03 02:21:02 +09:00
|
|
|
, result_of::empty<Sequence> > >::type* /*dummy*/ = 0) BOOST_NOEXCEPT
|
2013-01-27 12:15:26 +00:00
|
|
|
{}
|
|
|
|
|
2015-03-03 02:21:02 +09:00
|
|
|
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
|
|
|
deque() BOOST_NOEXCEPT {}
|
2013-01-27 12:15:26 +00:00
|
|
|
};
|
|
|
|
|
2007-10-21 00:52:09 +00:00
|
|
|
}}
|
|
|
|
|
2014-01-21 14:17:09 -08:00
|
|
|
#undef FUSION_HASH
|
|
|
|
|
2011-09-18 10:03:59 +00:00
|
|
|
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
|
|
|
#pragma wave option(output: null)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
|
|
|
|
|
2007-10-21 00:52:09 +00:00
|
|
|
#endif
|