Compare commits

..

1 Commits

Author SHA1 Message Date
bed076889f Release 1.49.0
[SVN r77094]
2012-02-22 22:08:43 +00:00
18 changed files with 132 additions and 937 deletions

View File

@ -95,7 +95,7 @@ including any Fusion header to change the default. Example:
[table
[[Parameter] [Description] [Default]]
[[`T0`...`TN`] [Element types] [__unspecified__]]
[[`T0`...`TN`] [Element types] [['unspecified]]]
]
[heading Model of]
@ -246,7 +246,7 @@ including any Fusion header to change the default. Example:
[table
[[Parameter] [Description] [Default]]
[[`T0`...`TN`] [Element types] [__unspecified__]]
[[`T0`...`TN`] [Element types] [['unspecified-type]]]
]
[heading Model of]
@ -289,220 +289,6 @@ constant (see __recursive_inline__).]
[endsect]
[section deque]
[heading Description]
`deque` is a simple __bidirectional_sequence__ that supports
constant-time insertion and removal of elements at both ends. Like the
__list__ and __cons__, `deque` is more efficient than __vector__
(especially at compile time) when the target sequence is constructed
piecemeal (a data at a time, e.g. when constructing expression
templates). Like the __list__ and __cons__, runtime cost of access to
each element is peculiarly constant (see __recursive_inline__).
Element insertion and removal are done by special `deque` helper classes
__front_extended_deque__ and __back_extended_deque__.
[heading Header]
#include <boost/fusion/container/deque.hpp>
#include <boost/fusion/include/deque.hpp>
#include <boost/fusion/container/list/deque_fwd.hpp>
#include <boost/fusion/include/deque_fwd.hpp>
[heading Synopsis]
template <typename ...Elements>
struct deque;
For C++11 compilers, the variadic class interface has no upper bound.
For C++03 compilers, the variadic class interface accepts `0` to
`FUSION_MAX_DEQUE_SIZE` elements, where `FUSION_MAX_DEQUE_SIZE` is a
user definable predefined maximum that defaults to `10`. Example:
deque<int, char, double>
You may define the preprocessor constant `FUSION_MAX_DEQUE_SIZE` before
including any Fusion header to change the default. Example:
#define FUSION_MAX_DEQUE_SIZE 20
[heading Template parameters]
[table
[[Parameter] [Description] [Default]]
[[`Elements`] [Element types] [ ]]
]
[heading Model of]
* __bidirectional_sequence__
[variablelist Notation
[[`D`] [A `deque` type]]
[[`d`, `d2`] [Instances of `deque`]]
[[`e0`...`en`] [Heterogeneous values]]
[[`s`] [A __forward_sequence__]]
[[`N`] [An __mpl_integral_constant__]]
]
[heading Expression Semantics]
Semantics of an expression is defined only where it differs from, or is not
defined in __bidirectional_sequence__.
[table
[[Expression] [Semantics]]
[[`D()`] [Creates a deque with default constructed elements.]]
[[`D(e0, e1,... en)`] [Creates a deque with elements `e0`...`en`.]]
[[`D(s)`] [Copy constructs a deque from a __forward_sequence__, `s`.]]
[[`d = s`] [Assigns to a deque, `d`, from a __forward_sequence__, `s`.]]
[[`__at__<N>(d)`] [The Nth element from the beginning of the sequence; see __at__.]]
]
[blurb __note__ `__at__<N>(d)` is provided for convenience, despite
`deque` being a __bidirectional_sequence__ only (`at` is supposed to be
a __random_access_sequence__ requirement). The runtime complexity of
__at__ is constant (see __recursive_inline__). `deque` element access
utilizes operator overloading with argument dependent lookup (ADL) of
the proper element getter function given a static constant index
parameter. Interestingly, with modern C++ compilers, this lookup is very
fast and rivals recursive template instantiations in compile time-speed,
so much so that `deque` relies on ADL for all element access (indexing)
as well as iteration.]
[heading Example]
deque<int, float> d(12, 5.5f);
std::cout << __at_c__<0>(d) << std::endl;
std::cout << __at_c__<1>(d) << std::endl;
[endsect]
[section front_extended_deque]
[heading Description]
`front_extended_deque` allows a __deque__ to be front extended. It shares
the same properties as the __deque__.
[heading Header]
See __deque__
[heading Synopsis]
template <typename Deque, typename T>
struct front_extended_deque;
[heading Template parameters]
[table
[[Parameter] [Description] [Default]]
[[`Deque`] [Deque type] [ ]]
[[`T`] [Element type] [ ]]
]
[blurb __note__ `Deque` can be a __deque__, a __front_extended_deque__ or a
__back_extended_deque__]
[heading Model of]
* __bidirectional_sequence__
[variablelist Notation
[[`D`] [A `front_extended_deque` type]]
[[`e`] [Heterogeneous value]]
[[`N`] [An __mpl_integral_constant__]]
]
[heading Expression Semantics]
Semantics of an expression is defined only where it differs from, or is
not defined in __bidirectional_sequence__.
[table
[[Expression] [Semantics]]
[[`D(d, e)`] [Extend `d` prepending `e` to its front.]]
[[`__at__<N>(d)`] [The Nth element from the beginning of the sequence; see __at__.]]
]
[blurb __note__ See __deque__ for further details.]
[heading Example]
typedef deque<int, float> initial_deque;
initial_deque d(12, 5.5f);
front_extended_deque<initial_deque, int> d2(d, 999);
std::cout << __at_c__<0>(d2) << std::endl;
std::cout << __at_c__<1>(d2) << std::endl;
std::cout << __at_c__<2>(d2) << std::endl;
[endsect]
[section back_extended_deque]
[heading Description]
`back_extended_deque` allows a __deque__ to be back extended. It shares
the same properties as the __deque__.
[heading Header]
See __deque__
[heading Synopsis]
template <typename Deque, typename T>
struct back_extended_deque;
[heading Template parameters]
[table
[[Parameter] [Description] [Default]]
[[`Deque`] [Deque type] [ ]]
[[`T`] [Element type] [ ]]
]
[blurb __note__ `Deque` can be a __deque__, a __back_extended_deque__ or a
__back_extended_deque__]
[heading Model of]
* __bidirectional_sequence__
[variablelist Notation
[[`D`] [A `back_extended_deque` type]]
[[`e`] [Heterogeneous value]]
[[`N`] [An __mpl_integral_constant__]]
]
[heading Expression Semantics]
Semantics of an expression is defined only where it differs from, or is
not defined in __bidirectional_sequence__.
[table
[[Expression] [Semantics]]
[[`D(d, e)`] [Extend `d` prepending `e` to its back.]]
[[`__at__<N>(d)`] [The Nth element from the beginning of the sequence; see __at__.]]
]
[blurb __note__ See __deque__ for further details.]
[heading Example]
typedef deque<int, float> initial_deque;
initial_deque d(12, 5.5f);
back_extended_deque<initial_deque, int> d2(d, 999);
std::cout << __at_c__<0>(d2) << std::endl;
std::cout << __at_c__<1>(d2) << std::endl;
std::cout << __at_c__<2>(d2) << std::endl;
[endsect]
[section set]
[heading Description]
@ -546,7 +332,7 @@ including any Fusion header to change the default. Example:
[table
[[Parameter] [Description] [Default]]
[[`T0`...`TN`] [Element types] [__unspecified__]]
[[`T0`...`TN`] [Element types] [['unspecified-type]]]
]
[heading Model of]
@ -628,7 +414,7 @@ including any Fusion header to change the default. Example:
[table
[[Parameter] [Description] [Default]]
[[`T0`...`TN`] [Element types] [__unspecified__]]
[[`T0`...`TN`] [Element types] [['unspecified-type]]]
]
[heading Model of]
@ -831,58 +617,6 @@ __note_boost_ref__
[endsect]
[section make_deque]
[heading Description]
Create a __deque__ from one or more values.
[heading Synopsis]
template <typename ...Elements>
typename __result_of_make_deque__<Elements...>::type
make_deque(Elements const&... elements);
For C++11 compilers, the variadic function interface has no upper bound.
For C++11 compilers, the variadic function accepts `0` to
`FUSION_MAX_DEQUE_SIZE` elements, where `FUSION_MAX_DEQUE_SIZE` is a
user definable predefined maximum that defaults to `10`. You may define
the preprocessor constant `FUSION_MAX_DEQUE_SIZE` before including any
Fusion header to change the default. Example:
#define FUSION_MAX_DEQUE_SIZE 20
[heading Parameters]
[table
[[Parameter] [Description] [Description]]
[[`elements`] [Instances of `Elements`] [The arguments to `make_deque`]]
]
[heading Expression Semantics]
make_deque(elements...);
[*Return type]: __result_of_make_deque__`<Elements...>::type`
[*Semantics]: Create a __deque__ from `elements...`.
[heading Header]
#include <boost/fusion/container/generation/make_deque.hpp>
#include <boost/fusion/include/make_deque.hpp>
[heading Example]
make_deque(123, "hello", 12.5)
[heading See also]
__note_boost_ref__
[endsect]
[section make_set]
[heading Description]
@ -1180,54 +914,6 @@ including any Fusion header to change the default. Example:
[endsect]
[section deque_tie]
[heading Description]
Constructs a tie using a __deque__ sequence.
[heading Synopsis]
template <typename ...Elements>
__deque__<Elements&...>
deque_tie(Elements&... elements);
For C++11 compilers, the variadic function interface has no upper bound.
For C++03 compilers, the variadic function accepts `0` to
`FUSION_MAX_DEQUE_SIZE` elements, where `FUSION_MAX_DEQUE_SIZE` is a
user definable predefined maximum that defaults to `10`. You may define
the preprocessor constant `FUSION_MAX_DEQUE_SIZE` before including any
Fusion header to change the default. Example:
#define FUSION_MAX_DEQUE_SIZE 20
[heading Parameters]
[table
[[Parameter] [Description] [Description]]
[[`elements`] [Instances of `Elements`] [The arguments to `deque_tie`]]
]
[heading Expression Semantics]
deque_tie(elements...);
[*Return type]: __deque__<Elements&...>
[*Semantics]: Create a __deque__ of references from `elements...`.
[heading Header]
#include <boost/fusion/container/generation/deque_tie.hpp>
#include <boost/fusion/include/deque_tie.hpp>
[heading Example]
int i = 123;
double d = 123.456;
deque_tie(i, d)
[endsect]
[section MetaFunctions]
@ -1362,54 +1048,6 @@ rules for __element_conversion__.
[endsect]
[section make_deque]
[heading Description]
Returns the result type of __make_deque__.
[heading Synopsis]
template <typename ...Elements>
struct make_deque;
For C++11 compilers, the variadic template interface has no upper bound.
For C++03 The variadic function accepts `0` to `FUSION_MAX_DEQUE_SIZE`
elements, where `FUSION_MAX_DEQUE_SIZE` is a user definable predefined
maximum that defaults to `10`. You may define the preprocessor constant
`FUSION_MAX_DEQUE_SIZE` before including any Fusion header to change the
default. Example:
#define FUSION_MAX_DEQUE_SIZE 20
[heading Parameters]
[table
[[Parameter] [Requirement] [Description]]
[[`Elements`] [Variadic template types] [Template arguments to `make_deque`]]
]
[heading Expression Semantics]
result_of::make_deque<Elements...>::type
[*Return type]: A __deque__ with elements of types converted following the
rules for __element_conversion__.
[*Semantics]: Create a __deque__ from `Elements...`.
[heading Header]
#include <boost/fusion/container/generation/make_deque.hpp>
#include <boost/fusion/include/make_deque.hpp>
[heading Example]
result_of::make_deque<int, const char(&)[7], double>::type
[endsect]
[section make_set]
[heading Description]
@ -1602,53 +1240,6 @@ default. Example:
[endsect]
[section deque_tie]
[heading Description]
Returns the result type of __deque_tie__.
[heading Synopsis]
template <typename ...Elements>
struct deque_tie;
For C++11 compilers, the variadic template interface has no upper bound.
For C++03 compilers, the variadic function accepts `0` to
`FUSION_MAX_DEQUE_SIZE` elements, where `FUSION_MAX_DEQUE_SIZE` is a
user definable predefined maximum that defaults to `10`. You may define
the preprocessor constant `FUSION_MAX_DEQUE_SIZE` before including any
Fusion header to change the default. Example:
#define FUSION_MAX_DEQUE_SIZE 20
[heading Parameters]
[table
[[Parameter] [Requirement] [Description]]
[[`Elements`] [Variadic template types] [Template arguments to `deque_tie`]]
]
[heading Expression Semantics]
result_of::deque_tie<Elements...>::type;
[*Return type]: __deque__<Elements&...>
[*Semantics]: Create a __deque__ of references from `Elements...`.
[heading Header]
#include <boost/fusion/container/generation/deque_tie.hpp>
#include <boost/fusion/include/deque_tie.hpp>
[heading Example]
result_of::deque_tie<int, double>::type
[endsect]
[section map_tie]
[heading Description]
@ -1797,48 +1388,6 @@ Convert a fusion sequence to a __vector__.
[endsect]
[section as_deque]
[heading Description]
Convert a fusion sequence to a __deque__.
[heading Synopsis]
template <typename Sequence>
typename result_of::as_deque<Sequence>::type
as_deque(Sequence& seq);
template <typename Sequence>
typename result_of::as_deque<Sequence const>::type
as_deque(Sequence const& seq);
[heading Parameters]
[table
[[Parameter] [Requirement] [Description]]
[[`seq`] [An instance of Sequence] [The sequence to convert.]]
]
[heading Expression Semantics]
as_deque(seq);
[*Return type]: __result_of_as_deque__`<Sequence>::type`
[*Semantics]: Convert a fusion sequence, `seq`, to a __deque__.
[heading Header]
#include <boost/fusion/container/deque/convert.hpp>
#include <boost/fusion/include/as_deque.hpp>
[heading Example]
as_deque(__make_vector__('x', 123, "hello"))
[endsect]
[section as_set]
[heading Description]
@ -2010,44 +1559,6 @@ Returns the result type of __as_vector__.
[endsect]
[section as_deque]
[heading Description]
Returns the result type of __as_deque__.
[heading Synopsis]
template <typename Sequence>
struct as_deque;
[heading Parameters]
[table
[[Parameter] [Requirement] [Description]]
[[`Sequence`] [A fusion __sequence__] [The sequence type to convert.]]
]
[heading Expression Semantics]
result_of::as_deque<Sequence>::type;
[*Return type]: A __deque__ with same elements as the input sequence,
`Sequence`.
[*Semantics]: Convert a fusion sequence, `Sequence`, to a __deque__.
[heading Header]
#include <boost/fusion/container/deque/convert.hpp>
#include <boost/fusion/include/as_deque.hpp>
[heading Example]
result_of::as_deque<__vector__<char, int> >::type
[endsect]
[section as_set]
[heading Description]

View File

@ -9,7 +9,7 @@
#include <tuple>
#include <utility>
#include <boost/mpl/if.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/fusion/support/detail/access.hpp>
#include <boost/type_traits/remove_const.hpp>
@ -29,13 +29,13 @@ namespace boost { namespace fusion
struct apply
{
typedef typename remove_const<Sequence>::type seq_type;
typedef typename std::tuple_element<N::value, seq_type>::type element;
typedef std::tuple_element<N::value, seq_type> element;
typedef typename
mpl::if_<
mpl::eval_if<
is_const<Sequence>
, typename fusion::detail::cref_result<element>::type
, typename fusion::detail::ref_result<element>::type
, fusion::detail::cref_result<element>
, fusion::detail::ref_result<element>
>::type
type;

View File

@ -12,7 +12,7 @@
#include <boost/type_traits/remove_const.hpp>
#include <boost/fusion/support/detail/access.hpp>
#include <boost/mpl/int.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/eval_if.hpp>
#include <tuple>
#include <utility>
@ -48,12 +48,12 @@ namespace boost { namespace fusion
template <typename Iterator>
struct deref
{
typedef typename value_of<Iterator>::type element;
typedef value_of<Iterator> element;
typedef typename
mpl::if_<
mpl::eval_if<
is_const<typename Iterator::tuple_type>
, typename fusion::detail::cref_result<element>::type
, typename fusion::detail::ref_result<element>::type
, fusion::detail::cref_result<element>
, fusion::detail::ref_result<element>
>::type
type;

View File

@ -10,6 +10,12 @@
#include <tuple>
#include <boost/fusion/support/tag_of_fwd.hpp>
namespace std
{
template <typename... Elements>
class tuple;
}
namespace boost { namespace fusion
{
struct std_tuple_tag;

View File

@ -22,25 +22,6 @@
#include <boost/type_traits/add_const.hpp>
#include <boost/type_traits/is_convertible.hpp>
///////////////////////////////////////////////////////////////////////////////
// With no decltype and variadics, we will use the C++03 version
///////////////////////////////////////////////////////////////////////////////
#if (defined(BOOST_NO_DECLTYPE) \
|| defined(BOOST_NO_VARIADIC_TEMPLATES) \
|| defined(BOOST_NO_RVALUE_REFERENCES))
# include <boost/fusion/container/deque/detail/cpp03_deque.hpp>
#else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/deque" FUSION_MAX_DEQUE_SIZE_STR ".hpp")
#endif
///////////////////////////////////////////////////////////////////////////////
// C++11 interface
///////////////////////////////////////////////////////////////////////////////
#include <boost/fusion/support/sequence_base.hpp>
#include <boost/fusion/support/detail/access.hpp>
#include <boost/fusion/container/deque/detail/keyed_element.hpp>
#include <boost/fusion/container/deque/detail/cpp11_deque_keyed_values.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>
@ -48,67 +29,93 @@
#include <boost/fusion/container/deque/detail/end_impl.hpp>
#include <boost/fusion/container/deque/detail/is_sequence_impl.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/int.hpp>
#include <boost/fusion/support/sequence_base.hpp>
#include <boost/fusion/support/void.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_convertible.hpp>
namespace boost { namespace fusion
{
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/deque/detail/preprocessed/deque.hpp>
#else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/deque" FUSION_MAX_DEQUE_SIZE_STR ".hpp")
#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
namespace boost { namespace fusion {
struct deque_tag;
template <typename ...Elements>
struct deque : detail::nil_keyed_element
{
};
template <typename Head, typename ...Tail>
struct deque<Head, Tail...>
: detail::deque_keyed_values<Head, Tail...>::type
, sequence_base<deque<Head, Tail...>>
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;
typedef bidirectional_traversal_tag category;
typedef typename detail::deque_keyed_values<Head, Tail...>::type base;
typedef mpl::int_<(sizeof ...(Tail) + 1)> size;
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;
typedef mpl::int_<mpl::int_<((size::value == 0) ? 0 : -1)>::type::value> next_down;
typedef mpl::int_<
mpl::if_<mpl::equal_to<size, mpl::int_<0> >, mpl::int_<0>, mpl::int_<-1> >::type::value> next_down;
typedef mpl::false_ is_view;
#include <boost/fusion/container/deque/detail/deque_forward_ctor.hpp>
deque()
{}
{}
template <typename ...Elements>
deque(deque<Elements...> const& seq)
: base(seq)
{}
explicit deque(typename add_reference<typename add_const<T0>::type>::type t0)
: base(t0, detail::nil_keyed_element())
{}
explicit deque(typename detail::call_param<Head>::type head
, typename detail::call_param<Tail>::type... tail)
: base(detail::deque_keyed_values<Head, Tail...>::call(head, tail...))
{}
template<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename U)>
deque(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)> const& seq)
: base(seq)
{}
template <typename Sequence>
explicit deque(Sequence const& seq
, typename disable_if<is_convertible<Sequence, Head> >::type* /*dummy*/ = 0)
: base(base::from_iterator(fusion::begin(seq)))
{}
template<typename Sequence>
deque(Sequence const& seq, typename disable_if<is_convertible<Sequence, T0> >::type* /*dummy*/ = 0)
: base(base::from_iterator(fusion::begin(seq)))
{}
template <typename ...Elements>
deque& operator=(deque<Elements...> const& rhs)
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename U)>
deque&
operator=(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)> const& rhs)
{
base::operator=(rhs);
return *this;
}
template <typename T>
deque& operator=(T const& rhs)
deque&
operator=(T const& rhs)
{
base::operator=(rhs);
return *this;
}
};
}}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#endif

View File

@ -11,26 +11,40 @@
#include <boost/fusion/container/deque/limits.hpp>
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
///////////////////////////////////////////////////////////////////////////////
// With no decltype and variadics, we will use the C++03 version
///////////////////////////////////////////////////////////////////////////////
#if (defined(BOOST_NO_DECLTYPE) \
|| defined(BOOST_NO_VARIADIC_TEMPLATES) \
|| defined(BOOST_NO_RVALUE_REFERENCES))
# include <boost/fusion/container/deque/detail/cpp03_deque_fwd.hpp>
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/deque/detail/preprocessed/deque_fwd.hpp>
#else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/deque" FUSION_MAX_DEQUE_SIZE_STR "_fwd.hpp")
#endif
///////////////////////////////////////////////////////////////////////////////
// C++11 interface
///////////////////////////////////////////////////////////////////////////////
/*=============================================================================
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
namespace boost { namespace fusion
{
template <typename ...T>
struct void_;
template<
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
FUSION_MAX_DEQUE_SIZE, typename T, void_)>
struct deque;
}}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#endif

View File

@ -1,125 +0,0 @@
/*=============================================================================
Copyright (c) 2005-2012 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden
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)
==============================================================================*/
#if !defined(BOOST_CPP03_FUSION_DEQUE_26112006_1649)
#define BOOST_CPP03_FUSION_DEQUE_26112006_1649
#if defined(BOOST_FUSION_HAS_CPP11_DEQUE)
#error "C++03 only! This file should not have been included"
#endif
#include <boost/fusion/container/deque/limits.hpp>
#include <boost/fusion/container/deque/front_extended_deque.hpp>
#include <boost/fusion/container/deque/back_extended_deque.hpp>
#include <boost/fusion/container/deque/detail/cpp03_deque_keyed_values.hpp>
#include <boost/fusion/container/deque/detail/deque_initial_size.hpp>
#include <boost/fusion/support/sequence_base.hpp>
#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/add_reference.hpp>
#include <boost/type_traits/add_const.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>
#include <boost/fusion/container/deque/detail/is_sequence_impl.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/fusion/support/sequence_base.hpp>
#include <boost/fusion/support/void.hpp>
#include <boost/utility/enable_if.hpp>
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/deque/detail/preprocessed/deque.hpp>
#else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/deque" FUSION_MAX_DEQUE_SIZE_STR ".hpp")
#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
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;
typedef bidirectional_traversal_tag category;
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;
typedef mpl::int_<
mpl::if_<mpl::equal_to<size, mpl::int_<0> >, mpl::int_<0>, mpl::int_<-1> >::type::value> next_down;
typedef mpl::false_ is_view;
#include <boost/fusion/container/deque/detail/deque_forward_ctor.hpp>
deque()
{}
explicit deque(typename add_reference<typename add_const<T0>::type>::type t0)
: base(t0, detail::nil_keyed_element())
{}
template<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename U)>
deque(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)> const& seq)
: base(seq)
{}
template<typename Sequence>
deque(Sequence const& seq, typename disable_if<is_convertible<Sequence, T0> >::type* /*dummy*/ = 0)
: base(base::from_iterator(fusion::begin(seq)))
{}
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename U)>
deque&
operator=(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)> const& rhs)
{
base::operator=(rhs);
return *this;
}
template <typename T>
deque&
operator=(T const& rhs)
{
base::operator=(rhs);
return *this;
}
};
}}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#endif

View File

@ -1,54 +0,0 @@
/*=============================================================================
Copyright (c) 2005-2012 Joel de Guzman
Copyright (c) 2005-2007 Dan Marsden
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)
==============================================================================*/
#if !defined(FUSION_CPP03_DEQUE_FORWARD_02092007_0749)
#define FUSION_CPP03_DEQUE_FORWARD_02092007_0749
#if defined(BOOST_FUSION_HAS_CPP11_DEQUE)
#error "C++03 only! This file should not have been included"
#endif
#include <boost/fusion/container/deque/limits.hpp>
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/deque/detail/preprocessed/deque_fwd.hpp>
#else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/deque" FUSION_MAX_DEQUE_SIZE_STR "_fwd.hpp")
#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
namespace boost { namespace fusion
{
struct void_;
template<
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
FUSION_MAX_DEQUE_SIZE, typename T, void_)>
struct deque;
}}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#endif

View File

@ -1,106 +0,0 @@
/*=============================================================================
Copyright (c) 2005-2012 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden
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)
==============================================================================*/
#if !defined(BOOST_FUSION_DEQUE_DETAIL_DEQUE_KEYED_VALUES_26112006_1330)
#define BOOST_FUSION_DEQUE_DETAIL_DEQUE_KEYED_VALUES_26112006_1330
#if defined(BOOST_FUSION_HAS_CPP11_DEQUE)
#error "C++03 only! This file should not have been included"
#endif
#include <boost/fusion/container/deque/limits.hpp>
#include <boost/fusion/container/deque/detail/keyed_element.hpp>
#include <boost/preprocessor/iterate.hpp>
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
#include <boost/preprocessor/repetition/enum.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/type_traits/add_reference.hpp>
#include <boost/mpl/plus.hpp>
#include <boost/mpl/int.hpp>
#include <boost/mpl/print.hpp>
#define FUSION_VOID(z, n, _) void_
namespace boost { namespace fusion
{
struct void_;
}}
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/deque/detail/preprocessed/deque_keyed_values.hpp>
#else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "preprocessed/deque_keyed_values" FUSION_MAX_DEQUE_SIZE_STR ".hpp")
#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
namespace boost { namespace fusion { namespace detail
{
template<typename Key, typename Value, typename Rest>
struct keyed_element;
struct nil_keyed_element;
template<typename N, BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(FUSION_MAX_DEQUE_SIZE, typename T, void_)>
struct deque_keyed_values_impl;
template<typename N>
struct deque_keyed_values_impl<N, BOOST_PP_ENUM(FUSION_MAX_DEQUE_SIZE, FUSION_VOID, _)>
{
typedef nil_keyed_element type;
static type call()
{
return type();
}
};
template<typename N, BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename T)>
struct deque_keyed_values_impl
{
typedef mpl::int_<mpl::plus<N, mpl::int_<1> >::value> next_index;
typedef typename deque_keyed_values_impl<
next_index,
BOOST_PP_ENUM_SHIFTED_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type tail;
typedef keyed_element<N, T0, tail> type;
#include <boost/fusion/container/deque/detail/deque_keyed_values_call.hpp>
};
template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(FUSION_MAX_DEQUE_SIZE, typename T, void_)>
struct deque_keyed_values
: deque_keyed_values_impl<mpl::int_<0>, BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>
{};
}}}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#undef FUSION_VOID
#endif

View File

@ -1,56 +0,0 @@
/*=============================================================================
Copyright (c) 2005-2012 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden
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)
==============================================================================*/
#if !defined(BOOST_FUSION_DEQUE_DETAIL_CPP11_DEQUE_KEYED_VALUES_07042012_1901)
#define BOOST_FUSION_DEQUE_DETAIL_CPP11_DEQUE_KEYED_VALUES_07042012_1901
#include <boost/fusion/container/deque/detail/keyed_element.hpp>
#include <boost/type_traits/add_reference.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/mpl/int.hpp>
namespace boost { namespace fusion { namespace detail
{
template<typename Key, typename Value, typename Rest>
struct keyed_element;
template <typename N, typename ...Elements>
struct deque_keyed_values_impl;
template <typename N, typename Head, typename ...Tail>
struct deque_keyed_values_impl<N, Head, Tail...>
{
typedef mpl::int_<(N::value + 1)> next_index;
typedef typename deque_keyed_values_impl<next_index, Tail...>::type tail;
typedef keyed_element<N, Head, tail> type;
static type call(
typename detail::call_param<Head>::type head
, typename detail::call_param<Tail>::type... tail)
{
return type(
head
, deque_keyed_values_impl<next_index, Tail...>::call(tail...)
);
}
};
struct nil_keyed_element;
template <typename N>
struct deque_keyed_values_impl<N>
{
typedef nil_keyed_element type;
static type call() { return type(); }
};
template <typename ...Elements>
struct deque_keyed_values
: deque_keyed_values_impl<mpl::int_<0>, Elements...> {};
}}}
#endif

View File

@ -8,7 +8,9 @@
#if !defined(BOOST_FUSION_DEQUE_DETAIL_KEYED_ELEMENT_26112006_1330)
#define BOOST_FUSION_DEQUE_DETAIL_KEYED_ELEMENT_26112006_1330
#include <boost/fusion/support/detail/access.hpp>
#include <boost/type_traits/add_reference.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/fusion/iterator/deref.hpp>
#include <boost/fusion/iterator/next.hpp>
@ -57,17 +59,17 @@ namespace detail {
return *this;
}
typename cref_result<Value>::type get(Key) const
typename add_reference<typename add_const<Value>::type>::type get(Key) const
{
return value_;
}
typename ref_result<Value>::type get(Key)
typename add_reference<Value>::type get(Key)
{
return value_;
}
keyed_element(typename call_param<Value>::type value, Rest const& rest)
keyed_element(typename add_reference<typename add_const<Value>::type>::type value, Rest const& rest)
: Rest(rest), value_(value)
{}

View File

@ -10,7 +10,7 @@
#include <boost/fusion/support/detail/access.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/bool.hpp>
namespace boost { namespace fusion
@ -93,15 +93,15 @@ namespace boost { namespace fusion
template <typename Sequence, typename N>
struct apply
{
typedef typename detail::cons_deref<
typename detail::cons_advance<Sequence, N::value>::type>::type
typedef detail::cons_deref<
typename detail::cons_advance<Sequence, N::value>::type>
element;
typedef typename
mpl::if_<
mpl::eval_if<
is_const<Sequence>
, typename detail::cref_result<element>::type
, typename detail::ref_result<element>::type
, detail::cref_result<element>
, detail::ref_result<element>
>::type
type;

View File

@ -28,9 +28,7 @@ namespace boost { namespace fusion
template <typename Sequence, typename N>
struct apply
{
typedef typename
mpl::at<typename Sequence::storage_type::types, N>::type
element;
typedef mpl::at<typename Sequence::storage_type::types, N> element;
typedef typename detail::ref_result<element>::type type;
static type
@ -43,9 +41,7 @@ namespace boost { namespace fusion
template <typename Sequence, typename N>
struct apply <Sequence const, N>
{
typedef typename
mpl::at<typename Sequence::storage_type::types, N>::type
element;
typedef mpl::at<typename Sequence::storage_type::types, N> element;
typedef typename detail::cref_result<element>::type type;
static type

View File

@ -12,7 +12,8 @@
#include <boost/fusion/iterator/deref.hpp>
#include <boost/fusion/support/detail/access.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/identity.hpp>
namespace boost { namespace fusion { namespace extension
{
@ -28,10 +29,10 @@ namespace boost { namespace fusion { namespace extension
typedef typename result_of::value_of<It>::type::second_type data;
typedef typename
mpl::if_<
mpl::eval_if<
is_const<typename It::seq_type>
, typename detail::cref_result<data>::type
, typename detail::ref_result<data>::type
, detail::cref_result<mpl::identity<data> >
, detail::ref_result<mpl::identity<data> >
>::type
type;

View File

@ -27,7 +27,7 @@ namespace boost { namespace fusion
template <typename Sequence, typename N>
struct apply
{
typedef typename mpl::at<typename Sequence::types, N>::type element;
typedef mpl::at<typename Sequence::types, N> element;
typedef typename detail::ref_result<element>::type type;
static type
@ -40,7 +40,7 @@ namespace boost { namespace fusion
template <typename Sequence, typename N>
struct apply <Sequence const, N>
{
typedef typename mpl::at<typename Sequence::types, N>::type element;
typedef mpl::at<typename Sequence::types, N> element;
typedef typename detail::cref_result<element>::type type;
static type

View File

@ -10,7 +10,6 @@
#include <boost/mpl/at.hpp>
#include <boost/fusion/support/detail/access.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/mpl/if.hpp>
namespace boost { namespace fusion
{
@ -30,14 +29,14 @@ namespace boost { namespace fusion
typedef typename Iterator::vector vector;
typedef typename Iterator::index index;
typedef typename mpl::at<
typename vector::types, index>::type
typename vector::types, index>
element;
typedef typename
mpl::if_<
mpl::eval_if<
is_const<vector>
, typename fusion::detail::cref_result<element>::type
, typename fusion::detail::ref_result<element>::type
, fusion::detail::cref_result<element>
, fusion::detail::ref_result<element>
>::type
type;

View File

@ -15,7 +15,7 @@ namespace boost { namespace fusion { namespace detail
template <typename T>
struct ref_result
{
typedef typename add_reference<T>::type type;
typedef typename add_reference<typename T::type>::type type;
};
template <typename T>
@ -23,7 +23,7 @@ namespace boost { namespace fusion { namespace detail
{
typedef typename
add_reference<
typename add_const<T>::type
typename add_const<typename T::type>::type
>::type
type;
};

View File

@ -103,7 +103,7 @@ main()
useThisIStringStream is("(100 200 300)");
vector<int, int, int> ti;
BOOST_TEST(bool(is >> ti) != 0);
BOOST_TEST(bool((is >> ti) != 0));
BOOST_TEST(ti == make_vector(100, 200, 300));
// Note that strings are problematic: