Compare commits
68 Commits
svn-branch
...
boost-1.50
Author | SHA1 | Date | |
---|---|---|---|
546ff73011 | |||
e03dcc7c54 | |||
2e99690387 | |||
ee33ea5cfa | |||
93477e270e | |||
b159898a47 | |||
9a8955fbe1 | |||
44b337abb0 | |||
af16a84f09 | |||
4b6dddde03 | |||
01156b172a | |||
295bacb652 | |||
adb2d8bef0 | |||
518ac25a80 | |||
efea9aec4b | |||
c411c4b479 | |||
13aca9d862 | |||
dcbebe60f1 | |||
577a607a14 | |||
aa30bad7e4 | |||
94f5406936 | |||
cd811f56bc | |||
7aa4e2cbda | |||
9792f67700 | |||
a3427ea75b | |||
134fbf9600 | |||
199d8b548f | |||
0f4ac2e9e3 | |||
32adb57290 | |||
02b2a88bea | |||
1572e0e9c3 | |||
649770fdcd | |||
6f0af5db0a | |||
95555f3f20 | |||
0f33972fe9 | |||
a0733ce5ee | |||
dc8225a7aa | |||
994b37e4d5 | |||
3f4d3eb887 | |||
cda74605fc | |||
b605617c4f | |||
b22e2b64da | |||
46fc256c2f | |||
7615b492af | |||
e0a17b552c | |||
2e805be6df | |||
2f8b91828b | |||
ea5ea7f001 | |||
df633002dd | |||
d726756148 | |||
efcab8aae4 | |||
5dff610007 | |||
d004046aa5 | |||
a046e43990 | |||
b1ebdd60a6 | |||
0b58f052b3 | |||
36736edec5 | |||
57725cb393 | |||
099deb4385 | |||
d150ba8498 | |||
df2abdab6b | |||
780b8bc1b0 | |||
813930aee6 | |||
9e8d8b1871 | |||
4a29dd2a7c | |||
7bd2fd716d | |||
d57e8cfe9e | |||
ed9cb87ac3 |
@ -1,5 +1,5 @@
|
||||
#==============================================================================
|
||||
# Copyright (c) 2003-2007 Joel de Guzman
|
||||
# Copyright (c) 2003-2011 Joel de Guzman
|
||||
#
|
||||
# Use, modification and distribution is subject to the Boost Software
|
||||
# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,5 +1,6 @@
|
||||
[/==============================================================================
|
||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
||||
Copyright (C) 2001-2011 Joel de Guzman
|
||||
Copyright (C) 2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,5 +1,6 @@
|
||||
[/==============================================================================
|
||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
||||
Copyright (C) 2001-2011 Joel de Guzman
|
||||
Copyright (C) 2006 Dan Marsden
|
||||
Copyright (C) 2010 Christopher Schmidt
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
|
@ -1,5 +1,6 @@
|
||||
[/==============================================================================
|
||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
||||
Copyright (C) 2001-2011 Joel de Guzman
|
||||
Copyright (C) 2006 Dan Marsden
|
||||
Copyright (C) 2010 Christopher Schmidt
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
@ -133,7 +134,7 @@ the first call) and [arg_desc] of `seq`.
|
||||
>
|
||||
typename result_of_name_macro<Sequence, State const, F>::type name_macro(
|
||||
Sequence& seq, State const& initial_state, F f);
|
||||
|
||||
|
||||
template<
|
||||
typename Sequence,
|
||||
typename State,
|
||||
|
@ -1,5 +1,7 @@
|
||||
[/==============================================================================
|
||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
||||
Copyright (C) 2001-2011 Joel de Guzman
|
||||
Copyright (C) 2006 Dan Marsden
|
||||
Copyright (C) 2006 Tobias Schwinger
|
||||
Copyright (C) 2010 Christopher Schmidt
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
@ -37,6 +39,10 @@ This section summarizes significant changes to the Fusion library.
|
||||
(Christopher Schmidt)
|
||||
* October 7, 2010: Added __adapt_adt__, __adapt_tpl_adt__,
|
||||
__adapt_assoc_adt__ and __adapt_assoc_tpl_adt__ (Joel de Guzman,
|
||||
Hartmut Kaiser and Christopher Schmidt)
|
||||
Hartmut Kaiser and Christopher Schmidt)
|
||||
* August 29, 2011: Added support for segmented sequences and iterators (Eric Niebler)
|
||||
* September 16, 2011: Added preprocessed files (using wave) to speed up
|
||||
compilation (Joel de Guzman)
|
||||
* October 8, 2011: Added adaptor for std::tuple (Joel de Guzman)
|
||||
|
||||
[endsect]
|
||||
|
@ -1,5 +1,6 @@
|
||||
[/==============================================================================
|
||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
||||
Copyright (C) 2001-2011 Joel de Guzman
|
||||
Copyright (C) 2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -94,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]
|
||||
@ -245,7 +246,7 @@ including any Fusion header to change the default. Example:
|
||||
|
||||
[table
|
||||
[[Parameter] [Description] [Default]]
|
||||
[[`T0`...`TN`] [Element types] [['unspecified-type]]]
|
||||
[[`T0`...`TN`] [Element types] [__unspecified__]]
|
||||
]
|
||||
|
||||
[heading Model of]
|
||||
@ -288,6 +289,220 @@ 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]
|
||||
@ -331,7 +546,7 @@ including any Fusion header to change the default. Example:
|
||||
|
||||
[table
|
||||
[[Parameter] [Description] [Default]]
|
||||
[[`T0`...`TN`] [Element types] [['unspecified-type]]]
|
||||
[[`T0`...`TN`] [Element types] [__unspecified__]]
|
||||
]
|
||||
|
||||
[heading Model of]
|
||||
@ -413,7 +628,7 @@ including any Fusion header to change the default. Example:
|
||||
|
||||
[table
|
||||
[[Parameter] [Description] [Default]]
|
||||
[[`T0`...`TN`] [Element types] [['unspecified-type]]]
|
||||
[[`T0`...`TN`] [Element types] [__unspecified__]]
|
||||
]
|
||||
|
||||
[heading Model of]
|
||||
@ -616,6 +831,58 @@ __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]
|
||||
@ -913,6 +1180,54 @@ 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]
|
||||
@ -1047,6 +1362,54 @@ 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]
|
||||
@ -1239,6 +1602,53 @@ 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]
|
||||
@ -1387,6 +1797,48 @@ 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]
|
||||
@ -1558,6 +2010,44 @@ 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]
|
||||
|
@ -1,5 +1,6 @@
|
||||
[/==============================================================================
|
||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
||||
Copyright (C) 2001-2011 Joel de Guzman
|
||||
Copyright (C) 2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,5 +1,5 @@
|
||||
[/==============================================================================
|
||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
||||
Copyright (C) 2006 Tobias Schwinger
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,5 +1,6 @@
|
||||
[/==============================================================================
|
||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
||||
Copyright (C) 2001-2011 Joel de Guzman
|
||||
Copyright (C) 2006 Dan Marsden
|
||||
Copyright (C) 2010 Christopher Schmidt
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
@ -8,9 +9,9 @@
|
||||
===============================================================================/]
|
||||
[library Fusion
|
||||
[quickbook 1.3]
|
||||
[version 2.0]
|
||||
[version 2.1]
|
||||
[authors [de Guzman, Joel], [Marsden, Dan], [Schwinger, Tobias]]
|
||||
[copyright 2001 2002 2003 2004 2005 2006 2007 Joel de Guzman, Dan Marsden, Tobias Schwinger]
|
||||
[copyright 2001 2002 2003 2004 2005 2006 2011 Joel de Guzman, Dan Marsden, Tobias Schwinger]
|
||||
[purpose Statically Typed Heterogeneous Data Structures and Algorithms]
|
||||
[license
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
|
0
doc/html/images/alert.png
Executable file → Normal file
Before Width: | Height: | Size: 603 B After Width: | Height: | Size: 603 B |
0
doc/html/images/home.png
Executable file → Normal file
Before Width: | Height: | Size: 358 B After Width: | Height: | Size: 358 B |
0
doc/html/images/next.png
Executable file → Normal file
Before Width: | Height: | Size: 336 B After Width: | Height: | Size: 336 B |
0
doc/html/images/note.png
Executable file → Normal file
Before Width: | Height: | Size: 658 B After Width: | Height: | Size: 658 B |
0
doc/html/images/prev.png
Executable file → Normal file
Before Width: | Height: | Size: 334 B After Width: | Height: | Size: 334 B |
0
doc/html/images/smiley.png
Executable file → Normal file
Before Width: | Height: | Size: 867 B After Width: | Height: | Size: 867 B |
0
doc/html/images/tip.png
Executable file → Normal file
Before Width: | Height: | Size: 640 B After Width: | Height: | Size: 640 B |
0
doc/html/images/up.png
Executable file → Normal file
Before Width: | Height: | Size: 370 B After Width: | Height: | Size: 370 B |
@ -1,6 +1,6 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<head>
|
||||
<!-- Copyright (C) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
@ -8,9 +8,9 @@
|
||||
http://www.boost.org/LICENSE_1_0.txt) -->
|
||||
<title>Redirect to generated documentation</title>
|
||||
<meta http-equiv="refresh" content="0; URL=http://boost-sandbox.sourceforge.net/libs/fusion/doc/html/">
|
||||
</head>
|
||||
</head>
|
||||
<body>
|
||||
Automatic redirection failed, please go to
|
||||
<a href="http://boost-sandbox.sourceforge.net/libs/fusion/doc/html/">http://boost-sandbox.sourceforge.net/libs/fusion/doc/html/</a>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,5 +1,6 @@
|
||||
[/==============================================================================
|
||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
||||
Copyright (C) 2001-2011 Joel de Guzman
|
||||
Copyright (C) 2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,5 +1,6 @@
|
||||
[/==============================================================================
|
||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
||||
Copyright (C) 2001-2011 Joel de Guzman
|
||||
Copyright (C) 2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,5 +1,6 @@
|
||||
[/==============================================================================
|
||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
||||
Copyright (C) 2001-2011 Joel de Guzman
|
||||
Copyright (C) 2006 Dan Marsden
|
||||
Copyright (C) 2010 Christopher Schmidt
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
|
@ -1,5 +1,6 @@
|
||||
[/==============================================================================
|
||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
||||
Copyright (C) 2001-2011 Joel de Guzman
|
||||
Copyright (C) 2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,5 +1,6 @@
|
||||
[/==============================================================================
|
||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
||||
Copyright (C) 2001-2011 Joel de Guzman
|
||||
Copyright (C) 2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,5 +1,6 @@
|
||||
[/==============================================================================
|
||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
||||
Copyright (C) 2001-2011 Joel de Guzman
|
||||
Copyright (C) 2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,5 +1,6 @@
|
||||
[/==============================================================================
|
||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
||||
Copyright (C) 2001-2011 Joel de Guzman
|
||||
Copyright (C) 2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,5 +1,6 @@
|
||||
[/==============================================================================
|
||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
||||
Copyright (C) 2001-2011 Joel de Guzman
|
||||
Copyright (C) 2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -847,7 +848,7 @@ Performs an element by element swap of the elements in 2 sequences.
|
||||
|
||||
[table
|
||||
[[Parameters] [Requirement] [Description]]
|
||||
[[`seq1`, `seq2`][Models of __forward_sequence__][The sequences whos elements we wish to swap.]]
|
||||
[[`seq1`, `seq2`] [Models of __forward_sequence__][The sequences whos elements we wish to swap.]]
|
||||
]
|
||||
|
||||
[heading Expression Semantics]
|
||||
@ -1375,7 +1376,7 @@ Returns the actual element type associated with a Key from the __sequence__.
|
||||
|
||||
#include <boost/fusion/sequence/intrinsic/value_at_key.hpp>
|
||||
#include <boost/fusion/include/value_at_key.hpp>
|
||||
|
||||
|
||||
[heading Example]
|
||||
typedef __map__<__pair__<int, char>, __pair__<char, char>, __pair__<double, char> > mymap;
|
||||
BOOST_MPL_ASSERT((boost::is_same<__result_of_at_key__<mymap, int>::type, char>));
|
||||
|
@ -1,5 +1,6 @@
|
||||
[/==============================================================================
|
||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
||||
Copyright (C) 2001-2011 Joel de Guzman
|
||||
Copyright (C) 2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,5 +1,6 @@
|
||||
[/==============================================================================
|
||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
||||
Copyright (C) 2001-2011 Joel de Guzman
|
||||
Copyright (C) 2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,5 +1,6 @@
|
||||
[/==============================================================================
|
||||
Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
||||
Copyright (C) 2001-2011 Joel de Guzman
|
||||
Copyright (C) 2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -3,7 +3,7 @@
|
||||
Copyright (c) 2011 Nathan Ridge
|
||||
Copyright (c) 2006 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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)
|
||||
==============================================================================*/
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#include <tuple>
|
||||
#include <utility>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/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 std::tuple_element<N::value, seq_type> element;
|
||||
typedef typename std::tuple_element<N::value, seq_type>::type element;
|
||||
|
||||
typedef typename
|
||||
mpl::eval_if<
|
||||
mpl::if_<
|
||||
is_const<Sequence>
|
||||
, fusion::detail::cref_result<element>
|
||||
, fusion::detail::ref_result<element>
|
||||
, typename fusion::detail::cref_result<element>::type
|
||||
, typename fusion::detail::ref_result<element>::type
|
||||
>::type
|
||||
type;
|
||||
|
||||
|
@ -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/eval_if.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <tuple>
|
||||
#include <utility>
|
||||
|
||||
@ -48,12 +48,12 @@ namespace boost { namespace fusion
|
||||
template <typename Iterator>
|
||||
struct deref
|
||||
{
|
||||
typedef value_of<Iterator> element;
|
||||
typedef typename value_of<Iterator>::type element;
|
||||
typedef typename
|
||||
mpl::eval_if<
|
||||
mpl::if_<
|
||||
is_const<typename Iterator::tuple_type>
|
||||
, fusion::detail::cref_result<element>
|
||||
, fusion::detail::ref_result<element>
|
||||
, typename fusion::detail::cref_result<element>::type
|
||||
, typename fusion::detail::ref_result<element>::type
|
||||
>::type
|
||||
type;
|
||||
|
||||
|
@ -10,12 +10,6 @@
|
||||
#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;
|
||||
|
@ -78,6 +78,51 @@ namespace boost { namespace fusion
|
||||
, mpl::int_<(Last::is_last?1:0)>
|
||||
>::type
|
||||
{};
|
||||
|
||||
|
||||
template <typename Iterator, bool IsLast_>
|
||||
struct prior_impl
|
||||
{
|
||||
typedef typename Iterator::iterator_base_type base_type;
|
||||
|
||||
typedef typename
|
||||
result_of::prior<base_type>::type
|
||||
base_prior;
|
||||
|
||||
typedef pop_back_iterator<base_prior, false> type;
|
||||
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
return type(fusion::prior(i.iterator_base));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Iterator>
|
||||
struct prior_impl<Iterator, true>
|
||||
{
|
||||
// If this is the last iterator, we'll have to double back
|
||||
typedef typename Iterator::iterator_base_type base_type;
|
||||
|
||||
typedef typename
|
||||
result_of::prior<
|
||||
typename result_of::prior<base_type>::type
|
||||
>::type
|
||||
base_prior;
|
||||
|
||||
typedef pop_back_iterator<base_prior, false> type;
|
||||
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
return type(fusion::prior(
|
||||
fusion::prior(i.iterator_base)));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Iterator>
|
||||
struct prior : prior_impl<Iterator, Iterator::is_last>
|
||||
{};
|
||||
};
|
||||
|
||||
namespace result_of
|
||||
|
@ -22,6 +22,25 @@
|
||||
#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>
|
||||
@ -29,93 +48,67 @@
|
||||
#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/mpl/int.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/type_traits/is_convertible.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 {
|
||||
|
||||
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)> >
|
||||
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...>>
|
||||
{
|
||||
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 typename detail::deque_keyed_values<Head, Tail...>::type base;
|
||||
typedef mpl::int_<(sizeof ...(Tail) + 1)> 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::int_<mpl::int_<((size::value == 0) ? 0 : -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 <typename ...Elements>
|
||||
deque(deque<Elements...> const& seq)
|
||||
: base(seq)
|
||||
{}
|
||||
|
||||
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)
|
||||
{}
|
||||
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<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 Sequence>
|
||||
explicit deque(Sequence const& seq
|
||||
, typename disable_if<is_convertible<Sequence, Head> >::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)
|
||||
template <typename ...Elements>
|
||||
deque& operator=(deque<Elements...> 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
|
||||
|
@ -11,40 +11,26 @@
|
||||
#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>
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// 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>
|
||||
#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
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// C++11 interface
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct void_;
|
||||
|
||||
template<
|
||||
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
|
||||
FUSION_MAX_DEQUE_SIZE, typename T, void_)>
|
||||
template <typename ...T>
|
||||
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
|
||||
|
125
include/boost/fusion/container/deque/detail/cpp03_deque.hpp
Normal file
@ -0,0 +1,125 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -0,0 +1,54 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -0,0 +1,106 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -0,0 +1,56 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -8,9 +8,7 @@
|
||||
#if !defined(BOOST_FUSION_DEQUE_DETAIL_KEYED_ELEMENT_26112006_1330)
|
||||
#define BOOST_FUSION_DEQUE_DETAIL_KEYED_ELEMENT_26112006_1330
|
||||
|
||||
#include <boost/type_traits/add_reference.hpp>
|
||||
#include <boost/type_traits/add_const.hpp>
|
||||
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/iterator/next.hpp>
|
||||
|
||||
@ -59,17 +57,17 @@ namespace detail {
|
||||
return *this;
|
||||
}
|
||||
|
||||
typename add_reference<typename add_const<Value>::type>::type get(Key) const
|
||||
typename cref_result<Value>::type get(Key) const
|
||||
{
|
||||
return value_;
|
||||
}
|
||||
|
||||
typename add_reference<Value>::type get(Key)
|
||||
typename ref_result<Value>::type get(Key)
|
||||
{
|
||||
return value_;
|
||||
}
|
||||
|
||||
keyed_element(typename add_reference<typename add_const<Value>::type>::type value, Rest const& rest)
|
||||
keyed_element(typename call_param<Value>::type value, Rest const& rest)
|
||||
: Rest(rest), value_(value)
|
||||
{}
|
||||
|
||||
|
@ -88,7 +88,7 @@ namespace boost { namespace fusion
|
||||
template <typename Sequence>
|
||||
cons(
|
||||
Sequence const& seq
|
||||
, typename disable_if<
|
||||
, typename boost::disable_if<
|
||||
mpl::or_<
|
||||
is_convertible<Sequence, cons> // use copy ctor instead
|
||||
, is_convertible<Sequence, Car> // use copy to car instead
|
||||
@ -119,7 +119,7 @@ namespace boost { namespace fusion
|
||||
}
|
||||
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, Car>, cons&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, Car>, cons&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type Iterator;
|
||||
|
@ -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/eval_if.hpp>
|
||||
#include <boost/mpl/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 detail::cons_deref<
|
||||
typename detail::cons_advance<Sequence, N::value>::type>
|
||||
typedef typename detail::cons_deref<
|
||||
typename detail::cons_advance<Sequence, N::value>::type>::type
|
||||
element;
|
||||
|
||||
typedef typename
|
||||
mpl::eval_if<
|
||||
mpl::if_<
|
||||
is_const<Sequence>
|
||||
, detail::cref_result<element>
|
||||
, detail::ref_result<element>
|
||||
, typename detail::cref_result<element>::type
|
||||
, typename detail::ref_result<element>::type
|
||||
>::type
|
||||
type;
|
||||
|
||||
|
61
include/boost/fusion/container/map/detail/at_impl.hpp
Normal file
@ -0,0 +1,61 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2011 Brandon Kohn
|
||||
|
||||
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_MAP_DETAIL_AT_IMPL_HPP)
|
||||
#define BOOST_FUSION_MAP_DETAIL_AT_IMPL_HPP
|
||||
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/mpl/at.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct map_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct at_impl;
|
||||
|
||||
template <>
|
||||
struct at_impl<map_tag>
|
||||
{
|
||||
template <typename Sequence, typename N>
|
||||
struct apply
|
||||
{
|
||||
typedef typename
|
||||
mpl::at<typename Sequence::storage_type::types, N>::type
|
||||
element;
|
||||
typedef typename detail::ref_result<element>::type type;
|
||||
|
||||
static type
|
||||
call(Sequence& m)
|
||||
{
|
||||
return m.get_data().at_impl(N());
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Sequence, typename N>
|
||||
struct apply <Sequence const, N>
|
||||
{
|
||||
typedef typename
|
||||
mpl::at<typename Sequence::storage_type::types, N>::type
|
||||
element;
|
||||
typedef typename detail::cref_result<element>::type type;
|
||||
|
||||
static type
|
||||
call(Sequence const& m)
|
||||
{
|
||||
return m.get_data().at_impl(N());
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif //BOOST_FUSION_MAP_DETAIL_AT_IMPL_HPP
|
@ -12,8 +12,7 @@
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/identity.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
|
||||
namespace boost { namespace fusion { namespace extension
|
||||
{
|
||||
@ -29,10 +28,10 @@ namespace boost { namespace fusion { namespace extension
|
||||
typedef typename result_of::value_of<It>::type::second_type data;
|
||||
|
||||
typedef typename
|
||||
mpl::eval_if<
|
||||
mpl::if_<
|
||||
is_const<typename It::seq_type>
|
||||
, detail::cref_result<mpl::identity<data> >
|
||||
, detail::ref_result<mpl::identity<data> >
|
||||
, typename detail::cref_result<data>::type
|
||||
, typename detail::ref_result<data>::type
|
||||
>::type
|
||||
type;
|
||||
|
||||
|
@ -13,7 +13,7 @@ namespace boost { namespace fusion
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
|
||||
struct map : sequence_base<map<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> >
|
||||
{
|
||||
struct category : forward_traversal_tag, associative_tag {};
|
||||
struct category : random_access_traversal_tag, associative_tag {};
|
||||
typedef map_tag fusion_tag;
|
||||
typedef fusion_sequence_tag tag;
|
||||
typedef mpl::false_ is_view;
|
||||
|
@ -13,7 +13,7 @@ namespace boost { namespace fusion
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19>
|
||||
struct map : sequence_base<map<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19> >
|
||||
{
|
||||
struct category : forward_traversal_tag, associative_tag {};
|
||||
struct category : random_access_traversal_tag, associative_tag {};
|
||||
typedef map_tag fusion_tag;
|
||||
typedef fusion_sequence_tag tag;
|
||||
typedef mpl::false_ is_view;
|
||||
|
@ -13,7 +13,7 @@ namespace boost { namespace fusion
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29>
|
||||
struct map : sequence_base<map<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29> >
|
||||
{
|
||||
struct category : forward_traversal_tag, associative_tag {};
|
||||
struct category : random_access_traversal_tag, associative_tag {};
|
||||
typedef map_tag fusion_tag;
|
||||
typedef fusion_sequence_tag tag;
|
||||
typedef mpl::false_ is_view;
|
||||
|
@ -13,7 +13,7 @@ namespace boost { namespace fusion
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39>
|
||||
struct map : sequence_base<map<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39> >
|
||||
{
|
||||
struct category : forward_traversal_tag, associative_tag {};
|
||||
struct category : random_access_traversal_tag, associative_tag {};
|
||||
typedef map_tag fusion_tag;
|
||||
typedef fusion_sequence_tag tag;
|
||||
typedef mpl::false_ is_view;
|
||||
|
@ -13,7 +13,7 @@ namespace boost { namespace fusion
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46 , typename T47 , typename T48 , typename T49>
|
||||
struct map : sequence_base<map<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 , T46 , T47 , T48 , T49> >
|
||||
{
|
||||
struct category : forward_traversal_tag, associative_tag {};
|
||||
struct category : random_access_traversal_tag, associative_tag {};
|
||||
typedef map_tag fusion_tag;
|
||||
typedef fusion_sequence_tag tag;
|
||||
typedef mpl::false_ is_view;
|
||||
|
34
include/boost/fusion/container/map/detail/value_at_impl.hpp
Normal file
@ -0,0 +1,34 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2011 Brandon Kohn
|
||||
|
||||
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_MAP_DETAIL_VALUE_AT_IMPL_HPP)
|
||||
#define BOOST_FUSION_MAP_DETAIL_VALUE_AT_IMPL_HPP
|
||||
|
||||
#include <boost/mpl/at.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct map_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct value_at_impl;
|
||||
|
||||
template <>
|
||||
struct value_at_impl<map_tag>
|
||||
{
|
||||
template <typename Sequence, typename N>
|
||||
struct apply
|
||||
{
|
||||
typedef typename mpl::at<typename Sequence::storage_type::types, N>::type type;
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif //BOOST_FUSION_MAP_DETAIL_VALUE_AT_IMPL_HPP
|
@ -11,6 +11,8 @@
|
||||
#include <boost/fusion/support/category_of.hpp>
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
#include <boost/fusion/container/map/map_fwd.hpp>
|
||||
#include <boost/fusion/container/map/detail/at_impl.hpp>
|
||||
#include <boost/fusion/container/map/detail/value_at_impl.hpp>
|
||||
#include <boost/fusion/container/map/detail/begin_impl.hpp>
|
||||
#include <boost/fusion/container/map/detail/end_impl.hpp>
|
||||
#include <boost/fusion/container/map/detail/value_of_impl.hpp>
|
||||
@ -50,7 +52,7 @@ namespace boost { namespace fusion
|
||||
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE, typename T)>
|
||||
struct map : sequence_base<map<BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE, T)> >
|
||||
{
|
||||
struct category : forward_traversal_tag, associative_tag {};
|
||||
struct category : random_access_traversal_tag, associative_tag {};
|
||||
|
||||
typedef map_tag fusion_tag;
|
||||
typedef fusion_sequence_tag tag; // this gets picked up by MPL
|
||||
|
@ -27,7 +27,7 @@ namespace boost { namespace fusion
|
||||
template <typename Sequence, typename N>
|
||||
struct apply
|
||||
{
|
||||
typedef mpl::at<typename Sequence::types, N> element;
|
||||
typedef typename mpl::at<typename Sequence::types, N>::type 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 mpl::at<typename Sequence::types, N> element;
|
||||
typedef typename mpl::at<typename Sequence::types, N>::type element;
|
||||
typedef typename detail::cref_result<element>::type type;
|
||||
|
||||
static type
|
||||
|
@ -10,6 +10,7 @@
|
||||
#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
|
||||
{
|
||||
@ -29,14 +30,14 @@ namespace boost { namespace fusion
|
||||
typedef typename Iterator::vector vector;
|
||||
typedef typename Iterator::index index;
|
||||
typedef typename mpl::at<
|
||||
typename vector::types, index>
|
||||
typename vector::types, index>::type
|
||||
element;
|
||||
|
||||
typedef typename
|
||||
mpl::eval_if<
|
||||
mpl::if_<
|
||||
is_const<vector>
|
||||
, fusion::detail::cref_result<element>
|
||||
, fusion::detail::ref_result<element>
|
||||
, typename fusion::detail::cref_result<element>::type
|
||||
, typename fusion::detail::ref_result<element>::type
|
||||
>::type
|
||||
type;
|
||||
|
||||
|
@ -61,7 +61,7 @@ namespace boost { namespace fusion
|
||||
template <typename Sequence>
|
||||
vector1(
|
||||
Sequence const& seq
|
||||
, typename disable_if<is_convertible<Sequence, T0> >::type* = 0
|
||||
, typename boost::disable_if<is_convertible<Sequence, T0> >::type* = 0
|
||||
)
|
||||
: base_type(base_type::init_from_sequence(seq)) {}
|
||||
template <typename U0>
|
||||
@ -72,7 +72,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -157,7 +157,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -242,7 +242,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -327,7 +327,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -412,7 +412,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -497,7 +497,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -582,7 +582,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -667,7 +667,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -752,7 +752,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -837,7 +837,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
|
@ -73,7 +73,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -158,7 +158,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -243,7 +243,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -328,7 +328,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -413,7 +413,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -498,7 +498,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -583,7 +583,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -668,7 +668,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -753,7 +753,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -838,7 +838,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
|
@ -73,7 +73,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -158,7 +158,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -243,7 +243,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -328,7 +328,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -413,7 +413,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -498,7 +498,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -583,7 +583,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -668,7 +668,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -753,7 +753,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -838,7 +838,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
|
@ -73,7 +73,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -158,7 +158,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -243,7 +243,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -328,7 +328,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -413,7 +413,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -498,7 +498,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -583,7 +583,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -668,7 +668,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -753,7 +753,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -838,7 +838,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
|
@ -73,7 +73,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -158,7 +158,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -243,7 +243,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -328,7 +328,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -413,7 +413,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -498,7 +498,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -583,7 +583,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -668,7 +668,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -753,7 +753,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
@ -838,7 +838,7 @@ namespace boost { namespace fusion
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
|
@ -36,7 +36,7 @@ namespace boost { namespace fusion
|
||||
: vec(rhs.vec) {}
|
||||
template <typename Sequence>
|
||||
vector(Sequence const& rhs)
|
||||
: vec(rhs) {}
|
||||
: vec(BOOST_FUSION_VECTOR_COPY_INIT()) {}
|
||||
|
||||
|
||||
|
||||
@ -116,6 +116,7 @@ namespace boost { namespace fusion
|
||||
return vec.at_impl(mpl::int_<I::value>());
|
||||
}
|
||||
private:
|
||||
BOOST_FUSION_VECTOR_CTOR_HELPER()
|
||||
vector_n vec;
|
||||
};
|
||||
}}
|
||||
|
@ -36,7 +36,7 @@ namespace boost { namespace fusion
|
||||
: vec(rhs.vec) {}
|
||||
template <typename Sequence>
|
||||
vector(Sequence const& rhs)
|
||||
: vec(rhs) {}
|
||||
: vec(BOOST_FUSION_VECTOR_COPY_INIT()) {}
|
||||
|
||||
|
||||
|
||||
@ -136,6 +136,7 @@ namespace boost { namespace fusion
|
||||
return vec.at_impl(mpl::int_<I::value>());
|
||||
}
|
||||
private:
|
||||
BOOST_FUSION_VECTOR_CTOR_HELPER()
|
||||
vector_n vec;
|
||||
};
|
||||
}}
|
||||
|
@ -36,7 +36,7 @@ namespace boost { namespace fusion
|
||||
: vec(rhs.vec) {}
|
||||
template <typename Sequence>
|
||||
vector(Sequence const& rhs)
|
||||
: vec(rhs) {}
|
||||
: vec(BOOST_FUSION_VECTOR_COPY_INIT()) {}
|
||||
|
||||
|
||||
|
||||
@ -156,6 +156,7 @@ namespace boost { namespace fusion
|
||||
return vec.at_impl(mpl::int_<I::value>());
|
||||
}
|
||||
private:
|
||||
BOOST_FUSION_VECTOR_CTOR_HELPER()
|
||||
vector_n vec;
|
||||
};
|
||||
}}
|
||||
|
@ -36,7 +36,7 @@ namespace boost { namespace fusion
|
||||
: vec(rhs.vec) {}
|
||||
template <typename Sequence>
|
||||
vector(Sequence const& rhs)
|
||||
: vec(rhs) {}
|
||||
: vec(BOOST_FUSION_VECTOR_COPY_INIT()) {}
|
||||
|
||||
|
||||
|
||||
@ -176,6 +176,7 @@ namespace boost { namespace fusion
|
||||
return vec.at_impl(mpl::int_<I::value>());
|
||||
}
|
||||
private:
|
||||
BOOST_FUSION_VECTOR_CTOR_HELPER()
|
||||
vector_n vec;
|
||||
};
|
||||
}}
|
||||
|
@ -36,7 +36,7 @@ namespace boost { namespace fusion
|
||||
: vec(rhs.vec) {}
|
||||
template <typename Sequence>
|
||||
vector(Sequence const& rhs)
|
||||
: vec(rhs) {}
|
||||
: vec(BOOST_FUSION_VECTOR_COPY_INIT()) {}
|
||||
|
||||
|
||||
|
||||
@ -196,6 +196,7 @@ namespace boost { namespace fusion
|
||||
return vec.at_impl(mpl::int_<I::value>());
|
||||
}
|
||||
private:
|
||||
BOOST_FUSION_VECTOR_CTOR_HELPER()
|
||||
vector_n vec;
|
||||
};
|
||||
}}
|
||||
|
@ -104,7 +104,7 @@
|
||||
BOOST_PP_CAT(vector, N)(
|
||||
Sequence const& seq
|
||||
#if (N == 1)
|
||||
, typename disable_if<is_convertible<Sequence, T0> >::type* /*dummy*/ = 0
|
||||
, typename boost::disable_if<is_convertible<Sequence, T0> >::type* /*dummy*/ = 0
|
||||
#endif
|
||||
)
|
||||
: base_type(base_type::init_from_sequence(seq)) {}
|
||||
@ -118,7 +118,7 @@
|
||||
}
|
||||
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
|
@ -17,6 +17,38 @@
|
||||
#include <boost/type_traits/is_base_of.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
#if !defined(__WAVE__)
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600)
|
||||
|
||||
#define BOOST_FUSION_VECTOR_COPY_INIT() \
|
||||
ctor_helper(rhs, is_base_of<vector, Sequence>()) \
|
||||
|
||||
#define BOOST_FUSION_VECTOR_CTOR_HELPER() \
|
||||
static vector_n const& \
|
||||
ctor_helper(vector const& rhs, mpl::true_) \
|
||||
{ \
|
||||
return rhs.vec; \
|
||||
} \
|
||||
\
|
||||
template <typename T> \
|
||||
static T const& \
|
||||
ctor_helper(T const& rhs, mpl::false_) \
|
||||
{ \
|
||||
return rhs; \
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#define BOOST_FUSION_VECTOR_COPY_INIT() \
|
||||
rhs \
|
||||
|
||||
#define BOOST_FUSION_VECTOR_CTOR_HELPER()
|
||||
|
||||
#endif
|
||||
|
||||
#endif // !defined(__WAVE__)
|
||||
|
||||
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
|
||||
#include <boost/fusion/container/vector/detail/preprocessed/vector.hpp>
|
||||
#else
|
||||
@ -76,11 +108,7 @@ namespace boost { namespace fusion
|
||||
|
||||
template <typename Sequence>
|
||||
vector(Sequence const& rhs)
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600)
|
||||
: vec(ctor_helper(rhs, is_base_of<vector, Sequence>())) {}
|
||||
#else
|
||||
: vec(rhs) {}
|
||||
#endif
|
||||
: vec(BOOST_FUSION_VECTOR_COPY_INIT()) {}
|
||||
|
||||
// Expand a couple of forwarding constructors for arguments
|
||||
// of type (T0), (T0, T1), (T0, T1, T2) etc. Example:
|
||||
@ -149,21 +177,7 @@ namespace boost { namespace fusion
|
||||
|
||||
private:
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600)
|
||||
static vector_n const&
|
||||
ctor_helper(vector const& rhs, mpl::true_)
|
||||
{
|
||||
return rhs.vec;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static T const&
|
||||
ctor_helper(T const& rhs, mpl::false_)
|
||||
{
|
||||
return rhs;
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOST_FUSION_VECTOR_CTOR_HELPER()
|
||||
vector_n vec;
|
||||
};
|
||||
}}
|
||||
|
0
include/boost/fusion/functional/adapter/unfused.hpp
Executable file → Normal file
@ -74,7 +74,7 @@ namespace boost { namespace fusion
|
||||
{
|
||||
template <typename Iter1, typename Iter2>
|
||||
inline typename
|
||||
enable_if<
|
||||
boost::enable_if<
|
||||
mpl::and_<is_fusion_iterator<Iter1>, is_fusion_iterator<Iter2> >
|
||||
, bool
|
||||
>::type
|
||||
@ -85,7 +85,7 @@ namespace boost { namespace fusion
|
||||
|
||||
template <typename Iter1, typename Iter2>
|
||||
inline typename
|
||||
enable_if<
|
||||
boost::enable_if<
|
||||
mpl::and_<is_fusion_iterator<Iter1>, is_fusion_iterator<Iter2> >
|
||||
, bool
|
||||
>::type
|
||||
|
@ -37,7 +37,7 @@ namespace boost { namespace fusion
|
||||
{
|
||||
template <typename Seq1, typename Seq2>
|
||||
inline typename
|
||||
enable_if<
|
||||
boost::enable_if<
|
||||
traits::enable_equality<Seq1, Seq2>
|
||||
, bool
|
||||
>::type
|
||||
|
@ -37,7 +37,7 @@ namespace boost { namespace fusion
|
||||
{
|
||||
template <typename Seq1, typename Seq2>
|
||||
inline typename
|
||||
enable_if<
|
||||
boost::enable_if<
|
||||
traits::enable_comparison<Seq1, Seq2>
|
||||
, bool
|
||||
>::type
|
||||
|
@ -37,7 +37,7 @@ namespace boost { namespace fusion
|
||||
{
|
||||
template <typename Seq1, typename Seq2>
|
||||
inline typename
|
||||
enable_if<
|
||||
boost::enable_if<
|
||||
traits::enable_comparison<Seq1, Seq2>
|
||||
, bool
|
||||
>::type
|
||||
|
@ -28,7 +28,7 @@ namespace boost { namespace fusion
|
||||
{
|
||||
template <typename Seq1, typename Seq2>
|
||||
inline typename
|
||||
enable_if<
|
||||
boost::enable_if<
|
||||
traits::enable_comparison<Seq1, Seq2>
|
||||
, bool
|
||||
>::type
|
||||
|
@ -65,7 +65,7 @@ namespace boost { namespace fusion
|
||||
|
||||
template <typename Seq1, typename Seq2>
|
||||
inline typename
|
||||
enable_if<
|
||||
boost::enable_if<
|
||||
traits::enable_comparison<Seq1, Seq2>
|
||||
, bool
|
||||
>::type
|
||||
|
@ -40,7 +40,7 @@ namespace boost { namespace fusion
|
||||
{
|
||||
template <typename Seq1, typename Seq2>
|
||||
inline typename
|
||||
enable_if<
|
||||
boost::enable_if<
|
||||
traits::enable_equality<Seq1, Seq2>
|
||||
, bool
|
||||
>::type
|
||||
|
@ -27,7 +27,7 @@ namespace boost { namespace fusion
|
||||
{
|
||||
template <typename Sequence>
|
||||
inline typename
|
||||
enable_if<
|
||||
boost::enable_if<
|
||||
fusion::traits::is_sequence<Sequence>
|
||||
, std::istream&
|
||||
>::type
|
||||
|
@ -29,7 +29,7 @@ namespace boost { namespace fusion
|
||||
{
|
||||
template <typename Sequence>
|
||||
inline typename
|
||||
enable_if<
|
||||
boost::enable_if<
|
||||
fusion::traits::is_sequence<Sequence>
|
||||
, std::ostream&
|
||||
>::type
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <boost/fusion/support/deduce.hpp>
|
||||
#include <boost/fusion/container/vector/convert.hpp>
|
||||
#include <boost/fusion/view/transform_view.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace fusion { namespace traits
|
||||
@ -29,6 +30,13 @@ namespace boost { namespace fusion { namespace traits
|
||||
struct result< Self(T) >
|
||||
: fusion::traits::deduce<T>
|
||||
{ };
|
||||
|
||||
// never called, but needed for decltype-based result_of (C++0x)
|
||||
#ifndef BOOST_NO_RVALUE_REFERENCES
|
||||
template <typename T>
|
||||
typename result< deducer(T) >::type
|
||||
operator()(T&&) const;
|
||||
#endif
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ namespace boost { namespace fusion { namespace detail
|
||||
template <typename T>
|
||||
struct ref_result
|
||||
{
|
||||
typedef typename add_reference<typename T::type>::type type;
|
||||
typedef typename add_reference<T>::type type;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
@ -23,7 +23,7 @@ namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
typedef typename
|
||||
add_reference<
|
||||
typename add_const<typename T::type>::type
|
||||
typename add_const<T>::type
|
||||
>::type
|
||||
type;
|
||||
};
|
||||
|
@ -46,28 +46,29 @@ namespace boost { namespace fusion
|
||||
namespace detail
|
||||
{
|
||||
BOOST_MPL_HAS_XXX_TRAIT_DEF(fusion_tag)
|
||||
|
||||
template <typename Sequence, typename Active>
|
||||
struct tag_of_impl
|
||||
: mpl::if_<fusion::detail::is_mpl_sequence<Sequence>,
|
||||
mpl::identity<mpl_sequence_tag>,
|
||||
mpl::identity<non_fusion_tag> >::type
|
||||
{};
|
||||
|
||||
template <typename Sequence>
|
||||
struct tag_of_impl<
|
||||
Sequence
|
||||
, typename boost::enable_if<detail::has_fusion_tag<Sequence> >::type>
|
||||
{
|
||||
typedef typename Sequence::fusion_tag type;
|
||||
};
|
||||
}
|
||||
|
||||
namespace traits
|
||||
{
|
||||
template <typename Sequence, typename Active>
|
||||
struct tag_of_fallback
|
||||
{
|
||||
typedef non_fusion_tag type;
|
||||
};
|
||||
|
||||
template <typename Sequence, typename Active>
|
||||
struct tag_of
|
||||
: mpl::if_< fusion::detail::is_mpl_sequence<Sequence>,
|
||||
mpl::identity<mpl_sequence_tag>,
|
||||
tag_of_fallback<Sequence> >::type
|
||||
: boost::fusion::detail::tag_of_impl<Sequence, Active>
|
||||
{};
|
||||
|
||||
template <typename Sequence>
|
||||
struct tag_of<Sequence, typename boost::enable_if<detail::has_fusion_tag<Sequence> >::type>
|
||||
{
|
||||
typedef typename Sequence::fusion_tag type;
|
||||
};
|
||||
}
|
||||
|
||||
namespace detail
|
||||
|
@ -12,9 +12,6 @@ namespace boost { namespace fusion
|
||||
{
|
||||
namespace traits
|
||||
{
|
||||
template <typename Sequence, typename Active = void>
|
||||
struct tag_of_fallback;
|
||||
|
||||
template<typename T, typename Active = void>
|
||||
struct tag_of;
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
#if !defined(FUSION_STRICTEST_TRAVERSAL_20060123_2101)
|
||||
#define FUSION_STRICTEST_TRAVERSAL_20060123_2101
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/mpl/or.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/fusion/support/category_of.hpp>
|
||||
@ -53,6 +54,13 @@ namespace boost { namespace fusion
|
||||
|
||||
typedef typename stricter_traversal<tag1,tag2>::type type;
|
||||
};
|
||||
|
||||
// never called, but needed for decltype-based result_of (C++0x)
|
||||
#ifndef BOOST_NO_RVALUE_REFERENCES
|
||||
template<typename StrictestSoFar, typename Next>
|
||||
typename result<strictest_traversal_impl(StrictestSoFar, Next)>::type
|
||||
operator()(StrictestSoFar&&, Next&&) const;
|
||||
#endif
|
||||
};
|
||||
|
||||
template<typename Sequence>
|
||||
|
@ -33,7 +33,7 @@ namespace boost { namespace fusion
|
||||
static type
|
||||
call(Seq& s)
|
||||
{
|
||||
return * advance<N>(s.first);
|
||||
return * fusion::advance<N>(s.first);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
@ -29,11 +29,28 @@
|
||||
// - All other ranges point to ranges
|
||||
// - The front of each range in the stack (besides the
|
||||
// topmost) is the range above it
|
||||
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
template <typename First, typename Last>
|
||||
struct iterator_range;
|
||||
|
||||
namespace result_of
|
||||
{
|
||||
template <typename Sequence, typename T>
|
||||
struct push_back;
|
||||
|
||||
template <typename Sequence, typename T>
|
||||
struct push_front;
|
||||
}
|
||||
|
||||
template <typename Sequence, typename T>
|
||||
typename result_of::push_back<Sequence const, T>::type
|
||||
push_back(Sequence const& seq, T const& x);
|
||||
|
||||
template <typename Sequence, typename T>
|
||||
typename result_of::push_front<Sequence const, T>::type
|
||||
push_front(Sequence const& seq, T const& x);
|
||||
}}
|
||||
|
||||
namespace boost { namespace fusion { namespace detail
|
||||
@ -117,7 +134,7 @@ namespace boost { namespace fusion { namespace detail
|
||||
segment_sequence<
|
||||
typename result_of::push_front<
|
||||
rest_type const
|
||||
, typename recurse::type
|
||||
, typename recurse::type
|
||||
>::type
|
||||
>
|
||||
type;
|
||||
@ -184,7 +201,7 @@ namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
return stack.cdr;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
//auto make_segment_sequence_back(stack_end)
|
||||
//{
|
||||
@ -260,7 +277,7 @@ namespace boost { namespace fusion { namespace detail
|
||||
segment_sequence<
|
||||
typename result_of::push_back<
|
||||
rest_type const
|
||||
, typename recurse::type
|
||||
, typename recurse::type
|
||||
>::type
|
||||
>
|
||||
type;
|
||||
@ -328,7 +345,7 @@ namespace boost { namespace fusion { namespace detail
|
||||
return stack.cdr;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//auto make_segmented_range_reduce(stack_begin, stack_end)
|
||||
//{
|
||||
// if (size(stack_begin) == 1 && size(stack_end) == 1)
|
||||
@ -373,7 +390,7 @@ namespace boost { namespace fusion { namespace detail
|
||||
template <
|
||||
typename StackBegin
|
||||
, typename StackEnd
|
||||
, bool SameSegment =
|
||||
, bool SameSegment =
|
||||
result_of::equal_to<
|
||||
typename StackBegin::car_type::begin_type
|
||||
, typename StackEnd::car_type::begin_type
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2009 Hartmut Kaiser
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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)
|
||||
==============================================================================*/
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
namespace boost { namespace fusion { namespace result_of
|
||||
{
|
||||
template <typename Sequence
|
||||
, BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(FUSION_MAX_VECTOR_SIZE, int I, LONG_MAX)>
|
||||
, BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(FUSION_MAX_VECTOR_SIZE, int I, INT_MAX)>
|
||||
struct as_nview
|
||||
{
|
||||
typedef mpl::vector_c<
|
||||
|
@ -23,6 +23,8 @@
|
||||
#include <boost/fusion/container/vector.hpp>
|
||||
#include <boost/fusion/view/transform_view.hpp>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace detail
|
||||
@ -35,12 +37,21 @@ namespace boost { namespace fusion
|
||||
template<typename U>
|
||||
struct result<addref(U)> : add_reference<U> {};
|
||||
|
||||
#ifdef BOOST_NO_RVALUE_REFERENCES
|
||||
template <typename T>
|
||||
typename add_reference<T>::type
|
||||
operator()(T& x) const
|
||||
{
|
||||
return x;
|
||||
}
|
||||
#else
|
||||
template <typename T>
|
||||
typename result<addref(T)>::type
|
||||
operator()(T&& x) const
|
||||
{
|
||||
return x;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
struct addconstref
|
||||
|
@ -62,7 +62,7 @@ namespace boost { namespace fusion {
|
||||
|
||||
template<typename Seq>
|
||||
typename result<endpoints(Seq const&)>::type
|
||||
operator()(Seq const& seq)
|
||||
operator()(Seq const& seq) const
|
||||
{
|
||||
return fusion::advance<M>(fusion::begin(seq));
|
||||
}
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/identity.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
namespace boost { namespace fusion {
|
||||
|
||||
@ -35,6 +36,13 @@ namespace boost { namespace fusion {
|
||||
mpl::identity<unused_type>,
|
||||
result_of::value_at<typename remove_reference<Seq>::type, N> >
|
||||
{};
|
||||
|
||||
// never called, but needed for decltype-based result_of (C++0x)
|
||||
#ifndef BOOST_NO_RVALUE_REFERENCES
|
||||
template<typename Seq>
|
||||
typename result<poly_value_at(Seq)>::type
|
||||
operator()(Seq&&) const;
|
||||
#endif
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/identity.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
@ -34,6 +35,13 @@ namespace boost { namespace fusion
|
||||
mpl::identity<unused_type>,
|
||||
result_of::value_of<It> >
|
||||
{};
|
||||
|
||||
// never called, but needed for decltype-based result_of (C++0x)
|
||||
#ifndef BOOST_NO_RVALUE_REFERENCES
|
||||
template<typename It>
|
||||
typename result<poly_value_of(It)>::type
|
||||
operator()(It&&) const;
|
||||
#endif
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -37,6 +37,8 @@
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
#include <boost/type_traits/is_reference.hpp>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
namespace boost { namespace fusion {
|
||||
|
||||
namespace detail
|
||||
@ -64,6 +66,13 @@ namespace boost { namespace fusion {
|
||||
result_of::size<SeqClass>,
|
||||
mpl::int_<high_int> >::type type;
|
||||
};
|
||||
|
||||
// never called, but needed for decltype-based result_of (C++0x)
|
||||
#ifndef BOOST_NO_RVALUE_REFERENCES
|
||||
template<typename Seq>
|
||||
typename result<seq_ref_size(Seq)>::type
|
||||
operator()(Seq&&) const;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct poly_min
|
||||
@ -78,6 +87,13 @@ namespace boost { namespace fusion {
|
||||
typedef typename remove_reference<Rhs>::type rhs;
|
||||
typedef typename mpl::min<lhs, rhs>::type type;
|
||||
};
|
||||
|
||||
// never called, but needed for decltype-based result_of (C++0x)
|
||||
#ifndef BOOST_NO_RVALUE_REFERENCES
|
||||
template<typename Lhs, typename Rhs>
|
||||
typename result<poly_min(Lhs, Rhs)>::type
|
||||
operator()(Lhs&&, Rhs&&) const;
|
||||
#endif
|
||||
};
|
||||
|
||||
template<typename Sequences>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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)
|
||||
==============================================================================*/
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
@ -15,6 +15,9 @@
|
||||
#include <boost/fusion/algorithm/transformation/pop_back.hpp>
|
||||
#include <boost/fusion/algorithm/transformation/push_back.hpp>
|
||||
#include <boost/fusion/algorithm/query/find.hpp>
|
||||
#include <boost/fusion/include/back.hpp>
|
||||
#include <boost/fusion/include/array.hpp>
|
||||
#include <boost/array.hpp>
|
||||
#include <boost/mpl/vector_c.hpp>
|
||||
|
||||
int
|
||||
@ -85,12 +88,17 @@ main()
|
||||
auto i1 = find<int>(popv);
|
||||
auto i2 = find<double>(pop);
|
||||
|
||||
assert(i1 != end(pop));
|
||||
assert(i2 != end(pop));
|
||||
assert(i1 != i2);
|
||||
BOOST_TEST(i1 != end(pop));
|
||||
BOOST_TEST(i2 != end(pop));
|
||||
BOOST_TEST(i1 != i2);
|
||||
}
|
||||
#endif
|
||||
|
||||
{
|
||||
boost::array<std::size_t, 2> a = { 10, 50 };
|
||||
BOOST_TEST(back(pop_back(a)) == 10);
|
||||
}
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
|
@ -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:
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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)
|
||||
==============================================================================*/
|
||||
#include <string>
|
||||
@ -113,7 +113,7 @@ void test()
|
||||
BOOST_TEST(*next(next(next(i))) == s);
|
||||
|
||||
next(next(next(next(i)))); // end
|
||||
|
||||
|
||||
#ifdef FUSION_TEST_FAIL
|
||||
next(next(next(next(next(i))))); // past the end: must not compile
|
||||
#endif
|
||||
|
@ -2,7 +2,7 @@
|
||||
Copyright (c) 1999-2003 Jaakko Jarvi
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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)
|
||||
==============================================================================*/
|
||||
#include <boost/fusion/tuple.hpp>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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)
|
||||
==============================================================================*/
|
||||
#include <boost/fusion/container/vector/vector.hpp>
|
||||
|