Compare commits

..

92 Commits

Author SHA1 Message Date
403021caef Create branch to keep WIP patch for modular build.
[SVN r85883]
2013-09-25 08:12:19 +00:00
3b24ed44f8 specialization of convert_impl for map_tag, refs #8759
[SVN r84937]
2013-07-02 02:10:04 +00:00
7922147716 update fusion Nil template parameters to Nil_ to make ObjC happy. trac #5010
[SVN r84441]
2013-05-23 01:02:52 +00:00
13d00bd6c2 minor updates to fusion docs
[SVN r84440]
2013-05-22 23:28:12 +00:00
56d0d48eb9 added static assert when N is > size of vector
[SVN r84283]
2013-05-14 21:10:02 +00:00
e83960d3e9 allow map keys to be forward declared only
[SVN r84275]
2013-05-13 23:01:05 +00:00
92ee36a556 Fixes #8336
[SVN r84002]
2013-04-21 14:07:21 +00:00
52298c686e Fixes #8456
[SVN r84001]
2013-04-21 14:00:37 +00:00
80b4ce43c5 Fixes #8418
[SVN r84000]
2013-04-21 13:54:59 +00:00
b36426c8e3 patches from tongari: allow custom Associative Sequence which doesn't have fusion::pair
as elements.

[SVN r83455]
2013-03-16 07:28:23 +00:00
d354c5183b Tweaks for MSVC. MSVC version of map is not yet move enables so it is failing the move test
[SVN r82728]
2013-02-04 12:15:02 +00:00
fb3bd4cea8 minor cleanup
[SVN r82727]
2013-02-04 11:54:59 +00:00
9672fe5385 map move supported + value_at_impl added
[SVN r82726]
2013-02-04 11:52:58 +00:00
085c3c25ca more map tests (including move test)
[SVN r82725]
2013-02-04 11:52:18 +00:00
85119dbd21 added as_map
fixed bug: wrong iterator category for map_iterator

[SVN r82721]
2013-02-04 09:52:52 +00:00
764a31e9f5 fixed typo
[SVN r82714]
2013-02-04 06:22:50 +00:00
228401d898 More map tests and more API features implemented + tweaks to affected components
[SVN r82713]
2013-02-04 06:21:45 +00:00
aba201eb4e Added more map tests
[SVN r82712]
2013-02-04 06:20:10 +00:00
9c5d6bcc8c added pair < operator for case where key (first type) is the same.
[SVN r82709]
2013-02-04 04:10:29 +00:00
7b6cf39540 modern c++11 map implemented + various tweaks
[SVN r82708]
2013-02-04 03:49:34 +00:00
996f4152d2 modern c++11 map implemented
[SVN r82707]
2013-02-04 03:46:42 +00:00
d128c6f6aa Moving non-variadic map implementation to detail/cpp03 directory
[SVN r82701]
2013-02-03 11:50:48 +00:00
fec1da027c Cleanup deque to clearly separate the C++03 code from c++11 code
[SVN r82698]
2013-02-03 10:31:46 +00:00
a1a6e42590 Removing the preprocessed file generation which is meant for internal use only
[SVN r82697]
2013-02-03 10:13:41 +00:00
4272519a3c cleanup
[SVN r82670]
2013-01-31 15:56:00 +00:00
9dcdfa323f Better deque conversion
[SVN r82669]
2013-01-31 15:31:28 +00:00
5a520585d8 Fixes #7955
[SVN r82668]
2013-01-31 13:01:36 +00:00
1823f30420 Some cleanup
[SVN r82636]
2013-01-27 14:41:39 +00:00
f96bbef8fa MSVC (VC11) fixes for latest updates
[SVN r82634]
2013-01-27 12:15:26 +00:00
f1687bffcf Added LF at the end
[SVN r82632]
2013-01-27 10:14:40 +00:00
6c17c04ce6 Workaround for some tests on C++11 to allow disambiguation of && and const& arguments to ctors
[SVN r82631]
2013-01-27 10:14:16 +00:00
b7d02a8c55 + Fixes ticket #7914
+ C++11 implementations for make_deque, deque_tie and as_deque

[SVN r82630]
2013-01-27 07:17:01 +00:00
6a47d86d72 C++ fixes
[SVN r82629]
2013-01-27 07:13:58 +00:00
2f61e2b707 disabling some tests with errors on c++11
[SVN r82628]
2013-01-27 04:24:40 +00:00
ea0cad5800 Added fusion::move algorithm
[SVN r82550]
2013-01-19 14:37:00 +00:00
f9d6e05676 Applied patches for Tickets #7738, #7737 and #7646
[SVN r82348]
2013-01-04 01:43:06 +00:00
211b47b47d clarify in fusion docs that associative sequences are not checked for key uniqueness.
[SVN r81891]
2012-12-13 09:41:50 +00:00
6d265316ed Workaround for ObjC (mis)use of nil (from Mathias Gaunard)
[SVN r81628]
2012-11-30 02:31:23 +00:00
8d6200ef58 Removed usage of deprecated macros in Boost.Fusion and Boost.Spirit
[SVN r81569]
2012-11-26 18:44:46 +00:00
e1819c11b2 Remove usage of deprecated macros
[SVN r81452]
2012-11-21 03:12:31 +00:00
cfbbba272e Fixes for Ticket #7569 ( Compile Error using BOOST_FUSION_DEFINE_STRUCT_INLINE with VC10 and GCC <4.5 )
[SVN r81165]
2012-11-04 00:18:41 +00:00
d01148d339 Fixed typo
[SVN r81164]
2012-11-03 23:44:36 +00:00
f760ed7b8f removing c++11 requirements in jamfile (mistakenly added)
[SVN r80865]
2012-10-05 06:15:02 +00:00
752f911a91 #7427 (Warning fixes in fusion)
[SVN r80812]
2012-10-02 01:12:19 +00:00
b57cd4ede9 - patch from nathan ridge
- fixed deque regression 

[SVN r80458]
2012-09-09 00:27:37 +00:00
a856857cb7 - Fixed code to allow decltype implementation of boost::result_of with BOOST_RESULT_OF_USE_DECLTYPE defined.
- Reverted sequence/iterator.hpp to original <correct-no-workaround> version.

[SVN r80396]
2012-09-04 13:42:14 +00:00
78ff3d8831 Fixed code to allow decltype implementation of boost::result_of with BOOST_RESULT_OF_USE_DECLTYPE defined.
[SVN r80395]
2012-09-04 13:40:38 +00:00
80799eed95 C++11 fixes for deque
[SVN r80392]
2012-09-04 05:04:26 +00:00
35ec74edbc C++11 fixes for deque
[SVN r80391]
2012-09-04 05:04:25 +00:00
106702d388 Fix to silence MSVC warnings (Nathan Ridge)
[SVN r80368]
2012-09-03 07:08:47 +00:00
4382b64aa7 Updated changelog
removed unmaintained todo.txt

[SVN r80347]
2012-09-01 02:12:46 +00:00
26ba07f36c move-assign test tweaks
[SVN r80346]
2012-09-01 02:02:09 +00:00
a53f93ff1a move-assign for vector
[SVN r80345]
2012-09-01 02:01:26 +00:00
705ca2b61b move-assign for deque
[SVN r80344]
2012-09-01 01:04:12 +00:00
e587ad4d50 Added move-assign test
[SVN r80343]
2012-09-01 01:02:46 +00:00
3613310b62 deque move-ctor OK on gcc
[SVN r80334]
2012-08-31 15:58:31 +00:00
5946ab9936 deque move-ctor OK on gcc
[SVN r80333]
2012-08-31 15:57:49 +00:00
c8b47ca3ca Added move ctors for vector and deque (deque for gcc partially working for now)
no preprocessed files yet

[SVN r80331]
2012-08-31 14:33:12 +00:00
16de1dcd01 Added move ctors for vector and deque (deque for gcc partially working for now)
[SVN r80330]
2012-08-31 14:32:08 +00:00
038976991e Fixed MSVC errors (from Nathan Ridge)
[SVN r80326]
2012-08-31 04:12:29 +00:00
4ccb4328f6 Fusion: fixing bogus preprocessor directive (missing newline at end of file)
[SVN r79788]
2012-07-28 20:44:56 +00:00
eaf9e79e85 latest patch from Nathan Ridge
[SVN r79306]
2012-07-05 23:40:17 +00:00
a3b0cad1e7 latest oatch from Nathan Ridge
[SVN r79305]
2012-07-05 23:39:50 +00:00
85583b5ea9 allow boolean traits implementations to use std::true_type and std::false_type
[SVN r79131]
2012-06-27 04:27:50 +00:00
191a3d75ed Fix for Ticket #6965 from Joel Falcou
[SVN r79099]
2012-06-26 10:16:35 +00:00
136331963a Added test for Ticket #6965
[SVN r79098]
2012-06-26 10:14:49 +00:00
70589c53c6 BOOST_FUSION_DEFINE_STRUCT_INLINE patch by Nathan Ridge
[SVN r78509]
2012-05-19 01:24:55 +00:00
ed3776ce8c BOOST_FUSION_DEFINE_STRUCT_INLINE patch by Nathan Ridge
[SVN r78508]
2012-05-19 01:24:16 +00:00
a46bd7ab72 patch for ticket #6910 by michel
[SVN r78507]
2012-05-19 01:18:43 +00:00
8ce40ebd0c Patch by Nathan Ridge to allow BOOST_FUSION_ADAPT_ADT adapted classes to be compared using relational operators.
[SVN r78490]
2012-05-17 01:10:20 +00:00
51ade6529c typo fix by Mario Lang
[SVN r78464]
2012-05-14 00:41:42 +00:00
b63c8214d7 Patches from Nathan Ridge using SFINAE to disable the Fusion algorithms for non-{Fusion sequence} types
[SVN r78463]
2012-05-14 00:37:21 +00:00
66e8a6d3b7 Doc updates for deque
[SVN r78199]
2012-04-26 00:03:42 +00:00
524769f6fb patch for clang from Michel Morin
[SVN r78176]
2012-04-24 01:40:17 +00:00
654dfbedb8 patch for clang from Michel Morin
[SVN r78175]
2012-04-24 01:39:43 +00:00
fad4a7ebeb rearranging files
[SVN r78106]
2012-04-21 06:09:54 +00:00
01f002f084 tweaked cref_result and ref_result to be non-lazy (for consistency).
[SVN r78058]
2012-04-18 02:57:56 +00:00
c8224c8bdf deque fix for ambiguity and making ctors explicit
[SVN r78056]
2012-04-18 01:18:10 +00:00
b7eda8d0f4 Doc updates for deque
[SVN r77984]
2012-04-15 09:47:19 +00:00
ecc87abaab more deque updates
[SVN r77967]
2012-04-14 00:57:15 +00:00
a3c2258017 Added deque docs
[SVN r77879]
2012-04-10 02:30:18 +00:00
d87b5a8000 minor tweaks
[SVN r77814]
2012-04-07 12:02:16 +00:00
b34a8c79e8 hide detail stuff
[SVN r77812]
2012-04-07 11:07:35 +00:00
ec99f829f3 updates
[SVN r77811]
2012-04-07 10:57:10 +00:00
2936fd30fb missing include
[SVN r77810]
2012-04-07 10:26:23 +00:00
a36f0f95cb c++ port of deque working
[SVN r77809]
2012-04-07 10:08:00 +00:00
93ce3bd9bf c++ port of deque underway
[SVN r77808]
2012-04-07 09:56:07 +00:00
e15c27bc8b partial update (upgrade to c++11)
[SVN r77805]
2012-04-07 07:54:18 +00:00
92d51dcfa8 c++11 version start
[SVN r77803]
2012-04-07 07:43:05 +00:00
221e07a7a3 + bumped copyright date
+ mpl::int_ optimizations

[SVN r77802]
2012-04-07 07:34:00 +00:00
2038772e90 fixed wrong spelling
[SVN r77472]
2012-03-22 10:45:12 +00:00
b6142f1613 Add newlines at end of file to avoid warnings like this:
boost/include/boost/fusion/tuple/detail/preprocessed/tuple.hpp:21:7: warning: no newline at end of file



[SVN r77424]
2012-03-20 02:12:55 +00:00
255 changed files with 7735 additions and 2256 deletions

View File

@ -658,7 +658,7 @@ __random_access_sequence__.
[heading Synopsis] [heading Synopsis]
BOOST_FUSION_ADAPT_ADT( BOOST_FUSION_ADAPT_TPL_ADT(
(template_param0)(template_param1)..., (template_param0)(template_param1)...,
(type_name) (specialization_param0)(specialization_param1)..., (type_name) (specialization_param0)(specialization_param1)...,
(attribute_type0, attribute_const_type0, get_expr0, set_expr0) (attribute_type0, attribute_const_type0, get_expr0, set_expr0)
@ -1115,6 +1115,100 @@ defined in __random_access_sequence__.
[endsect] [endsect]
[section:define_struct_inline BOOST_FUSION_DEFINE_STRUCT_INLINE]
[heading Description]
BOOST_FUSION_DEFINE_STRUCT_INLINE is a macro that can be used to generate all
the necessary boilerplate to define and adapt an arbitrary struct as a model of
__random_access_sequence__. Unlike BOOST_FUSION_DEFINE_STRUCT, it can be used
at class or namespace scope.
[heading Synopsis]
BOOST_FUSION_DEFINE_STRUCT_INLINE(
struct_name,
(member_type0, member_name0)
(member_type1, member_name1)
...
)
[heading Expression Semantics]
The semantics of BOOST_FUSION_DEFINE_STRUCT_INLINE are identical to those of
BOOST_FUSION_DEFINE_STRUCT, with two differences:
# BOOST_FUSION_DEFINE_STRUCT_INLINE can be used at class or namespace scope, and
thus does not take a namespace list parameter.
# The structure generated by BOOST_FUSION_DEFINE_STRUCT_INLINE has a base class,
and is thus not POD in C++03.
[heading Header]
#include <boost/fusion/adapted/struct/define_struct_inline.hpp>
#include <boost/fusion/include/define_struct_inline.hpp>
[heading Example]
// enclosing::employee is a Fusion sequence
class enclosing
{
BOOST_FUSION_DEFINE_STRUCT_INLINE(
employee,
(std::string, name)
(int, age))
};
[endsect]
[section:define_tpl_struct_inline BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE]
[heading Description]
BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE is a macro that can be used to generate
all the necessary boilerplate to define and adapt an arbitrary template struct
as a model of __random_access_sequence__. Unlike BOOST_FUSION_DEFINE_TPL_STRUCT,
it can be used at class or namespace scope.
[heading Synopsis]
BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE(
(template_param0)(template_param1)...,
struct_name,
(member_type0, member_name0)
(member_type1, member_name1)
...
)
[heading Expression Semantics]
The semantics of BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE are identical to those of
BOOST_FUSION_DEFINE_TPL_STRUCT, with two differences:
# BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE can be used at class or namespace scope,
and thus does not take a namespace list parameter.
# The structure generated by BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE has a base
class, and is thus not POD in C++03.
[heading Header]
#include <boost/fusion/adapted/struct/define_struct_inline.hpp>
#include <boost/fusion/include/define_struct_inline.hpp>
[heading Example]
// Any instantiated enclosing::employee is a Fusion sequence
class enclosing
{
BOOST_FUSION_DEFINE_TPL_STRUCT(
(Name)(Age), employee,
(Name, name)
(Age, age))
};
[endsect]
[section:define_assoc_struct BOOST_FUSION_DEFINE_ASSOC_STRUCT] [section:define_assoc_struct BOOST_FUSION_DEFINE_ASSOC_STRUCT]
[heading Description] [heading Description]

View File

@ -45,5 +45,8 @@ This section summarizes significant changes to the Fusion library.
compilation (Joel de Guzman) compilation (Joel de Guzman)
* October 8, 2011: Added adaptor for std::tuple (Joel de Guzman) * October 8, 2011: Added adaptor for std::tuple (Joel de Guzman)
* October 10, 2011: Made map random access (Brandon Kohn) * October 10, 2011: Made map random access (Brandon Kohn)
* April 7, 2012: Added C++11 version of deque
* May 19, 2012: Added BOOST_FUSION_DEFINE_STRUCT_INLINE by Nathan Ridge
* September 1, 2012: Added move support for deque and vector
[endsect] [endsect]

View File

@ -21,10 +21,11 @@ __views__. These containers are more or less counterparts of those in __stl__.
[heading Description] [heading Description]
`vector` is a __random_access_sequence__ of heterogenous typed `vector` is a __random_access_sequence__ of heterogenous typed data
data structured as a simple `struct` where each element is held structured as a simple `struct` where each element is held as a member
as a member variable. `vector` is the simplest of the Fusion variable. `vector` is the simplest of the Fusion sequence container (a
sequence container, and in many cases the most efficient. vector with N elements is just a struct with N members), and in many
cases the most efficient.
[heading Header] [heading Header]
@ -95,7 +96,7 @@ including any Fusion header to change the default. Example:
[table [table
[[Parameter] [Description] [Default]] [[Parameter] [Description] [Default]]
[[`T0`...`TN`] [Element types] [['unspecified]]] [[`T0`...`TN`] [Element types] [__unspecified__]]
] ]
[heading Model of] [heading Model of]
@ -156,7 +157,7 @@ time). The runtime cost of access to each element is peculiarly constant
[table [table
[[Parameter] [Description] [Default]] [[Parameter] [Description] [Default]]
[[`Car`] [Head type] []] [[`Car`] [Head type] [ ]]
[[`Cdr`] [Tail type] [`nil`]] [[`Cdr`] [Tail type] [`nil`]]
] ]
@ -246,7 +247,7 @@ including any Fusion header to change the default. Example:
[table [table
[[Parameter] [Description] [Default]] [[Parameter] [Description] [Default]]
[[`T0`...`TN`] [Element types] [['unspecified-type]]] [[`T0`...`TN`] [Element types] [__unspecified__]]
] ]
[heading Model of] [heading Model of]
@ -289,6 +290,220 @@ constant (see __recursive_inline__).]
[endsect] [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] [section set]
[heading Description] [heading Description]
@ -332,7 +547,7 @@ including any Fusion header to change the default. Example:
[table [table
[[Parameter] [Description] [Default]] [[Parameter] [Description] [Default]]
[[`T0`...`TN`] [Element types] [['unspecified-type]]] [[`T0`...`TN`] [Element types] [__unspecified__]]
] ]
[heading Model of] [heading Model of]
@ -414,7 +629,7 @@ including any Fusion header to change the default. Example:
[table [table
[[Parameter] [Description] [Default]] [[Parameter] [Description] [Default]]
[[`T0`...`TN`] [Element types] [['unspecified-type]]] [[`T0`...`TN`] [Element types] [__unspecified__]]
] ]
[heading Model of] [heading Model of]
@ -617,6 +832,58 @@ __note_boost_ref__
[endsect] [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] [section make_set]
[heading Description] [heading Description]
@ -734,6 +1001,7 @@ succeeding sections document the various /tier/ flavors.
* __list_tie__ * __list_tie__
* __vector_tie__ * __vector_tie__
* __map_tie__ * __map_tie__
* __deque_tie__
Example: Example:
@ -914,6 +1182,56 @@ including any Fusion header to change the default. Example:
[endsect] [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]
[endsect] [endsect]
[section MetaFunctions] [section MetaFunctions]
@ -1048,6 +1366,54 @@ rules for __element_conversion__.
[endsect] [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] [section make_set]
[heading Description] [heading Description]
@ -1240,6 +1606,53 @@ default. Example:
[endsect] [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] [section map_tie]
[heading Description] [heading Description]
@ -1388,6 +1801,48 @@ Convert a fusion sequence to a __vector__.
[endsect] [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] [section as_set]
[heading Description] [heading Description]
@ -1559,6 +2014,44 @@ Returns the result type of __as_vector__.
[endsect] [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] [section as_set]
[heading Description] [heading Description]

View File

@ -11,7 +11,7 @@
[quickbook 1.3] [quickbook 1.3]
[version 2.2] [version 2.2]
[authors [de Guzman, Joel], [Marsden, Dan], [Schwinger, Tobias]] [authors [de Guzman, Joel], [Marsden, Dan], [Schwinger, Tobias]]
[copyright 2001 2002 2003 2004 2005 2006 2011 Joel de Guzman, Dan Marsden, Tobias Schwinger] [copyright 2001 2002 2003 2004 2005 2006 2011 2012 Joel de Guzman, Dan Marsden, Tobias Schwinger]
[purpose Statically Typed Heterogeneous Data Structures and Algorithms] [purpose Statically Typed Heterogeneous Data Structures and Algorithms]
[license [license
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
@ -116,6 +116,9 @@
[def __vector__ [link fusion.container.vector `vector`]] [def __vector__ [link fusion.container.vector `vector`]]
[def __cons__ [link fusion.container.cons `cons`]] [def __cons__ [link fusion.container.cons `cons`]]
[def __list__ [link fusion.container.list `list`]] [def __list__ [link fusion.container.list `list`]]
[def __deque__ [link fusion.container.deque `deque`]]
[def __front_extended_deque__ [link fusion.container.front_extended_deque `front_extended_deque`]]
[def __back_extended_deque__ [link fusion.container.back_extended_deque `back_extended_deque`]]
[def __set__ [link fusion.container.set `set`]] [def __set__ [link fusion.container.set `set`]]
[def __map__ [link fusion.container.map `map`]] [def __map__ [link fusion.container.map `map`]]
@ -198,12 +201,16 @@
[def __result_of_make_cons__ [link fusion.container.generation.metafunctions.make_cons `result_of::make_cons`]] [def __result_of_make_cons__ [link fusion.container.generation.metafunctions.make_cons `result_of::make_cons`]]
[def __make_list__ [link fusion.container.generation.functions.make_list `make_list`]] [def __make_list__ [link fusion.container.generation.functions.make_list `make_list`]]
[def __result_of_make_list__ [link fusion.container.generation.metafunctions.make_list `result_of::make_list`]] [def __result_of_make_list__ [link fusion.container.generation.metafunctions.make_list `result_of::make_list`]]
[def __make_deque__ [link fusion.container.generation.functions.make_deque `make_deque`]]
[def __result_of_make_deque__ [link fusion.container.generation.metafunctions.make_deque `result_of::make_deque`]]
[def __make_set__ [link fusion.container.generation.functions.make_set `make_set`]] [def __make_set__ [link fusion.container.generation.functions.make_set `make_set`]]
[def __result_of_make_set__ [link fusion.container.generation.metafunctions.make_set `result_of::make_set`]] [def __result_of_make_set__ [link fusion.container.generation.metafunctions.make_set `result_of::make_set`]]
[def __make_map__ [link fusion.container.generation.functions.make_map `make_map`]] [def __make_map__ [link fusion.container.generation.functions.make_map `make_map`]]
[def __result_of_make_map__ [link fusion.container.generation.metafunctions.make_map `result_of::make_map`]] [def __result_of_make_map__ [link fusion.container.generation.metafunctions.make_map `result_of::make_map`]]
[def __list_tie__ [link fusion.container.generation.functions.list_tie `list_tie`]] [def __list_tie__ [link fusion.container.generation.functions.list_tie `list_tie`]]
[def __result_of_list_tie__ [link fusion.container.generation.metafunctions.list_tie `result_of::list_tie`]] [def __result_of_list_tie__ [link fusion.container.generation.metafunctions.list_tie `result_of::list_tie`]]
[def __deque_tie__ [link fusion.container.generation.functions.deque_tie `deque_tie`]]
[def __result_of_deque_tie__ [link fusion.container.generation.metafunctions.deque_tie `result_of::deque_tie`]]
[def __out__ [link fusion.sequence.operator.i_o.out out]] [def __out__ [link fusion.sequence.operator.i_o.out out]]
[def __in__ [link fusion.sequence.operator.i_o.in in]] [def __in__ [link fusion.sequence.operator.i_o.in in]]

View File

@ -1,16 +1,277 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html> <html>
<head> <head>
<!-- Copyright (C) 2002 Douglas Gregor <doug.gregor -at- gmail.com> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Chapter&#160;1.&#160;Fusion 2.2</title>
Distributed under the Boost Software License, Version 1.0. <link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
(See accompanying file LICENSE_1_0.txt or copy at <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
http://www.boost.org/LICENSE_1_0.txt) --> <link rel="home" href="index.html" title="Chapter&#160;1.&#160;Fusion 2.2">
<title>Redirect to generated documentation</title> <link rel="next" href="fusion/preface.html" title="Preface">
<meta http-equiv="refresh" content="0; URL=http://boost-sandbox.sourceforge.net/libs/fusion/doc/html/"> </head>
</head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<body> <table cellpadding="2" width="100%"><tr>
Automatic redirection failed, please go to <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<a href="http://boost-sandbox.sourceforge.net/libs/fusion/doc/html/">http://boost-sandbox.sourceforge.net/libs/fusion/doc/html/</a> <td align="center"><a href="../../../../index.html">Home</a></td>
</body> <td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav"><a accesskey="n" href="fusion/preface.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a></div>
<div class="chapter">
<div class="titlepage"><div>
<div><h2 class="title">
<a name="fusion"></a>Chapter&#160;1.&#160;Fusion 2.2</h2></div>
<div><div class="author"><h3 class="author">
<span class="firstname">Joel</span> <span class="surname">de Guzman</span>
</h3></div></div>
<div><div class="author"><h3 class="author">
<span class="firstname">Dan</span> <span class="surname">Marsden</span>
</h3></div></div>
<div><div class="author"><h3 class="author">
<span class="firstname">Tobias</span> <span class="surname">Schwinger</span>
</h3></div></div>
<div><p class="copyright">Copyright &#169; 2001-2006, 2011, 2012 Joel de Guzman,
Dan Marsden, Tobias Schwinger</p></div>
<div><div class="legalnotice">
<a name="fusion.legal"></a><p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></div>
</div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
<dt><span class="section"><a href="fusion/preface.html">Preface</a></span></dt>
<dt><span class="section"><a href="fusion/introduction.html">Introduction</a></span></dt>
<dt><span class="section"><a href="fusion/quick_start.html">Quick Start</a></span></dt>
<dt><span class="section"><a href="fusion/organization.html">Organization</a></span></dt>
<dt><span class="section"><a href="fusion/support.html">Support</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="fusion/support/is_sequence.html">is_sequence</a></span></dt>
<dt><span class="section"><a href="fusion/support/is_view.html">is_view</a></span></dt>
<dt><span class="section"><a href="fusion/support/tag_of.html">tag_of</a></span></dt>
<dt><span class="section"><a href="fusion/support/category_of.html">category_of</a></span></dt>
<dt><span class="section"><a href="fusion/support/deduce.html">deduce</a></span></dt>
<dt><span class="section"><a href="fusion/support/deduce_sequence.html">deduce_sequence</a></span></dt>
<dt><span class="section"><a href="fusion/support/pair.html">pair</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="fusion/iterator.html">Iterator</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="fusion/iterator/concepts.html">Concepts</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="fusion/iterator/concepts/forward_iterator.html">Forward
Iterator</a></span></dt>
<dt><span class="section"><a href="fusion/iterator/concepts/bidirectional_iterator.html">Bidirectional
Iterator</a></span></dt>
<dt><span class="section"><a href="fusion/iterator/concepts/random_access_iterator.html">Random
Access Iterator</a></span></dt>
<dt><span class="section"><a href="fusion/iterator/concepts/associative_iterator.html">Associative
Iterator</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="fusion/iterator/functions.html">Functions</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="fusion/iterator/functions/deref.html">deref</a></span></dt>
<dt><span class="section"><a href="fusion/iterator/functions/next.html">next</a></span></dt>
<dt><span class="section"><a href="fusion/iterator/functions/prior.html">prior</a></span></dt>
<dt><span class="section"><a href="fusion/iterator/functions/distance.html">distance</a></span></dt>
<dt><span class="section"><a href="fusion/iterator/functions/advance.html">advance</a></span></dt>
<dt><span class="section"><a href="fusion/iterator/functions/advance_c.html">advance_c</a></span></dt>
<dt><span class="section"><a href="fusion/iterator/functions/deref_data.html">deref_data</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="fusion/iterator/operator.html">Operator</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="fusion/iterator/operator/operator_unary_star.html">Operator
*</a></span></dt>
<dt><span class="section"><a href="fusion/iterator/operator/operator_equality.html">Operator
==</a></span></dt>
<dt><span class="section"><a href="fusion/iterator/operator/operator_inequality.html">Operator
!=</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="fusion/iterator/metafunctions.html">Metafunctions</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="fusion/iterator/metafunctions/value_of.html">value_of</a></span></dt>
<dt><span class="section"><a href="fusion/iterator/metafunctions/deref.html">deref</a></span></dt>
<dt><span class="section"><a href="fusion/iterator/metafunctions/next.html">next</a></span></dt>
<dt><span class="section"><a href="fusion/iterator/metafunctions/prior.html">prior</a></span></dt>
<dt><span class="section"><a href="fusion/iterator/metafunctions/equal_to.html">equal_to</a></span></dt>
<dt><span class="section"><a href="fusion/iterator/metafunctions/distance.html">distance</a></span></dt>
<dt><span class="section"><a href="fusion/iterator/metafunctions/advance.html">advance</a></span></dt>
<dt><span class="section"><a href="fusion/iterator/metafunctions/advance_c.html">advance_c</a></span></dt>
<dt><span class="section"><a href="fusion/iterator/metafunctions/key_of.html">key_of</a></span></dt>
<dt><span class="section"><a href="fusion/iterator/metafunctions/value_of_data.html">value_of_data</a></span></dt>
<dt><span class="section"><a href="fusion/iterator/metafunctions/deref_data.html">deref_data</a></span></dt>
</dl></dd>
</dl></dd>
<dt><span class="section"><a href="fusion/sequence.html">Sequence</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="fusion/sequence/concepts.html">Concepts</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="fusion/sequence/concepts/forward_sequence.html">Forward
Sequence</a></span></dt>
<dt><span class="section"><a href="fusion/sequence/concepts/bidirectional_sequence.html">Bidirectional
Sequence</a></span></dt>
<dt><span class="section"><a href="fusion/sequence/concepts/random_access_sequence.html">Random
Access Sequence</a></span></dt>
<dt><span class="section"><a href="fusion/sequence/concepts/associative_sequence.html">Associative
Sequence</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="fusion/sequence/intrinsic.html">Intrinsic</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="fusion/sequence/intrinsic/functions.html">Functions</a></span></dt>
<dt><span class="section"><a href="fusion/sequence/intrinsic/metafunctions.html">Metafunctions</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="fusion/sequence/operator.html">Operator</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="fusion/sequence/operator/i_o.html">I/O</a></span></dt>
<dt><span class="section"><a href="fusion/sequence/operator/comparison.html">Comparison</a></span></dt>
</dl></dd>
</dl></dd>
<dt><span class="section"><a href="fusion/container.html">Container</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="fusion/container/vector.html">vector</a></span></dt>
<dt><span class="section"><a href="fusion/container/cons.html">cons</a></span></dt>
<dt><span class="section"><a href="fusion/container/list.html">list</a></span></dt>
<dt><span class="section"><a href="fusion/container/deque.html">deque</a></span></dt>
<dt><span class="section"><a href="fusion/container/front_extended_deque.html">front_extended_deque</a></span></dt>
<dt><span class="section"><a href="fusion/container/back_extended_deque.html">back_extended_deque</a></span></dt>
<dt><span class="section"><a href="fusion/container/set.html">set</a></span></dt>
<dt><span class="section"><a href="fusion/container/map.html">map</a></span></dt>
<dt><span class="section"><a href="fusion/container/generation.html">Generation</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="fusion/container/generation/functions.html">Functions</a></span></dt>
<dt><span class="section"><a href="fusion/container/generation/metafunctions.html">MetaFunctions</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="fusion/container/conversion.html">Conversion</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="fusion/container/conversion/functions.html">Functions</a></span></dt>
<dt><span class="section"><a href="fusion/container/conversion/metafunctions.html">Metafunctions</a></span></dt>
</dl></dd>
</dl></dd>
<dt><span class="section"><a href="fusion/view.html">View</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="fusion/view/single_view.html">single_view</a></span></dt>
<dt><span class="section"><a href="fusion/view/filter_view.html">filter_view</a></span></dt>
<dt><span class="section"><a href="fusion/view/iterator_range.html">iterator_range</a></span></dt>
<dt><span class="section"><a href="fusion/view/joint_view.html">joint_view</a></span></dt>
<dt><span class="section"><a href="fusion/view/zip_view.html">zip_view</a></span></dt>
<dt><span class="section"><a href="fusion/view/transform_view.html">transform_view</a></span></dt>
<dt><span class="section"><a href="fusion/view/reverse_view.html">reverse_view</a></span></dt>
<dt><span class="section"><a href="fusion/view/nview.html">nview</a></span></dt>
<dt><span class="section"><a href="fusion/view/repetitive_view.html">repetitive_view</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="fusion/adapted.html">Adapted</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="fusion/adapted/array.html">Array</a></span></dt>
<dt><span class="section"><a href="fusion/adapted/std__pair.html">std::pair</a></span></dt>
<dt><span class="section"><a href="fusion/adapted/mpl_sequence.html">mpl sequence</a></span></dt>
<dt><span class="section"><a href="fusion/adapted/boost__array.html">boost::array</a></span></dt>
<dt><span class="section"><a href="fusion/adapted/boost__tuple.html">boost::tuple</a></span></dt>
<dt><span class="section"><a href="fusion/adapted/adapt_struct.html">BOOST_FUSION_ADAPT_STRUCT</a></span></dt>
<dt><span class="section"><a href="fusion/adapted/adapt_tpl_struct.html">BOOST_FUSION_ADAPT_TPL_STRUCT</a></span></dt>
<dt><span class="section"><a href="fusion/adapted/adapt_struct_named.html">BOOST_FUSION_ADAPT_STRUCT_NAMED</a></span></dt>
<dt><span class="section"><a href="fusion/adapted/adapt_assoc.html">BOOST_FUSION_ADAPT_ASSOC_STRUCT</a></span></dt>
<dt><span class="section"><a href="fusion/adapted/adapt_assoc_tpl_struct.html">BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT</a></span></dt>
<dt><span class="section"><a href="fusion/adapted/adapt_assoc_struct_named.html">BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED</a></span></dt>
<dt><span class="section"><a href="fusion/adapted/adapt_adt.html">BOOST_FUSION_ADAPT_ADT</a></span></dt>
<dt><span class="section"><a href="fusion/adapted/adapt_tpl_adt.html">BOOST_FUSION_ADAPT_TPL_ADT</a></span></dt>
<dt><span class="section"><a href="fusion/adapted/adapt_assoc_adt.html">BOOST_FUSION_ADAPT_ASSOC_ADT</a></span></dt>
<dt><span class="section"><a href="fusion/adapted/adapt_assoc_tpl_adt.html">BOOST_FUSION_ADAPT_ASSOC_TPL_ADT</a></span></dt>
<dt><span class="section"><a href="fusion/adapted/define_struct.html">BOOST_FUSION_DEFINE_STRUCT</a></span></dt>
<dt><span class="section"><a href="fusion/adapted/define_tpl_struct.html">BOOST_FUSION_DEFINE_TPL_STRUCT</a></span></dt>
<dt><span class="section"><a href="fusion/adapted/define_struct_inline.html">BOOST_FUSION_DEFINE_STRUCT_INLINE</a></span></dt>
<dt><span class="section"><a href="fusion/adapted/define_tpl_struct_inline.html">BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE</a></span></dt>
<dt><span class="section"><a href="fusion/adapted/define_assoc_struct.html">BOOST_FUSION_DEFINE_ASSOC_STRUCT</a></span></dt>
<dt><span class="section"><a href="fusion/adapted/define_assoc_tpl_struct.html">BOOST_FUSION_DEFINE_ASSOC_TPL_STRUCT</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="fusion/algorithm.html">Algorithm</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="fusion/algorithm/auxiliary.html">Auxiliary</a></span></dt>
<dd><dl><dt><span class="section"><a href="fusion/algorithm/auxiliary/functions.html">Functions</a></span></dt></dl></dd>
<dt><span class="section"><a href="fusion/algorithm/iteration.html">Iteration</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="fusion/algorithm/iteration/functions.html">Functions</a></span></dt>
<dt><span class="section"><a href="fusion/algorithm/iteration/metafunctions.html">Metafunctions</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="fusion/algorithm/query.html">Query</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="fusion/algorithm/query/functions.html">Functions</a></span></dt>
<dt><span class="section"><a href="fusion/algorithm/query/metafunctions.html">Metafunctions</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="fusion/algorithm/transformation.html">Transformation</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="fusion/algorithm/transformation/functions.html">Functions</a></span></dt>
<dt><span class="section"><a href="fusion/algorithm/transformation/metafunctions.html">Metafunctions</a></span></dt>
</dl></dd>
</dl></dd>
<dt><span class="section"><a href="fusion/tuple.html">Tuple</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="fusion/tuple/class_template_tuple.html">Class template tuple</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="fusion/tuple/class_template_tuple/construction.html">Construction</a></span></dt>
<dt><span class="section"><a href="fusion/tuple/class_template_tuple/tuple_creation_functions.html">Tuple
creation functions</a></span></dt>
<dt><span class="section"><a href="fusion/tuple/class_template_tuple/tuple_helper_classes.html">Tuple
helper classes</a></span></dt>
<dt><span class="section"><a href="fusion/tuple/class_template_tuple/element_access.html">Element
access</a></span></dt>
<dt><span class="section"><a href="fusion/tuple/class_template_tuple/relational_operators.html">Relational
operators</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="fusion/tuple/pairs.html">Pairs</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="fusion/extension.html">Extension</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="fusion/extension/ext_full.html">The Full Extension Mechanism</a></span></dt>
<dt><span class="section"><a href="fusion/extension/sequence_facade.html">Sequence Facade</a></span></dt>
<dt><span class="section"><a href="fusion/extension/iterator_facade.html">Iterator Facade</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="fusion/functional.html">Functional</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="fusion/functional/concepts.html">Concepts</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="fusion/functional/concepts/callable.html">Callable Object</a></span></dt>
<dt><span class="section"><a href="fusion/functional/concepts/reg_callable.html">Regular Callable
Object</a></span></dt>
<dt><span class="section"><a href="fusion/functional/concepts/def_callable.html">Deferred Callable
Object</a></span></dt>
<dt><span class="section"><a href="fusion/functional/concepts/poly.html">Polymorphic Function
Object</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="fusion/functional/invocation.html">Invocation</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="fusion/functional/invocation/functions.html">Functions</a></span></dt>
<dt><span class="section"><a href="fusion/functional/invocation/metafunctions.html">Metafunctions</a></span></dt>
<dt><span class="section"><a href="fusion/functional/invocation/limits.html">Limits</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="fusion/functional/adapters.html">Adapters</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="fusion/functional/adapters/fused.html">fused</a></span></dt>
<dt><span class="section"><a href="fusion/functional/adapters/fused_procedure.html">fused_procedure</a></span></dt>
<dt><span class="section"><a href="fusion/functional/adapters/fused_function_object.html">fused_function_object</a></span></dt>
<dt><span class="section"><a href="fusion/functional/adapters/unfused.html">unfused</a></span></dt>
<dt><span class="section"><a href="fusion/functional/adapters/unfused_typed.html">unfused_typed</a></span></dt>
<dt><span class="section"><a href="fusion/functional/adapters/limits.html">Limits</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="fusion/functional/generation.html">Generation</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="fusion/functional/generation/functions.html">Functions</a></span></dt>
<dt><span class="section"><a href="fusion/functional/generation/metafunctions.html">Metafunctions</a></span></dt>
</dl></dd>
</dl></dd>
<dt><span class="section"><a href="fusion/notes.html">Notes</a></span></dt>
<dt><span class="section"><a href="fusion/change_log.html">Change log</a></span></dt>
<dt><span class="section"><a href="fusion/acknowledgements.html">Acknowledgements</a></span></dt>
<dt><span class="section"><a href="fusion/references.html">References</a></span></dt>
</dl>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"><p><small>Last revised: May 10, 2013 at 05:54:18 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
<div class="spirit-nav"><a accesskey="n" href="fusion/preface.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a></div>
</body>
</html> </html>

View File

@ -494,7 +494,7 @@ Deferences the data property associated with the element referenced by an associ
template< template<
typename I typename I
> >
typename __result_of_deref_data__<I>::type deref(I const& i); typename __result_of_deref_data__<I>::type deref_data(I const& i);
[table Parameters [table Parameters
[[Parameter] [Requirement] [Description]] [[Parameter] [Requirement] [Description]]

View File

@ -142,8 +142,8 @@ __bidirectional_iterator__.
__forward_sequence__ __forward_sequence__
[variablelist Notation [variablelist Notation
[[`s`] [A Forward Sequence]] [[`s`] [A Bidirectional Sequence]]
[[`S`] [A Forward Sequence type]] [[`S`] [A Bidirectional Sequence type]]
[[`o`] [An arbitrary object]] [[`o`] [An arbitrary object]]
[[`e`] [A Sequence element]] [[`e`] [A Sequence element]]
] ]
@ -213,7 +213,8 @@ __bidirectional_sequence__
[variablelist Notation [variablelist Notation
[[`s`] [A Random Access Sequence]] [[`s`] [A Random Access Sequence]]
[[`S`] [A Random Access Sequence type]] [[`S`] [A Random Access Sequence type]]
[[`N`] [An __mpl_integral_constant__]] [[`M`] [An __mpl__ integral constant]]
[[`N`] [An integral constant]]
[[`o`] [An arbitrary object]] [[`o`] [An arbitrary object]]
[[`e`] [A Sequence element]] [[`e`] [A Sequence element]]
] ]
@ -227,8 +228,14 @@ any Random Access Sequence the following must be met:
[[Expression] [Return type] [Type Requirements] [Runtime Complexity]] [[Expression] [Return type] [Type Requirements] [Runtime Complexity]]
[[`__begin__(s)`] [__random_access_iterator__] [] [Constant]] [[`__begin__(s)`] [__random_access_iterator__] [] [Constant]]
[[`__end__(s)`] [__random_access_iterator__] [] [Constant]] [[`__end__(s)`] [__random_access_iterator__] [] [Constant]]
[[`__at__<N>(s)`] [Any type] [] [Constant]] [[`__at_c__<N>(s)`] [Any type] [] [Constant]]
[[`__at__<N>(s) = o`] [Any type] [`s` is mutable and [[`__at_c__<N>(s) = o`] [Any type] [`s` is mutable and
`e = o`, where `e`
is the first element
in the sequence, is
a valid expression.] [Constant]]
[[`__at__<M>(s)`] [Any type] [] [Constant]]
[[`__at__<M>(s) = o`] [Any type] [`s` is mutable and
`e = o`, where `e` `e = o`, where `e`
is the first element is the first element
in the sequence, is in the sequence, is
@ -258,7 +265,8 @@ are not defined in __bidirectional_sequence__.
[table [table
[[Expression] [Semantics]] [[Expression] [Semantics]]
[[`__at__<N>(s)`] [The Nth element from the beginning of the sequence; see __at__.]] [[`__at__<M>(s)`] [The Mth element from the beginning of the sequence; see __at__.]]
[[`__at_c__<N>(s)`] [The Nth element from the beginning of the sequence; see __at_c__.]]
] ]
[heading Models] [heading Models]
@ -283,6 +291,7 @@ An Associative Sequence allows efficient retrieval of elements based on keys.
Like associative sequences in __mpl__, and unlike associative containers in Like associative sequences in __mpl__, and unlike associative containers in
__stl__, Fusion associative sequences have no implied ordering relation. __stl__, Fusion associative sequences have no implied ordering relation.
Instead, type identity is used to impose an equivalence relation on keys. Instead, type identity is used to impose an equivalence relation on keys.
Keys are not checked for uniqueness.
[variablelist Notation [variablelist Notation
[[`s`] [An Associative Sequence]] [[`s`] [An Associative Sequence]]
@ -642,15 +651,15 @@ in the sequence.
[heading Description] [heading Description]
Returns the N-th element from the beginning of the sequence. Returns the M-th element from the beginning of the sequence.
[heading Synopsis] [heading Synopsis]
template <typename N, typename Sequence> template <typename M, typename Sequence>
typename __result_of_at__<Sequence, N>::type typename __result_of_at__<Sequence, N>::type
at(Sequence& seq); at(Sequence& seq);
template <typename N, typename Sequence> template <typename M, typename Sequence>
typename __result_of_at__<Sequence const, N>::type typename __result_of_at__<Sequence const, N>::type
at(Sequence const& seq); at(Sequence const& seq);
@ -659,25 +668,25 @@ Returns the N-th element from the beginning of the sequence.
[table [table
[[Parameter] [Requirement] [Description]] [[Parameter] [Requirement] [Description]]
[[`seq`] [Model of __random_access_sequence__] [The sequence we wish to investigate.]] [[`seq`] [Model of __random_access_sequence__] [The sequence we wish to investigate.]]
[[`N`] [An __mpl_integral_constant__] [An index from the beginning of the [[`M`] [An __mpl_integral_constant__] [An index from the beginning of the
sequence.]] sequence.]]
] ]
[heading Expression Semantics] [heading Expression Semantics]
at<N>(seq); at<M>(seq);
[*Return type]: Returns a reference to the N-th element from the beginning [*Return type]: Returns a reference to the M-th element from the beginning
of the sequence `seq` if `seq` is mutable and `e = o`, where `e` is the N-th of the sequence `seq` if `seq` is mutable and `e = o`, where `e` is the M-th
element from the beginning of the sequence, is a valid expression. Else, element from the beginning of the sequence, is a valid expression. Else,
returns a type convertable to the N-th element from the beginning of the returns a type convertable to the M-th element from the beginning of the
sequence. sequence.
[*Precondition]: `0 <= N::value < __size__(s)` [*Precondition]: `0 <= M::value < __size__(s)`
[*Semantics]: Equivalent to [*Semantics]: Equivalent to
__deref__(__advance__<N>(__begin__(s))) __deref__(__advance__<M>(__begin__(s)))
[heading Header] [heading Header]
@ -1115,7 +1124,7 @@ the actual element type, use __result_of_value_at__].
[heading Synopsis] [heading Synopsis]
template< template<
typename Seq, typename Seq,
typename N> typename M>
struct at struct at
{ {
typedef __unspecified__ type; typedef __unspecified__ type;
@ -1124,15 +1133,15 @@ the actual element type, use __result_of_value_at__].
[table Parameters [table Parameters
[[Parameter] [Requirement] [Description]] [[Parameter] [Requirement] [Description]]
[[`Seq`][A model of __random_access_sequence__][Argument sequence]] [[`Seq`][A model of __random_access_sequence__][Argument sequence]]
[[`N`][An __mpl_integral_constant__][Index of element]] [[`M`][An __mpl_integral_constant__][Index of element]]
] ]
[heading Expression Semantics] [heading Expression Semantics]
result_of::at<Seq, N>::type result_of::at<Seq, M>::type
[*Return type]: Any type. [*Return type]: Any type.
[*Semantics]: Returns the result type of using __at__ to access the `N`th element of `Seq`. [*Semantics]: Returns the result type of using __at__ to access the `M`th element of `Seq`.
[heading Header] [heading Header]
@ -1157,7 +1166,7 @@ get the actual element type, use __result_of_value_at_c__].
[heading Synopsis] [heading Synopsis]
template< template<
typename Seq, typename Seq,
int M> int N>
struct at_c struct at_c
{ {
typedef __unspecified__ type; typedef __unspecified__ type;
@ -1166,15 +1175,15 @@ get the actual element type, use __result_of_value_at_c__].
[table Parameters [table Parameters
[[Parameter] [Requirement] [Description]] [[Parameter] [Requirement] [Description]]
[[`Seq`][A model of __random_access_sequence__][Argument sequence]] [[`Seq`][A model of __random_access_sequence__][Argument sequence]]
[[`M`][Positive integer index][Index of element]] [[`N`][Positive integer index][Index of element]]
] ]
[heading Expression Semantics] [heading Expression Semantics]
result_of::at_c<Seq, M>::type result_of::at_c<Seq, N>::type
[*Return type]: Any type [*Return type]: Any type
[*Semantics]: Returns the result type of using __at_c__ to access the `M`th element of `Seq`. [*Semantics]: Returns the result type of using __at_c__ to access the `N`th element of `Seq`.
[heading Header] [heading Header]
@ -1196,7 +1205,7 @@ Returns the actual type at a given index from the __sequence__.
[heading Synopsis] [heading Synopsis]
template< template<
typename Seq, typename Seq,
typename N> typename M>
struct value_at struct value_at
{ {
typedef __unspecified__ type; typedef __unspecified__ type;
@ -1205,15 +1214,15 @@ Returns the actual type at a given index from the __sequence__.
[table Parameters [table Parameters
[[Parameter] [Requirement] [Description]] [[Parameter] [Requirement] [Description]]
[[`Seq`][A model of __random_access_sequence__][Argument sequence]] [[`Seq`][A model of __random_access_sequence__][Argument sequence]]
[[`N`][An __mpl_integral_constant__][Index of element]] [[`M`][An __mpl_integral_constant__][Index of element]]
] ]
[heading Expression Semantics] [heading Expression Semantics]
result_of::value_at<Seq, N>::type result_of::value_at<Seq, M>::type
[*Return type]: Any type. [*Return type]: Any type.
[*Semantics]: Returns the actual type at the `N`th element of `Seq`. [*Semantics]: Returns the actual type at the `M`th element of `Seq`.
[heading Header] [heading Header]
@ -1235,7 +1244,7 @@ Returns the actual type at a given index from the __sequence__.
[heading Synopsis] [heading Synopsis]
template< template<
typename Seq, typename Seq,
int M> int N>
struct value_at_c struct value_at_c
{ {
typedef __unspecified__ type; typedef __unspecified__ type;
@ -1244,15 +1253,15 @@ Returns the actual type at a given index from the __sequence__.
[table Parameters [table Parameters
[[Parameter] [Requirement] [Description]] [[Parameter] [Requirement] [Description]]
[[`Seq`][A model of __random_access_sequence__][Argument sequence]] [[`Seq`][A model of __random_access_sequence__][Argument sequence]]
[[`M`][Positive integer index][Index of element]] [[`N`][Positive integer index][Index of element]]
] ]
[heading Expression Semantics] [heading Expression Semantics]
result_of::value_at_c<Seq, M>::type result_of::value_at_c<Seq, N>::type
[*Return type]: Any type [*Return type]: Any type
[*Semantics]: Returns the actual type at the `M`th element of `Seq`. [*Semantics]: Returns the actual type at the `N`th element of `Seq`.
[heading Header] [heading Header]

View File

@ -91,7 +91,7 @@ Where `Vi` is `X&` if the cv-unqualified type `Ti` is `reference_wrapper<X>`, ot
template<typename T1, typename T2, ..., typename TN> template<typename T1, typename T2, ..., typename TN>
tuple<T1&, T2&, ..., TN&> tie(T1& t1, T2& t2, ..., TN& tn); tuple<T1&, T2&, ..., TN&> tie(T1& t1, T2& t2, ..., TN& tn);
[*Returns]: tuple<T1&, T2&, ..., TN&>(t1, t2, ..., tN). When argument `ti` is `ignore`, assigning any value to the corresponding tuple element has has no effect. [*Returns]: tuple<T1&, T2&, ..., TN&>(t1, t2, ..., tN). When argument `ti` is `ignore`, assigning any value to the corresponding tuple element has no effect.
[endsect] [endsect]
@ -254,7 +254,7 @@ The __tr1__tuple__ interface is specified to provide uniform access to `std::pai
[*Type]: `T2` [*Type]: `T2`
[*Value]: Returns thetype of the second element of the pair [*Value]: Returns the type of the second element of the pair
template<int I, typename T1, typename T2> template<int I, typename T1, typename T2>
P& get(std::pair<T1, T2>& pr); P& get(std::pair<T1, T2>& pr);

View File

@ -18,7 +18,7 @@
// The std_tuple_iterator adaptor only supports implementations // The std_tuple_iterator adaptor only supports implementations
// using variadic templates // using variadic templates
#if !defined(BOOST_NO_VARIADIC_TEMPLATES) #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
#include <boost/fusion/adapted/std_tuple.hpp> #include <boost/fusion/adapted/std_tuple.hpp>
#endif #endif

View File

@ -12,13 +12,28 @@
#include <boost/type_traits/remove_const.hpp> #include <boost/type_traits/remove_const.hpp>
#include <boost/type_traits/remove_reference.hpp> #include <boost/type_traits/remove_reference.hpp>
#include <boost/fusion/support/as_const.hpp>
#include <boost/fusion/adapted/struct/detail/extension.hpp>
namespace boost { namespace fusion { namespace detail namespace boost { namespace fusion
{ {
namespace detail
{
template <typename T, typename Dummy> template <typename T, typename Dummy>
struct get_identity struct get_identity
: remove_const<typename remove_reference<T>::type> : remove_const<typename remove_reference<T>::type>
{}; {};
}}} }
namespace extension
{
// Overload as_const() to unwrap adt_attribute_proxy.
template <typename T, int N, bool Const>
typename adt_attribute_proxy<T, N, Const>::type as_const(const adt_attribute_proxy<T, N, Const>& proxy)
{
return proxy.get();
}
}
}}
#endif #endif

View File

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

View File

@ -4,8 +4,8 @@
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) file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/ ==============================================================================*/
#if !defined(BOOST_FUSION_CATEGORY_OF_IMPL_09272006_0726) #if !defined(BOOST_FUSION_CATEGORY_OF_IMPL_04202013_0940)
#define BOOST_FUSION_CATEGORY_OF_IMPL_09272006_0726 #define BOOST_FUSION_CATEGORY_OF_IMPL_04202013_0940
namespace boost { namespace fusion namespace boost { namespace fusion
{ {

View File

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

View File

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

View File

@ -16,5 +16,6 @@
#include <boost/fusion/adapted/struct/adapt_struct.hpp> #include <boost/fusion/adapted/struct/adapt_struct.hpp>
#include <boost/fusion/adapted/struct/define_assoc_struct.hpp> #include <boost/fusion/adapted/struct/define_assoc_struct.hpp>
#include <boost/fusion/adapted/struct/define_struct.hpp> #include <boost/fusion/adapted/struct/define_struct.hpp>
#include <boost/fusion/adapted/struct/define_struct_inline.hpp>
#endif #endif

View File

@ -0,0 +1,25 @@
/*=============================================================================
Copyright (c) 2012 Nathan Ridge
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)
==============================================================================*/
#ifndef BOOST_FUSION_ADAPTED_STRUCT_DEFINE_STRUCT_INLINE_HPP
#define BOOST_FUSION_ADAPTED_STRUCT_DEFINE_STRUCT_INLINE_HPP
#include <boost/fusion/adapted/struct/adapt_struct.hpp>
#include <boost/fusion/adapted/struct/detail/define_struct_inline.hpp>
#define BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE( \
TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES) \
\
BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE_IMPL( \
TEMPLATE_PARAMS_SEQ, \
NAME, \
ATTRIBUTES)
#define BOOST_FUSION_DEFINE_STRUCT_INLINE(NAME, ATTRIBUTES) \
BOOST_FUSION_DEFINE_STRUCT_INLINE_IMPL(NAME, ATTRIBUTES) \
#endif

View File

@ -0,0 +1,523 @@
/*=============================================================================
Copyright (c) 2012 Nathan Ridge
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)
==============================================================================*/
#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_DEFINE_STRUCT_INLINE_HPP
#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_DEFINE_STRUCT_INLINE_HPP
#include <boost/config.hpp>
#include <boost/fusion/support/category_of.hpp>
#include <boost/fusion/sequence/sequence_facade.hpp>
#include <boost/fusion/iterator/iterator_facade.hpp>
#include <boost/fusion/algorithm/auxiliary/copy.hpp>
#include <boost/fusion/adapted/struct/detail/define_struct.hpp>
#include <boost/mpl/int.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/mpl/minus.hpp>
#include <boost/mpl/if.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/preprocessor/comma_if.hpp>
#include <boost/preprocessor/facilities/is_empty.hpp>
#include <boost/preprocessor/repeat.hpp>
#include <boost/preprocessor/seq/for_each_i.hpp>
#include <boost/preprocessor/seq/size.hpp>
#include <boost/preprocessor/seq/enum.hpp>
#include <boost/preprocessor/seq/seq.hpp>
#include <boost/preprocessor/tuple/elem.hpp>
// MSVC and GCC <= 4.4 have a bug that affects partial specializations of
// nested templates under some circumstances. This affects the implementation
// of BOOST_FUSION_DEFINE_STRUCT_INLINE, which uses such specializations for
// the iterator class's 'deref' and 'value_of' metafunctions. On these compilers
// an alternate implementation for these metafunctions is used that does not
// require such specializations. The alternate implementation takes longer
// to compile so its use is restricted to the offending compilers.
// For MSVC, the bug was reported at https://connect.microsoft.com/VisualStudio/feedback/details/757891/c-compiler-error-involving-partial-specializations-of-nested-templates
// For GCC, 4.4 and earlier are no longer maintained so there is no need
// to report a bug.
#if defined(BOOST_MSVC) || (defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 4)))
#define BOOST_FUSION_NEED_NESTED_TEMPLATE_PARTIAL_SPEC_WKND
#endif
#ifdef BOOST_FUSION_NEED_NESTED_TEMPLATE_PARTIAL_SPEC_WKND
#include <boost/type_traits/add_const.hpp>
#include <boost/type_traits/remove_const.hpp>
#include <boost/mpl/if.hpp>
#include <boost/fusion/sequence/intrinsic/at_c.hpp>
#include <boost/fusion/container/vector.hpp>
#endif
#define BOOST_FUSION_MAKE_DEFAULT_INIT_LIST_ENTRY(R, DATA, N, ATTRIBUTE) \
BOOST_PP_COMMA_IF(N) BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE)()
#define BOOST_FUSION_MAKE_DEFAULT_INIT_LIST(ATTRIBUTES_SEQ) \
: BOOST_PP_SEQ_FOR_EACH_I( \
BOOST_FUSION_MAKE_DEFAULT_INIT_LIST_ENTRY, \
~, \
ATTRIBUTES_SEQ) \
#define BOOST_FUSION_IGNORE_1(ARG1)
#define BOOST_FUSION_IGNORE_2(ARG1, ARG2)
#define BOOST_FUSION_MAKE_COPY_CONSTRUCTOR(NAME, ATTRIBUTES_SEQ) \
NAME(BOOST_PP_SEQ_FOR_EACH_I( \
BOOST_FUSION_MAKE_CONST_REF_PARAM, \
~, \
ATTRIBUTES_SEQ)) \
: BOOST_PP_SEQ_FOR_EACH_I( \
BOOST_FUSION_MAKE_INIT_LIST_ENTRY, \
~, \
ATTRIBUTES_SEQ) \
{ \
} \
#define BOOST_FUSION_MAKE_CONST_REF_PARAM(R, DATA, N, ATTRIBUTE) \
BOOST_PP_COMMA_IF(N) \
BOOST_PP_TUPLE_ELEM(2, 0, ATTRIBUTE) const& \
BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE)
#define BOOST_FUSION_MAKE_INIT_LIST_ENTRY_I(NAME) NAME(NAME)
#define BOOST_FUSION_MAKE_INIT_LIST_ENTRY(R, DATA, N, ATTRIBUTE) \
BOOST_PP_COMMA_IF(N) \
BOOST_FUSION_MAKE_INIT_LIST_ENTRY_I(BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE))
#define BOOST_FUSION_ITERATOR_NAME(NAME) \
BOOST_PP_CAT(boost_fusion_detail_, BOOST_PP_CAT(NAME, _iterator))
// Note: all template parameter names need to be uglified, otherwise they might
// shadow a template parameter of the struct when used with
// BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE
#define BOOST_FUSION_MAKE_ITERATOR_VALUE_OF_SPECS(Z, N, NAME) \
template <typename boost_fusion_detail_Sq> \
struct value_of< \
BOOST_FUSION_ITERATOR_NAME(NAME)<boost_fusion_detail_Sq, N> \
> \
: boost::mpl::identity< \
typename boost_fusion_detail_Sq::t##N##_type \
> \
{ \
};
#define BOOST_FUSION_MAKE_ITERATOR_DEREF_SPEC( \
SPEC_TYPE, CALL_ARG_TYPE, TYPE_QUAL, ATTRIBUTE, N) \
\
template <typename boost_fusion_detail_Sq> \
struct deref<SPEC_TYPE, N> > \
{ \
typedef typename boost_fusion_detail_Sq::t##N##_type TYPE_QUAL& type; \
static type call(CALL_ARG_TYPE, N> const& iter) \
{ \
return iter.seq_.BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE); \
} \
};
#define BOOST_FUSION_MAKE_ITERATOR_DEREF_SPECS(R, NAME, N, ATTRIBUTE) \
BOOST_FUSION_MAKE_ITERATOR_DEREF_SPEC( \
BOOST_FUSION_ITERATOR_NAME(NAME)<boost_fusion_detail_Sq, \
BOOST_FUSION_ITERATOR_NAME(NAME)<boost_fusion_detail_Sq, \
, \
ATTRIBUTE, \
N) \
BOOST_FUSION_MAKE_ITERATOR_DEREF_SPEC( \
BOOST_FUSION_ITERATOR_NAME(NAME)<const boost_fusion_detail_Sq, \
BOOST_FUSION_ITERATOR_NAME(NAME)<const boost_fusion_detail_Sq, \
const, \
ATTRIBUTE, \
N) \
BOOST_FUSION_MAKE_ITERATOR_DEREF_SPEC( \
const BOOST_FUSION_ITERATOR_NAME(NAME)<boost_fusion_detail_Sq, \
BOOST_FUSION_ITERATOR_NAME(NAME)<boost_fusion_detail_Sq, \
, \
ATTRIBUTE, \
N) \
BOOST_FUSION_MAKE_ITERATOR_DEREF_SPEC( \
const BOOST_FUSION_ITERATOR_NAME(NAME)<const boost_fusion_detail_Sq, \
BOOST_FUSION_ITERATOR_NAME(NAME)<const boost_fusion_detail_Sq, \
const, \
ATTRIBUTE, \
N) \
#define BOOST_FUSION_MAKE_VALUE_AT_SPECS(Z, N, DATA) \
template <typename boost_fusion_detail_Sq> \
struct value_at<boost_fusion_detail_Sq, boost::mpl::int_<N> > \
{ \
typedef typename boost_fusion_detail_Sq::t##N##_type type; \
};
#define BOOST_FUSION_MAKE_AT_SPECS(R, DATA, N, ATTRIBUTE) \
template <typename boost_fusion_detail_Sq> \
struct at<boost_fusion_detail_Sq, boost::mpl::int_<N> > \
{ \
typedef typename boost::mpl::if_< \
boost::is_const<boost_fusion_detail_Sq>, \
typename boost_fusion_detail_Sq::t##N##_type const&, \
typename boost_fusion_detail_Sq::t##N##_type& \
>::type type; \
\
static type call(boost_fusion_detail_Sq& sq) \
{ \
return sq. BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE); \
} \
};
#define BOOST_FUSION_MAKE_TYPEDEF(R, DATA, N, ATTRIBUTE) \
typedef BOOST_PP_TUPLE_ELEM(2, 0, ATTRIBUTE) t##N##_type;
#define BOOST_FUSION_MAKE_DATA_MEMBER(R, DATA, N, ATTRIBUTE) \
BOOST_PP_TUPLE_ELEM(2, 0, ATTRIBUTE) BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE);
#ifdef BOOST_FUSION_NEED_NESTED_TEMPLATE_PARTIAL_SPEC_WKND
#define BOOST_FUSION_DEFINE_ITERATOR_VALUE_OF(NAME, ATTRIBUTE_SEQ_SIZE) \
template <typename boost_fusion_detail_Iterator> \
struct value_of : boost::fusion::result_of::at_c< \
ref_vec_t, \
boost_fusion_detail_Iterator::index::value \
> \
{ \
};
#define BOOST_FUSION_DEFINE_ITERATOR_DEREF(NAME, ATTRIBUTES_SEQ) \
template <typename boost_fusion_detail_Iterator> \
struct deref \
{ \
typedef typename boost::remove_const< \
boost_fusion_detail_Iterator \
>::type iterator_raw_type; \
\
static const int index = iterator_raw_type::index::value; \
\
typedef typename boost::fusion::result_of::at_c< \
ref_vec_t, \
index \
>::type result_raw_type; \
\
typedef typename boost::mpl::if_< \
boost::is_const<typename iterator_raw_type::sequence_type>, \
typename boost::add_const<result_raw_type>::type, \
result_raw_type \
>::type type; \
\
static type call(iterator_raw_type const& iter) \
{ \
return boost::fusion::at_c<index>(iter.ref_vec); \
} \
};
#define BOOST_FUSION_MAKE_ITERATOR_WKND_FIELD_NAME(R, DATA, N, ATTRIBUTE) \
BOOST_PP_COMMA_IF(N) seq.BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE)
#define BOOST_FUSION_DEFINE_ITERATOR_WKND_INIT_LIST_ENTRIES(ATTRIBUTES_SEQ) \
, ref_vec(BOOST_PP_SEQ_FOR_EACH_I( \
BOOST_FUSION_MAKE_ITERATOR_WKND_FIELD_NAME, \
~, \
BOOST_PP_SEQ_TAIL(ATTRIBUTES_SEQ)))
#define BOOST_FUSION_MAKE_ITERATOR_WKND_REF(Z, N, DATA) \
BOOST_PP_COMMA_IF(N) \
typename boost::mpl::if_< \
boost::is_const<boost_fusion_detail_Seq>, \
typename boost::add_const< \
typename boost_fusion_detail_Seq::t##N##_type \
>::type, \
typename boost_fusion_detail_Seq::t##N##_type \
>::type&
#define BOOST_FUSION_DEFINE_ITERATOR_WKND_MEMBERS(ATTRIBUTES_SEQ_SIZE) \
typedef boost::fusion::vector< \
BOOST_PP_REPEAT( \
ATTRIBUTES_SEQ_SIZE, \
BOOST_FUSION_MAKE_ITERATOR_WKND_REF, \
~) \
> ref_vec_t; \
\
ref_vec_t ref_vec;
#else
#define BOOST_FUSION_DEFINE_ITERATOR_VALUE_OF(NAME, ATTRIBUTES_SEQ_SIZE) \
template <typename boost_fusion_detail_T> struct value_of; \
BOOST_PP_REPEAT( \
ATTRIBUTES_SEQ_SIZE, \
BOOST_FUSION_MAKE_ITERATOR_VALUE_OF_SPECS, \
NAME)
#define BOOST_FUSION_DEFINE_ITERATOR_DEREF(NAME, ATTRIBUTES_SEQ) \
template <typename boost_fusion_detail_T> struct deref; \
BOOST_PP_SEQ_FOR_EACH_I( \
BOOST_FUSION_MAKE_ITERATOR_DEREF_SPECS, \
NAME, \
ATTRIBUTES_SEQ)
#define BOOST_FUSION_DEFINE_ITERATOR_WKND_INIT_LIST_ENTRIES(ATTRIBUTES_SEQ)
#define BOOST_FUSION_DEFINE_ITERATOR_WKND_MEMBERS(ATTRIBUTES_SEQ_SIZE)
#endif // BOOST_FUSION_NEED_NESTED_TEMPLATE_PARTIAL_SPEC_WKND
// Note: We can't nest the iterator inside the struct because we run into
// a MSVC10 bug involving partial specializations of nested templates.
#define BOOST_FUSION_DEFINE_STRUCT_INLINE_IMPL(NAME, ATTRIBUTES) \
BOOST_FUSION_DEFINE_STRUCT_INLINE_ITERATOR(NAME, ATTRIBUTES) \
struct NAME : boost::fusion::sequence_facade< \
NAME, \
boost::fusion::random_access_traversal_tag \
> \
{ \
BOOST_FUSION_DEFINE_STRUCT_INLINE_MEMBERS(NAME, ATTRIBUTES) \
};
#define BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE_IMPL( \
TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES) \
\
BOOST_FUSION_DEFINE_STRUCT_INLINE_ITERATOR(NAME, ATTRIBUTES) \
\
template < \
BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS_IMPL( \
(0)TEMPLATE_PARAMS_SEQ) \
> \
struct NAME : boost::fusion::sequence_facade< \
NAME< \
BOOST_PP_SEQ_ENUM(TEMPLATE_PARAMS_SEQ) \
>, \
boost::fusion::random_access_traversal_tag \
> \
{ \
BOOST_FUSION_DEFINE_STRUCT_INLINE_MEMBERS(NAME, ATTRIBUTES) \
};
#define BOOST_FUSION_DEFINE_STRUCT_INLINE_MEMBERS(NAME, ATTRIBUTES) \
BOOST_FUSION_DEFINE_STRUCT_MEMBERS_IMPL( \
NAME, \
BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0 ATTRIBUTES,_END))
// Note: can't compute BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ) directly because
// ATTRIBUTES_SEQ may be empty and calling BOOST_PP_SEQ_SIZE on an empty
// sequence produces warnings on MSVC.
#define BOOST_FUSION_DEFINE_STRUCT_MEMBERS_IMPL(NAME, ATTRIBUTES_SEQ) \
BOOST_FUSION_DEFINE_STRUCT_INLINE_MEMBERS_IMPL_IMPL( \
NAME, \
ATTRIBUTES_SEQ, \
BOOST_PP_DEC(BOOST_PP_SEQ_SIZE((0)ATTRIBUTES_SEQ)))
#define BOOST_FUSION_DEFINE_STRUCT_INLINE_ITERATOR(NAME, ATTRIBUTES) \
BOOST_FUSION_DEFINE_STRUCT_ITERATOR_IMPL( \
NAME, \
BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0 ATTRIBUTES,_END))
#define BOOST_FUSION_DEFINE_STRUCT_ITERATOR_IMPL(NAME, ATTRIBUTES_SEQ) \
BOOST_FUSION_DEFINE_STRUCT_INLINE_ITERATOR_IMPL_IMPL( \
NAME, \
ATTRIBUTES_SEQ, \
BOOST_PP_DEC(BOOST_PP_SEQ_SIZE((0)ATTRIBUTES_SEQ)))
#define BOOST_FUSION_DEFINE_STRUCT_INLINE_ITERATOR_IMPL_IMPL( \
NAME, ATTRIBUTES_SEQ, ATTRIBUTES_SEQ_SIZE) \
\
template <typename boost_fusion_detail_Seq, int N> \
struct BOOST_FUSION_ITERATOR_NAME(NAME) \
: boost::fusion::iterator_facade< \
BOOST_FUSION_ITERATOR_NAME(NAME)<boost_fusion_detail_Seq, N>, \
boost::fusion::random_access_traversal_tag \
> \
{ \
typedef boost::mpl::int_<N> index; \
typedef boost_fusion_detail_Seq sequence_type; \
\
BOOST_FUSION_ITERATOR_NAME(NAME)(boost_fusion_detail_Seq& seq) \
: seq_(seq) \
BOOST_FUSION_DEFINE_ITERATOR_WKND_INIT_LIST_ENTRIES( \
(0)ATTRIBUTES_SEQ) \
{} \
\
boost_fusion_detail_Seq& seq_; \
\
BOOST_FUSION_DEFINE_ITERATOR_WKND_MEMBERS(ATTRIBUTES_SEQ_SIZE) \
\
BOOST_FUSION_DEFINE_ITERATOR_VALUE_OF(NAME, ATTRIBUTES_SEQ_SIZE) \
\
BOOST_FUSION_DEFINE_ITERATOR_DEREF(NAME, ATTRIBUTES_SEQ) \
\
template <typename boost_fusion_detail_It> \
struct next \
{ \
typedef BOOST_FUSION_ITERATOR_NAME(NAME)< \
typename boost_fusion_detail_It::sequence_type, \
boost_fusion_detail_It::index::value + 1 \
> type; \
\
static type call(boost_fusion_detail_It const& it) \
{ \
return type(it.seq_); \
} \
}; \
\
template <typename boost_fusion_detail_It> \
struct prior \
{ \
typedef BOOST_FUSION_ITERATOR_NAME(NAME)< \
typename boost_fusion_detail_It::sequence_type, \
boost_fusion_detail_It::index::value - 1 \
> type; \
\
static type call(boost_fusion_detail_It const& it) \
{ \
return type(it.seq_); \
} \
}; \
\
template < \
typename boost_fusion_detail_It1, \
typename boost_fusion_detail_It2 \
> \
struct distance \
{ \
typedef typename boost::mpl::minus< \
typename boost_fusion_detail_It2::index, \
typename boost_fusion_detail_It1::index \
>::type type; \
\
static type call(boost_fusion_detail_It1 const& it1, \
boost_fusion_detail_It2 const& it2) \
{ \
return type(); \
} \
}; \
\
template < \
typename boost_fusion_detail_It, \
typename boost_fusion_detail_M \
> \
struct advance \
{ \
typedef BOOST_FUSION_ITERATOR_NAME(NAME)< \
typename boost_fusion_detail_It::sequence_type, \
boost_fusion_detail_It::index::value \
+ boost_fusion_detail_M::value \
> type; \
\
static type call(boost_fusion_detail_It const& it) \
{ \
return type(it.seq_); \
} \
}; \
};
#define BOOST_FUSION_DEFINE_STRUCT_INLINE_MEMBERS_IMPL_IMPL( \
NAME, ATTRIBUTES_SEQ, ATTRIBUTES_SEQ_SIZE) \
\
/* Note: second BOOST_PP_IF is necessary to avoid MSVC warning when */ \
/* calling BOOST_FUSION_IGNORE_1 with no arguments. */ \
NAME() \
BOOST_PP_IF( \
ATTRIBUTES_SEQ_SIZE, \
BOOST_FUSION_MAKE_DEFAULT_INIT_LIST, \
BOOST_FUSION_IGNORE_1) \
(BOOST_PP_IF( \
ATTRIBUTES_SEQ_SIZE, \
ATTRIBUTES_SEQ, \
0)) \
{ \
} \
\
BOOST_PP_IF( \
ATTRIBUTES_SEQ_SIZE, \
BOOST_FUSION_MAKE_COPY_CONSTRUCTOR, \
BOOST_FUSION_IGNORE_2) \
(NAME, ATTRIBUTES_SEQ) \
\
template <typename boost_fusion_detail_Seq> \
NAME(const boost_fusion_detail_Seq& rhs) \
{ \
boost::fusion::copy(rhs, *this); \
} \
\
template <typename boost_fusion_detail_Seq> \
NAME& operator=(const boost_fusion_detail_Seq& rhs) \
{ \
boost::fusion::copy(rhs, *this); \
return *this; \
} \
\
template <typename boost_fusion_detail_Sq> \
struct begin \
{ \
typedef BOOST_FUSION_ITERATOR_NAME(NAME)<boost_fusion_detail_Sq, 0> \
type; \
\
static type call(boost_fusion_detail_Sq& sq) \
{ \
return type(sq); \
} \
}; \
\
template <typename boost_fusion_detail_Sq> \
struct end \
{ \
typedef BOOST_FUSION_ITERATOR_NAME(NAME)< \
boost_fusion_detail_Sq, \
ATTRIBUTES_SEQ_SIZE \
> type; \
\
static type call(boost_fusion_detail_Sq& sq) \
{ \
return type(sq); \
} \
}; \
\
template <typename boost_fusion_detail_Sq> \
struct size : boost::mpl::int_<ATTRIBUTES_SEQ_SIZE> \
{ \
}; \
\
template <typename boost_fusion_detail_Sq> \
struct empty : boost::mpl::bool_<ATTRIBUTES_SEQ_SIZE == 0> \
{ \
}; \
\
template < \
typename boost_fusion_detail_Sq, \
typename boost_fusion_detail_N \
> \
struct value_at : value_at< \
boost_fusion_detail_Sq, \
boost::mpl::int_<boost_fusion_detail_N::value> \
> \
{ \
}; \
\
BOOST_PP_REPEAT( \
ATTRIBUTES_SEQ_SIZE, \
BOOST_FUSION_MAKE_VALUE_AT_SPECS, \
~) \
\
template < \
typename boost_fusion_detail_Sq, \
typename boost_fusion_detail_N \
> \
struct at : at< \
boost_fusion_detail_Sq, \
boost::mpl::int_<boost_fusion_detail_N::value> \
> \
{ \
}; \
\
BOOST_PP_SEQ_FOR_EACH_I(BOOST_FUSION_MAKE_AT_SPECS, ~, ATTRIBUTES_SEQ) \
\
BOOST_PP_SEQ_FOR_EACH_I(BOOST_FUSION_MAKE_TYPEDEF, ~, ATTRIBUTES_SEQ) \
\
BOOST_PP_SEQ_FOR_EACH_I( \
BOOST_FUSION_MAKE_DATA_MEMBER, \
~, \
ATTRIBUTES_SEQ)
#endif

View File

@ -11,8 +11,11 @@
#include <boost/fusion/sequence/intrinsic/end.hpp> #include <boost/fusion/sequence/intrinsic/end.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp> #include <boost/fusion/sequence/intrinsic/size.hpp>
#include <boost/fusion/sequence/comparison/detail/equal_to.hpp> #include <boost/fusion/sequence/comparison/detail/equal_to.hpp>
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/config.hpp> #include <boost/config.hpp>
#include <boost/static_assert.hpp> #include <boost/static_assert.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/ice.hpp>
#if defined (BOOST_MSVC) #if defined (BOOST_MSVC)
# pragma warning(push) # pragma warning(push)
@ -54,11 +57,19 @@ namespace boost { namespace fusion
} }
template <typename Seq1, typename Seq2> template <typename Seq1, typename Seq2>
inline void inline
typename
enable_if_c<
type_traits::ice_and<
traits::is_sequence<Seq1>::value
, traits::is_sequence<Seq2>::value
>::value,
void
>::type
copy(Seq1 const& src, Seq2& dest) copy(Seq1 const& src, Seq2& dest)
{ {
BOOST_STATIC_ASSERT( BOOST_STATIC_ASSERT(
result_of::size<Seq1>::value == result_of::size<Seq2>::value); result_of::size<Seq1>::value <= result_of::size<Seq2>::value);
detail::sequence_copy< detail::sequence_copy<
Seq1 const, Seq2>:: Seq1 const, Seq2>::

View File

@ -0,0 +1,84 @@
/*=============================================================================
Copyright (c) 2001-2013 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)
==============================================================================*/
#if !defined(FUSION_MOVE_01192013_2225)
#define FUSION_MOVE_01192013_2225
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/end.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp>
#include <boost/fusion/sequence/comparison/detail/equal_to.hpp>
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/config.hpp>
#include <boost/static_assert.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/ice.hpp>
#if defined (BOOST_MSVC)
# pragma warning(push)
# pragma warning (disable: 4100) // unreferenced formal parameter
#endif
namespace boost { namespace fusion
{
namespace detail
{
template <typename Seq1, typename Seq2>
struct sequence_move
{
typedef typename result_of::end<Seq1>::type end1_type;
typedef typename result_of::end<Seq2>::type end2_type;
template <typename I1, typename I2>
static void
call(I1 const&, I2 const&, mpl::true_)
{
}
template <typename I1, typename I2>
static void
call(I1 const& src, I2 const& dest, mpl::false_)
{
*dest = std::move(*src);
call(fusion::next(src), fusion::next(dest));
}
template <typename I1, typename I2>
static void
call(I1 const& src, I2 const& dest)
{
typename result_of::equal_to<I1, end1_type>::type eq;
return call(src, dest, eq);
}
};
}
template <typename Seq1, typename Seq2>
inline
typename
enable_if_c<
type_traits::ice_and<
traits::is_sequence<Seq1>::value
, traits::is_sequence<Seq2>::value
>::value,
void
>::type
move(Seq1&& src, Seq2& dest)
{
BOOST_STATIC_ASSERT(
result_of::size<Seq1>::value <= result_of::size<Seq2>::value);
detail::sequence_move<
Seq1, Seq2>::
call(fusion::begin(src), fusion::begin(dest));
}
}}
#if defined (BOOST_MSVC)
# pragma warning(pop)
#endif
#endif

View File

@ -9,6 +9,8 @@
#include <boost/fusion/algorithm/iteration/accumulate_fwd.hpp> #include <boost/fusion/algorithm/iteration/accumulate_fwd.hpp>
#include <boost/fusion/algorithm/iteration/fold.hpp> #include <boost/fusion/algorithm/iteration/fold.hpp>
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/utility/enable_if.hpp>
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
@ -23,14 +25,24 @@ namespace boost { namespace fusion
} }
template <typename Sequence, typename State, typename F> template <typename Sequence, typename State, typename F>
inline typename result_of::accumulate<Sequence, State const, F>::type inline
typename
lazy_enable_if<
traits::is_sequence<Sequence>
, result_of::accumulate<Sequence, State const, F>
>::type
accumulate(Sequence& seq, State const& state, F f) accumulate(Sequence& seq, State const& state, F f)
{ {
return fusion::fold(seq, state, f); return fusion::fold(seq, state, f);
} }
template <typename Sequence, typename State, typename F> template <typename Sequence, typename State, typename F>
inline typename result_of::accumulate<Sequence const, State const, F>::type inline
typename
lazy_enable_if<
traits::is_sequence<Sequence>
, result_of::accumulate<Sequence const, State const, F>
>::type
accumulate(Sequence const& seq, State const& state, F f) accumulate(Sequence const& seq, State const& state, F f)
{ {
return fusion::fold(seq, state, f); return fusion::fold(seq, state, f);

View File

@ -7,6 +7,9 @@
#if !defined(BOOST_FUSION_ACCUMULATE_FWD_HPP_INCLUDED) #if !defined(BOOST_FUSION_ACCUMULATE_FWD_HPP_INCLUDED)
#define BOOST_FUSION_ACCUMULATE_FWD_HPP_INCLUDED #define BOOST_FUSION_ACCUMULATE_FWD_HPP_INCLUDED
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/utility/enable_if.hpp>
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
namespace result_of namespace result_of
@ -16,11 +19,19 @@ namespace boost { namespace fusion
} }
template <typename Sequence, typename State, typename F> template <typename Sequence, typename State, typename F>
typename result_of::accumulate<Sequence, State const, F>::type typename
lazy_enable_if<
traits::is_sequence<Sequence>
, result_of::accumulate<Sequence, State const, F>
>::type
accumulate(Sequence& seq, State const& state, F f); accumulate(Sequence& seq, State const& state, F f);
template <typename Sequence, typename State, typename F> template <typename Sequence, typename State, typename F>
typename result_of::accumulate<Sequence const, State const, F>::type typename
lazy_enable_if<
traits::is_sequence<Sequence>
, result_of::accumulate<Sequence const, State const, F>
>::type
accumulate(Sequence const& seq, State const& state, F f); accumulate(Sequence const& seq, State const& state, F f);
}} }}

View File

@ -116,7 +116,7 @@ namespace boost { namespace fusion
{ {
template<typename State, typename It0, typename F> template<typename State, typename It0, typename F>
static Result static Result
call(State const& state,It0 const& it0, F) call(State const& state,It0 const&, F)
{ {
return static_cast<Result>(state); return static_cast<Result>(state);
} }

View File

@ -115,7 +115,7 @@ namespace boost { namespace fusion
{ {
template<typename State, typename It0, typename F> template<typename State, typename It0, typename F>
static Result static Result
call(State const& state,It0 const& it0, F) call(State const& state,It0 const&, F)
{ {
return static_cast<Result>(state); return static_cast<Result>(state);
} }

View File

@ -11,6 +11,8 @@
#include <boost/fusion/algorithm/iteration/detail/for_each.hpp> #include <boost/fusion/algorithm/iteration/detail/for_each.hpp>
#include <boost/fusion/algorithm/iteration/detail/segmented_for_each.hpp> #include <boost/fusion/algorithm/iteration/detail/segmented_for_each.hpp>
#include <boost/fusion/support/is_segmented.hpp> #include <boost/fusion/support/is_segmented.hpp>
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/utility/enable_if.hpp>
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
@ -24,14 +26,24 @@ namespace boost { namespace fusion
} }
template <typename Sequence, typename F> template <typename Sequence, typename F>
inline void inline
typename
enable_if<
traits::is_sequence<Sequence>
, void
>::type
for_each(Sequence& seq, F const& f) for_each(Sequence& seq, F const& f)
{ {
detail::for_each(seq, f, typename traits::is_segmented<Sequence>::type()); detail::for_each(seq, f, typename traits::is_segmented<Sequence>::type());
} }
template <typename Sequence, typename F> template <typename Sequence, typename F>
inline void inline
typename
enable_if<
traits::is_sequence<Sequence>
, void
>::type
for_each(Sequence const& seq, F const& f) for_each(Sequence const& seq, F const& f)
{ {
detail::for_each(seq, f, typename traits::is_segmented<Sequence>::type()); detail::for_each(seq, f, typename traits::is_segmented<Sequence>::type());

View File

@ -7,6 +7,9 @@
#if !defined(BOOST_FUSION_FOR_EACH_FWD_HPP_INCLUDED) #if !defined(BOOST_FUSION_FOR_EACH_FWD_HPP_INCLUDED)
#define BOOST_FUSION_FOR_EACH_FWD_HPP_INCLUDED #define BOOST_FUSION_FOR_EACH_FWD_HPP_INCLUDED
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/utility/enable_if.hpp>
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
namespace result_of namespace result_of
@ -16,11 +19,21 @@ namespace boost { namespace fusion
} }
template <typename Sequence, typename F> template <typename Sequence, typename F>
void inline
typename
enable_if<
traits::is_sequence<Sequence>
, void
>::type
for_each(Sequence& seq, F const& f); for_each(Sequence& seq, F const& f);
template <typename Sequence, typename F> template <typename Sequence, typename F>
void inline
typename
enable_if<
traits::is_sequence<Sequence>
, void
>::type
for_each(Sequence const& seq, F const& f); for_each(Sequence const& seq, F const& f);
}} }}

View File

@ -10,6 +10,8 @@
#include <boost/fusion/algorithm/query/count_if.hpp> #include <boost/fusion/algorithm/query/count_if.hpp>
#include <boost/fusion/algorithm/query/detail/count.hpp> #include <boost/fusion/algorithm/query/detail/count.hpp>
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/utility/enable_if.hpp>
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
@ -23,7 +25,12 @@ namespace boost { namespace fusion
} }
template <typename Sequence, typename T> template <typename Sequence, typename T>
inline int inline
typename
enable_if<
traits::is_sequence<Sequence>
, int
>::type
count(Sequence const& seq, T const& x) count(Sequence const& seq, T const& x)
{ {
detail::count_compare<T> f(x); detail::count_compare<T> f(x);

View File

@ -10,6 +10,8 @@
#include <boost/fusion/algorithm/query/detail/count_if.hpp> #include <boost/fusion/algorithm/query/detail/count_if.hpp>
#include <boost/fusion/support/category_of.hpp> #include <boost/fusion/support/category_of.hpp>
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/utility/enable_if.hpp>
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
@ -23,7 +25,12 @@ namespace boost { namespace fusion
} }
template <typename Sequence, typename F> template <typename Sequence, typename F>
inline int inline
typename
enable_if<
traits::is_sequence<Sequence>
, int
>::type
count_if(Sequence const& seq, F f) count_if(Sequence const& seq, F f)
{ {
return detail::count_if( return detail::count_if(

View File

@ -109,7 +109,7 @@ namespace detail
struct unrolled_any<0> struct unrolled_any<0>
{ {
template <typename It, typename F> template <typename It, typename F>
static bool call(It const& it, F f) static bool call(It const&, F)
{ {
return false; return false;
} }

View File

@ -16,6 +16,9 @@
#include <boost/fusion/sequence/intrinsic/begin.hpp> #include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/end.hpp> #include <boost/fusion/sequence/intrinsic/end.hpp>
#include <boost/fusion/adapted/mpl/mpl_iterator.hpp> #include <boost/fusion/adapted/mpl/mpl_iterator.hpp>
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/mpl/if.hpp>
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
@ -53,18 +56,38 @@ namespace boost { namespace fusion
} }
}; };
struct use_default;
template <class T, class Default>
struct fusion_default_help
: mpl::if_<
is_same<T, use_default>
, Default
, T
>
{
};
template < template <
typename Sequence typename Sequence
, typename First , typename First
, typename Last = typename compute_erase_last<Sequence, First>::type> , typename Last = use_default>
struct erase struct erase
{ {
typedef typename result_of::begin<Sequence>::type seq_first_type; typedef typename result_of::begin<Sequence>::type seq_first_type;
typedef typename result_of::end<Sequence>::type seq_last_type; typedef typename result_of::end<Sequence>::type seq_last_type;
BOOST_STATIC_ASSERT((!result_of::equal_to<seq_first_type, seq_last_type>::value)); BOOST_STATIC_ASSERT((!result_of::equal_to<seq_first_type, seq_last_type>::value));
typedef typename convert_iterator<First>::type first_type; typedef First FirstType;
typedef typename convert_iterator<Last>::type last_type; typedef typename
fusion_default_help<
Last
, typename compute_erase_last<Sequence, First>::type
>::type
LastType;
typedef typename convert_iterator<FirstType>::type first_type;
typedef typename convert_iterator<LastType>::type last_type;
typedef iterator_range<seq_first_type, first_type> left_type; typedef iterator_range<seq_first_type, first_type> left_type;
typedef iterator_range<last_type, seq_last_type> right_type; typedef iterator_range<last_type, seq_last_type> right_type;
typedef joint_view<left_type, right_type> type; typedef joint_view<left_type, right_type> type;
@ -72,7 +95,11 @@ namespace boost { namespace fusion
} }
template <typename Sequence, typename First> template <typename Sequence, typename First>
typename result_of::erase<Sequence const, First>::type typename
lazy_enable_if<
traits::is_sequence<Sequence>
, typename result_of::erase<Sequence const, First>
>::type
erase(Sequence const& seq, First const& first) erase(Sequence const& seq, First const& first)
{ {
typedef result_of::erase<Sequence const, First> result_of; typedef result_of::erase<Sequence const, First> result_of;

View File

@ -16,6 +16,8 @@
#include <boost/fusion/sequence/intrinsic/begin.hpp> #include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/end.hpp> #include <boost/fusion/sequence/intrinsic/end.hpp>
#include <boost/fusion/adapted/mpl/mpl_iterator.hpp> #include <boost/fusion/adapted/mpl/mpl_iterator.hpp>
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/utility/enable_if.hpp>
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
@ -38,8 +40,12 @@ namespace boost { namespace fusion
} }
template <typename Sequence, typename Position, typename T> template <typename Sequence, typename Position, typename T>
inline typename result_of::insert< inline
Sequence const, Position, T>::type typename
lazy_enable_if<
traits::is_sequence<Sequence>
, result_of::insert<Sequence const, Position, T>
>::type
insert(Sequence const& seq, Position const& pos, T const& x) insert(Sequence const& seq, Position const& pos, T const& x)
{ {
typedef result_of::insert< typedef result_of::insert<

View File

@ -10,6 +10,8 @@
#include <boost/fusion/support/detail/as_fusion_element.hpp> #include <boost/fusion/support/detail/as_fusion_element.hpp>
#include <boost/fusion/view/joint_view/joint_view.hpp> #include <boost/fusion/view/joint_view/joint_view.hpp>
#include <boost/fusion/view/single_view/single_view.hpp> #include <boost/fusion/view/single_view/single_view.hpp>
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/utility/enable_if.hpp>
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
@ -24,7 +26,12 @@ namespace boost { namespace fusion
} }
template <typename Sequence, typename T> template <typename Sequence, typename T>
inline typename result_of::push_back<Sequence const, T>::type inline
typename
lazy_enable_if<
traits::is_sequence<Sequence>
, result_of::push_back<Sequence const, T>
>::type
push_back(Sequence const& seq, T const& x) push_back(Sequence const& seq, T const& x)
{ {
typedef typename result_of::push_back<Sequence const, T> push_back; typedef typename result_of::push_back<Sequence const, T> push_back;

View File

@ -10,6 +10,8 @@
#include <boost/fusion/support/detail/as_fusion_element.hpp> #include <boost/fusion/support/detail/as_fusion_element.hpp>
#include <boost/fusion/view/joint_view/joint_view.hpp> #include <boost/fusion/view/joint_view/joint_view.hpp>
#include <boost/fusion/view/single_view/single_view.hpp> #include <boost/fusion/view/single_view/single_view.hpp>
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/utility/enable_if.hpp>
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
@ -24,7 +26,12 @@ namespace boost { namespace fusion
} }
template <typename Sequence, typename T> template <typename Sequence, typename T>
inline typename result_of::push_front<Sequence const, T>::type inline
typename
lazy_enable_if<
traits::is_sequence<Sequence>
, result_of::push_front<Sequence const, T>
>::type
push_front(Sequence const& seq, T const& x) push_front(Sequence const& seq, T const& x)
{ {
typedef typename result_of::push_front<Sequence const, T> push_front; typedef typename result_of::push_front<Sequence const, T> push_front;

View File

@ -9,6 +9,8 @@
#include <boost/fusion/view/transform_view/transform_view.hpp> #include <boost/fusion/view/transform_view/transform_view.hpp>
#include <boost/fusion/algorithm/transformation/detail/replace.hpp> #include <boost/fusion/algorithm/transformation/detail/replace.hpp>
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/utility/enable_if.hpp>
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
@ -22,7 +24,12 @@ namespace boost { namespace fusion
} }
template <typename Sequence, typename T> template <typename Sequence, typename T>
inline typename result_of::replace<Sequence const, T>::type inline
typename
enable_if<
traits::is_sequence<Sequence>
, typename result_of::replace<Sequence const, T>::type
>::type
replace(Sequence const& seq, T const& old_value, T const& new_value) replace(Sequence const& seq, T const& old_value, T const& new_value)
{ {
typedef typename result_of::replace<Sequence const, T>::type result; typedef typename result_of::replace<Sequence const, T>::type result;

View File

@ -9,6 +9,7 @@
#include <boost/fusion/view/transform_view/transform_view.hpp> #include <boost/fusion/view/transform_view/transform_view.hpp>
#include <boost/fusion/algorithm/transformation/detail/replace_if.hpp> #include <boost/fusion/algorithm/transformation/detail/replace_if.hpp>
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/utility/enable_if.hpp> #include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_same.hpp> #include <boost/type_traits/is_same.hpp>
@ -24,7 +25,12 @@ namespace boost { namespace fusion
} }
template <typename Sequence, typename F, typename T> template <typename Sequence, typename F, typename T>
inline typename result_of::replace_if<Sequence const, F, T>::type inline
typename
enable_if<
traits::is_sequence<Sequence>
, typename result_of::replace_if<Sequence const, F, T>::type
>::type
replace_if(Sequence const& seq, F pred, T const& new_value) replace_if(Sequence const& seq, F pred, T const& new_value)
{ {
typedef typename result_of::replace_if<Sequence const, F, T>::type result; typedef typename result_of::replace_if<Sequence const, F, T>::type result;

View File

@ -8,6 +8,8 @@
#define FUSION_REVERSE_07212005_1230 #define FUSION_REVERSE_07212005_1230
#include <boost/fusion/view/reverse_view/reverse_view.hpp> #include <boost/fusion/view/reverse_view/reverse_view.hpp>
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/utility/enable_if.hpp>
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
@ -21,7 +23,12 @@ namespace boost { namespace fusion
} }
template <typename Sequence> template <typename Sequence>
inline reverse_view<Sequence const> inline
typename
enable_if<
traits::is_sequence<Sequence>
, reverse_view<Sequence const>
>::type
reverse(Sequence const& view) reverse(Sequence const& view)
{ {
return reverse_view<Sequence const>(view); return reverse_view<Sequence const>(view);

View File

@ -8,6 +8,7 @@
#if !defined(BOOST_FUSION_SEQUENCE_CONTAINER_DEQUE_24112006_2036) #if !defined(BOOST_FUSION_SEQUENCE_CONTAINER_DEQUE_24112006_2036)
#define BOOST_FUSION_SEQUENCE_CONTAINER_DEQUE_24112006_2036 #define BOOST_FUSION_SEQUENCE_CONTAINER_DEQUE_24112006_2036
#include <boost/fusion/container/deque/deque_fwd.hpp>
#include <boost/fusion/container/deque/deque.hpp> #include <boost/fusion/container/deque/deque.hpp>
#include <boost/fusion/container/deque/convert.hpp> #include <boost/fusion/container/deque/convert.hpp>

View File

@ -1,5 +1,5 @@
/*============================================================================= /*=============================================================================
Copyright (c) 2005-2011 Joel de Guzman Copyright (c) 2005-2012 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden Copyright (c) 2005-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
@ -8,29 +8,40 @@
#if !defined(BOOST_FUSION_BACK_EXTENDED_DEQUE_26112006_2209) #if !defined(BOOST_FUSION_BACK_EXTENDED_DEQUE_26112006_2209)
#define BOOST_FUSION_BACK_EXTENDED_DEQUE_26112006_2209 #define BOOST_FUSION_BACK_EXTENDED_DEQUE_26112006_2209
#include <boost/fusion/container/deque/detail/keyed_element.hpp>
#include <boost/mpl/int.hpp> #include <boost/mpl/int.hpp>
#include <boost/mpl/plus.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp> #include <boost/fusion/sequence/intrinsic/size.hpp>
#include <boost/fusion/support/sequence_base.hpp> #include <boost/fusion/support/sequence_base.hpp>
#include <boost/fusion/container/deque/detail/keyed_element.hpp>
#include <boost/type_traits/add_const.hpp> namespace boost { namespace fusion
#include <boost/type_traits/add_reference.hpp> {
template <typename Deque, typename T>
namespace boost { namespace fusion {
template<typename Deque, typename T>
struct back_extended_deque struct back_extended_deque
: detail::keyed_element<typename Deque::next_up, T, Deque>, : detail::keyed_element<typename Deque::next_up, T, Deque>
sequence_base<back_extended_deque<Deque, T> > , sequence_base<back_extended_deque<Deque, T> >
{ {
typedef detail::keyed_element<typename Deque::next_up, T, Deque> base; typedef detail::keyed_element<typename Deque::next_up, T, Deque> base;
typedef typename Deque::next_down next_down; typedef typename Deque::next_down next_down;
typedef mpl::int_<mpl::plus<typename Deque::next_up, mpl::int_<1> >::value> next_up; typedef mpl::int_<(Deque::next_up::value + 1)> next_up;
typedef mpl::plus<typename result_of::size<Deque>::type, mpl::int_<1> > size; typedef mpl::int_<(result_of::size<Deque>::value + 1)> size;
back_extended_deque(Deque const& deque, typename add_reference<typename add_const<T>::type>::type t) template <typename Arg>
: base(t, deque) back_extended_deque(Deque const& deque, Arg const& val)
: base(val, deque)
{} {}
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename Arg>
back_extended_deque(Deque const& deque, Arg& val)
: base(val, deque)
{}
#else
template <typename Arg>
back_extended_deque(Deque const& deque, Arg&& val)
: base(std::forward<Arg>(val), deque)
{}
#endif
}; };
}} }}

View File

@ -1,5 +1,5 @@
/*============================================================================= /*=============================================================================
Copyright (c) 2005-2011 Joel de Guzman Copyright (c) 2005-2013 Joel de Guzman
Copyright (c) 2006 Dan Marsden 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
@ -8,23 +8,32 @@
#if !defined(FUSION_CONVERT_20061213_2207) #if !defined(FUSION_CONVERT_20061213_2207)
#define FUSION_CONVERT_20061213_2207 #define FUSION_CONVERT_20061213_2207
#include <boost/fusion/container/deque/detail/as_deque.hpp>
#include <boost/fusion/container/deque/detail/convert_impl.hpp> #include <boost/fusion/container/deque/detail/convert_impl.hpp>
#include <boost/fusion/container/deque/deque.hpp> #include <boost/fusion/container/deque/deque.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp> #if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
///////////////////////////////////////////////////////////////////////////////
// C++03 (non-variadic) implementation
///////////////////////////////////////////////////////////////////////////////
#include <boost/fusion/container/deque/detail/cpp03/build_deque.hpp>
#else
///////////////////////////////////////////////////////////////////////////////
// C++11 variadic implementation
///////////////////////////////////////////////////////////////////////////////
#include <boost/fusion/container/deque/detail/build_deque.hpp>
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
namespace result_of namespace result_of
{ {
template <typename Sequence> template <typename Sequence>
struct as_deque struct as_deque :
detail::build_deque<
typename result_of::begin<Sequence>::type
, typename result_of::end<Sequence>::type
>
{ {
typedef typename detail::as_deque<result_of::size<Sequence>::value> gen;
typedef typename gen::
template apply<typename result_of::begin<Sequence>::type>::type
type;
}; };
} }
@ -32,17 +41,18 @@ namespace boost { namespace fusion
inline typename result_of::as_deque<Sequence>::type inline typename result_of::as_deque<Sequence>::type
as_deque(Sequence& seq) as_deque(Sequence& seq)
{ {
typedef typename result_of::as_deque<Sequence>::gen gen; typedef result_of::as_deque<Sequence> gen;
return gen::call(fusion::begin(seq)); return gen::call(fusion::begin(seq), fusion::end(seq));
} }
template <typename Sequence> template <typename Sequence>
inline typename result_of::as_deque<Sequence const>::type inline typename result_of::as_deque<Sequence const>::type
as_deque(Sequence const& seq) as_deque(Sequence const& seq)
{ {
typedef typename result_of::as_deque<Sequence const>::gen gen; typedef result_of::as_deque<Sequence const> gen;
return gen::call(fusion::begin(seq)); return gen::call(fusion::begin(seq), fusion::end(seq));
} }
}} }}
#endif #endif
#endif

View File

@ -1,5 +1,5 @@
/*============================================================================= /*=============================================================================
Copyright (c) 2005-2011 Joel de Guzman Copyright (c) 2005-2012 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden Copyright (c) 2005-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
@ -8,20 +8,23 @@
#if !defined(BOOST_FUSION_DEQUE_26112006_1649) #if !defined(BOOST_FUSION_DEQUE_26112006_1649)
#define BOOST_FUSION_DEQUE_26112006_1649 #define BOOST_FUSION_DEQUE_26112006_1649
#include <boost/fusion/container/deque/limits.hpp> # include <boost/fusion/container/deque/deque_fwd.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/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>
///////////////////////////////////////////////////////////////////////////////
// Without variadics, we will use the PP version
///////////////////////////////////////////////////////////////////////////////
#if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
# include <boost/fusion/container/deque/detail/cpp03/deque.hpp>
#else
///////////////////////////////////////////////////////////////////////////////
// C++11 interface
///////////////////////////////////////////////////////////////////////////////
#include <boost/fusion/support/sequence_base.hpp>
#include <boost/fusion/support/detail/access.hpp>
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/fusion/container/deque/detail/keyed_element.hpp>
#include <boost/fusion/container/deque/detail/deque_keyed_values.hpp>
#include <boost/fusion/container/deque/deque_fwd.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/value_at_impl.hpp>
#include <boost/fusion/container/deque/detail/at_impl.hpp> #include <boost/fusion/container/deque/detail/at_impl.hpp>
@ -29,93 +32,129 @@
#include <boost/fusion/container/deque/detail/end_impl.hpp> #include <boost/fusion/container/deque/detail/end_impl.hpp>
#include <boost/fusion/container/deque/detail/is_sequence_impl.hpp> #include <boost/fusion/container/deque/detail/is_sequence_impl.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp> #include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/mpl/bool.hpp> #include <boost/fusion/sequence/intrinsic/empty.hpp>
#include <boost/fusion/support/sequence_base.hpp> #include <boost/mpl/int.hpp>
#include <boost/fusion/support/void.hpp> #include <boost/mpl/and.hpp>
#include <boost/utility/enable_if.hpp> #include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_convertible.hpp>
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) namespace boost { namespace fusion
#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; struct deque_tag;
template<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename T)> template <typename ...Elements>
struct deque struct deque : detail::nil_keyed_element
:
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 deque_tag fusion_tag;
typedef bidirectional_traversal_tag category; typedef bidirectional_traversal_tag category;
typedef typename detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type base; typedef mpl::int_<0> size;
typedef typename detail::deque_initial_size<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type size; typedef mpl::int_<0> next_up;
typedef mpl::int_<size::value> next_up; typedef mpl::int_<0> next_down;
typedef mpl::int_<
mpl::if_<mpl::equal_to<size, mpl::int_<0> >, mpl::int_<0>, mpl::int_<-1> >::type::value> next_down;
typedef mpl::false_ is_view; typedef mpl::false_ is_view;
#include <boost/fusion/container/deque/detail/deque_forward_ctor.hpp> template <typename Sequence>
deque(Sequence const&,
typename enable_if<
mpl::and_<
traits::is_sequence<Sequence>
, result_of::empty<Sequence>>>::type* /*dummy*/ = 0)
{}
deque() {}
};
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<Head, Tail...>::type base;
typedef mpl::int_<(sizeof ...(Tail) + 1)> size;
typedef mpl::int_<size::value> next_up;
typedef mpl::int_<((size::value == 0) ? 0 : -1)> next_down;
typedef mpl::false_ is_view;
deque() deque()
{} {}
explicit deque(typename add_reference<typename add_const<T0>::type>::type t0) template <typename ...Elements>
: base(t0, detail::nil_keyed_element()) deque(deque<Elements...> const& 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) : base(seq)
{} {}
template<typename Sequence> template <typename ...Elements>
deque(Sequence const& seq, typename disable_if<is_convertible<Sequence, T0> >::type* /*dummy*/ = 0) deque(deque<Elements...>& seq)
: base(seq)
{}
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename ...Elements>
deque(deque<Elements...>&& seq)
: base(std::forward<deque<Elements...>>(seq))
{}
#endif
deque(deque const& seq)
: base(seq)
{}
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
deque(deque&& seq)
: base(std::forward<deque>(seq))
{}
#endif
explicit deque(Head const& head, Tail const&... tail)
: base(detail::deque_keyed_values<Head, Tail...>::construct(head, tail...))
{}
template <typename Head_, typename ...Tail_>
explicit deque(Head_ const& head, Tail_ const&... tail)
: base(detail::deque_keyed_values<Head_, Tail_...>::construct(head, tail...))
{}
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename Head_, typename ...Tail_>
explicit deque(Head_&& head, Tail_&&... tail)
: base(detail::deque_keyed_values<Head, Tail...>
::forward_(std::forward<Head_>(head), std::forward<Tail_>(tail)...))
{}
#endif
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))) : base(base::from_iterator(fusion::begin(seq)))
{} {}
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename U)> template <typename ...Elements>
deque& deque& operator=(deque<Elements...> const& rhs)
operator=(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)> const& rhs)
{ {
base::operator=(rhs); base::operator=(rhs);
return *this; return *this;
} }
template <typename T> template <typename T>
deque& deque& operator=(T const& rhs)
operator=(T const& rhs)
{ {
base::operator=(rhs); base::operator=(rhs);
return *this; return *this;
} }
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename T>
deque& operator=(T&& rhs)
{
base::operator=(std::forward<T>(rhs));
return *this;
}
#endif
}; };
}} }}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif #endif
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#endif #endif

View File

@ -1,5 +1,5 @@
/*============================================================================= /*=============================================================================
Copyright (c) 2005-2011 Joel de Guzman Copyright (c) 2005-2012 Joel de Guzman
Copyright (c) 2005-2007 Dan Marsden Copyright (c) 2005-2007 Dan Marsden
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
@ -8,43 +8,28 @@
#if !defined(FUSION_DEQUE_FORWARD_02092007_0749) #if !defined(FUSION_DEQUE_FORWARD_02092007_0749)
#define FUSION_DEQUE_FORWARD_02092007_0749 #define FUSION_DEQUE_FORWARD_02092007_0749
#include <boost/fusion/container/deque/limits.hpp> #include <boost/config.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_CXX11_DECLTYPE) \
|| defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) \
|| defined(BOOST_NO_CXX11_RVALUE_REFERENCES))
# include <boost/fusion/container/deque/detail/cpp03/deque_fwd.hpp>
#else #else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) # if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/deque" FUSION_MAX_DEQUE_SIZE_STR "_fwd.hpp") # define BOOST_FUSION_HAS_VARIADIC_DEQUE
#endif # 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 namespace boost { namespace fusion
{ {
struct void_; template <typename ...T>
template<
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
FUSION_MAX_DEQUE_SIZE, typename T, void_)>
struct deque; struct deque;
}} }}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif #endif
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#endif #endif

View File

@ -1,5 +1,5 @@
/*============================================================================= /*=============================================================================
Copyright (c) 2005-2011 Joel de Guzman Copyright (c) 2005-2012 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden Copyright (c) 2005-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
@ -18,7 +18,7 @@ namespace boost { namespace fusion {
struct bidirectional_traversal_tag; struct bidirectional_traversal_tag;
template<typename Seq, int Pos> template <typename Seq, int Pos>
struct deque_iterator struct deque_iterator
: iterator_facade<deque_iterator<Seq, Pos>, bidirectional_traversal_tag> : iterator_facade<deque_iterator<Seq, Pos>, bidirectional_traversal_tag>
{ {

View File

@ -1,5 +1,5 @@
/*============================================================================= /*=============================================================================
Copyright (c) 2005-2011 Joel de Guzman Copyright (c) 2005-2012 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden Copyright (c) 2005-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
@ -19,8 +19,8 @@
#include <boost/type_traits/add_const.hpp> #include <boost/type_traits/add_const.hpp>
#include <boost/type_traits/add_reference.hpp> #include <boost/type_traits/add_reference.hpp>
namespace boost { namespace fusion { namespace boost { namespace fusion
{
struct deque_tag; struct deque_tag;
namespace extension namespace extension
@ -38,14 +38,20 @@ namespace boost { namespace fusion {
typedef typename Sequence::next_down next_down; typedef typename Sequence::next_down next_down;
BOOST_MPL_ASSERT_RELATION(next_down::value, !=, next_up::value); BOOST_MPL_ASSERT_RELATION(next_down::value, !=, next_up::value);
typedef mpl::plus<next_down, mpl::int_<1> > offset; static int const offset = next_down::value + 1;
typedef mpl::int_<mpl::plus<N, offset>::value> adjusted_index; typedef mpl::int_<(N::value + offset)> adjusted_index;
typedef typename detail::keyed_element_value_at<Sequence, adjusted_index>::type element_type; typedef typename
typedef typename add_reference< detail::keyed_element_value_at<Sequence, adjusted_index>::type
element_type;
typedef typename
add_reference<
typename mpl::eval_if< typename mpl::eval_if<
is_const<Sequence>, is_const<Sequence>,
add_const<element_type>, add_const<element_type>,
mpl::identity<element_type> >::type>::type type; mpl::identity<element_type> >::type
>::type
type;
static type call(Sequence& seq) static type call(Sequence& seq)
{ {

View File

@ -1,5 +1,5 @@
/*============================================================================= /*=============================================================================
Copyright (c) 2005-2011 Joel de Guzman Copyright (c) 2005-2012 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden Copyright (c) 2005-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
@ -13,8 +13,8 @@
#include <boost/mpl/equal_to.hpp> #include <boost/mpl/equal_to.hpp>
#include <boost/mpl/if.hpp> #include <boost/mpl/if.hpp>
namespace boost { namespace fusion { namespace boost { namespace fusion
{
struct deque_tag; struct deque_tag;
namespace extension namespace extension
@ -28,11 +28,13 @@ namespace boost { namespace fusion {
template<typename Sequence> template<typename Sequence>
struct apply struct apply
{ {
typedef typename mpl::if_< typedef typename
mpl::equal_to<typename Sequence::next_down, typename Sequence::next_up>, mpl::if_c<
deque_iterator<Sequence, 0>, (Sequence::next_down::value == Sequence::next_up::value)
deque_iterator< , deque_iterator<Sequence, 0>
Sequence, mpl::plus<typename Sequence::next_down, mpl::int_<1> >::value> >::type type; , deque_iterator<Sequence, (Sequence::next_down::value + 1)>
>::type
type;
static type call(Sequence& seq) static type call(Sequence& seq)
{ {

View File

@ -0,0 +1,74 @@
/*=============================================================================
Copyright (c) 2005-2013 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)
==============================================================================*/
#if !defined(BOOST_FUSION_BUILD_DEQUE_02032013_1921)
#define BOOST_FUSION_BUILD_DEQUE_02032013_1921
#include <boost/fusion/iterator/equal_to.hpp>
#include <boost/fusion/iterator/next.hpp>
#include <boost/fusion/iterator/value_of.hpp>
#include <boost/fusion/iterator/deref.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/end.hpp>
#include <boost/fusion/container/deque/front_extended_deque.hpp>
namespace boost { namespace fusion { namespace detail
{
template <typename First, typename Last
, bool is_empty = result_of::equal_to<First, Last>::value>
struct build_deque;
template <typename First, typename Last>
struct build_deque<First, Last, true>
{
typedef deque<> type;
static type
call(First const&, Last const&)
{
return type();
}
};
template <typename T, typename Rest>
struct push_front_deque;
template <typename T, typename ...Rest>
struct push_front_deque<T, deque<Rest...>>
{
typedef deque<T, Rest...> type;
static type
call(T const& first, deque<Rest...> const& rest)
{
return type(front_extended_deque<deque<Rest...>, T>(rest, first));
}
};
template <typename First, typename Last>
struct build_deque<First, Last, false>
{
typedef
build_deque<typename result_of::next<First>::type, Last>
next_build_deque;
typedef push_front_deque<
typename result_of::value_of<First>::type
, typename next_build_deque::type>
push_front;
typedef typename push_front::type type;
static type
call(First const& f, Last const& l)
{
typename result_of::value_of<First>::type v = *f;
return push_front::call(
v, next_build_deque::call(fusion::next(f), l));
}
};
}}}
#endif

View File

@ -1,5 +1,5 @@
/*============================================================================= /*=============================================================================
Copyright (c) 2005-2011 Joel de Guzman Copyright (c) 2005-2012 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden Copyright (c) 2005-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
@ -8,7 +8,7 @@
#if !defined(FUSION_CONVERT_IMPL_20061213_2207) #if !defined(FUSION_CONVERT_IMPL_20061213_2207)
#define FUSION_CONVERT_IMPL_20061213_2207 #define FUSION_CONVERT_IMPL_20061213_2207
#include <boost/fusion/container/deque/detail/as_deque.hpp> #include <boost/fusion/container/deque/convert.hpp>
#include <boost/fusion/container/deque/deque.hpp> #include <boost/fusion/container/deque/deque.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp> #include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp> #include <boost/fusion/sequence/intrinsic/size.hpp>
@ -17,6 +17,12 @@ namespace boost { namespace fusion
{ {
struct deque_tag; struct deque_tag;
namespace result_of
{
template <typename Sequence>
struct as_deque;
}
namespace extension namespace extension
{ {
template <typename T> template <typename T>
@ -28,14 +34,11 @@ namespace boost { namespace fusion
template <typename Sequence> template <typename Sequence>
struct apply struct apply
{ {
typedef typename detail::as_deque<result_of::size<Sequence>::value> gen; typedef result_of::as_deque<Sequence> gen;
typedef typename gen:: typedef typename gen::type type;
template apply<typename result_of::begin<Sequence>::type>::type
type;
static type call(Sequence& seq) static type call(Sequence& seq)
{ {
return gen::call(fusion::begin(seq)); return gen::call(seq);
} }
}; };
}; };

View File

@ -1,5 +1,5 @@
/*============================================================================= /*=============================================================================
Copyright (c) 2005-2011 Joel de Guzman Copyright (c) 2005-2012 Joel de Guzman
Copyright (c) 2006 Dan Marsden 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
@ -45,7 +45,7 @@ namespace boost { namespace fusion { namespace detail
}}} }}}
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/deque/detail/preprocessed/as_deque.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque.hpp>
#else #else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "preprocessed/as_deque" FUSION_MAX_DEQUE_SIZE_STR ".hpp") #pragma wave option(preserve: 2, line: 0, output: "preprocessed/as_deque" FUSION_MAX_DEQUE_SIZE_STR ".hpp")
@ -78,7 +78,7 @@ namespace boost { namespace fusion { namespace detail
typedef typename fusion::result_of::value_of<BOOST_PP_CAT(I, n)>::type \ typedef typename fusion::result_of::value_of<BOOST_PP_CAT(I, n)>::type \
BOOST_PP_CAT(T, n); BOOST_PP_CAT(T, n);
#define BOOST_PP_FILENAME_1 <boost/fusion/container/deque/detail/as_deque.hpp> #define BOOST_PP_FILENAME_1 <boost/fusion/container/deque/detail/cpp03/as_deque.hpp>
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE) #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE)
#include BOOST_PP_ITERATE() #include BOOST_PP_ITERATE()

View File

@ -0,0 +1,52 @@
/*=============================================================================
Copyright (c) 2005-2013 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)
==============================================================================*/
#if !defined(BOOST_FUSION_BUILD_DEQUE_02032013_1921)
#define BOOST_FUSION_BUILD_DEQUE_02032013_1921
#if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
#error "C++03 only! This file should not have been included"
#endif
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp>
#include <boost/fusion/container/deque/detail/cpp03/as_deque.hpp>
#include <boost/fusion/container/deque/front_extended_deque.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence>
struct as_deque
{
typedef typename
detail::as_deque<result_of::size<Sequence>::value>
gen;
typedef typename gen::
template apply<typename result_of::begin<Sequence>::type>::type
type;
};
}
template <typename Sequence>
inline typename result_of::as_deque<Sequence>::type
as_deque(Sequence& seq)
{
typedef typename result_of::as_deque<Sequence>::gen gen;
return gen::call(fusion::begin(seq));
}
template <typename Sequence>
inline typename result_of::as_deque<Sequence const>::type
as_deque(Sequence const& seq)
{
typedef typename result_of::as_deque<Sequence const>::gen gen;
return gen::call(fusion::begin(seq));
}
}}
#endif

View File

@ -0,0 +1,181 @@
/*=============================================================================
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_PP_FUSION_DEQUE_26112006_1649)
#define BOOST_PP_FUSION_DEQUE_26112006_1649
#if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
#error "C++03 only! This file should not have been included"
#endif
#include <boost/fusion/container/deque/detail/cpp03/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/cpp03/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/cpp03/preprocessed/deque.hpp>
#else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "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/cpp03/deque_forward_ctor.hpp>
deque()
{}
explicit deque(typename add_reference<typename add_const<T0>::type>::type t0)
: base(t0, detail::nil_keyed_element())
{}
explicit deque(deque const& rhs)
: base(rhs)
{}
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename T0_>
explicit deque(T0_&& t0
, typename enable_if<is_convertible<T0_, T0> >::type* /*dummy*/ = 0
)
: base(std::forward<T0_>(t0), detail::nil_keyed_element())
{}
explicit deque(deque&& rhs)
: base(std::forward<deque>(rhs))
{}
#endif
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)
{}
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename U)>
deque(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>&& seq)
: base(std::forward<deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>>(seq))
{}
#endif
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(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename T>
deque&
operator=(T&& rhs)
{
base::operator=(std::forward<T>(rhs));
return *this;
}
#endif
};
template <>
struct deque<> : detail::nil_keyed_element
{
typedef deque_tag fusion_tag;
typedef bidirectional_traversal_tag category;
typedef mpl::int_<0> size;
typedef mpl::int_<0> next_up;
typedef mpl::int_<0> next_down;
typedef mpl::false_ is_view;
template <typename Sequence>
deque(Sequence const&,
typename enable_if<
mpl::and_<
traits::is_sequence<Sequence>
, result_of::empty<Sequence> > >::type* /*dummy*/ = 0)
{}
deque() {}
};
}}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#endif

View File

@ -1,5 +1,5 @@
/*============================================================================= /*=============================================================================
Copyright (c) 2005-2011 Joel de Guzman Copyright (c) 2005-2012 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden Copyright (c) 2005-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
@ -9,23 +9,44 @@
#if !defined(BOOST_FUSION_SEQUENCE_DEQUE_DETAIL_DEQUE_FORWARD_CTOR_04122006_2212) #if !defined(BOOST_FUSION_SEQUENCE_DEQUE_DETAIL_DEQUE_FORWARD_CTOR_04122006_2212)
#define BOOST_FUSION_SEQUENCE_DEQUE_DETAIL_DEQUE_FORWARD_CTOR_04122006_2212 #define BOOST_FUSION_SEQUENCE_DEQUE_DETAIL_DEQUE_FORWARD_CTOR_04122006_2212
#if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
#error "C++03 only! This file should not have been included"
#endif
#define FUSION_DEQUE_FORWARD_CTOR_FORWARD(z, n, _) std::forward<T_##n>(t##n)
#include <boost/preprocessor/iterate.hpp> #include <boost/preprocessor/iterate.hpp>
#include <boost/preprocessor/repetition/enum_shifted_params.hpp> #include <boost/preprocessor/repetition/enum_shifted_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp> #include <boost/preprocessor/repetition/enum_binary_params.hpp>
#define BOOST_PP_FILENAME_1 \ #define BOOST_PP_FILENAME_1 \
<boost/fusion/container/deque/detail/deque_forward_ctor.hpp> <boost/fusion/container/deque/detail/cpp03/deque_forward_ctor.hpp>
#define BOOST_PP_ITERATION_LIMITS (2, FUSION_MAX_DEQUE_SIZE) #define BOOST_PP_ITERATION_LIMITS (2, FUSION_MAX_DEQUE_SIZE)
#include BOOST_PP_ITERATE() #include BOOST_PP_ITERATE()
#undef FUSION_DEQUE_FORWARD_CTOR_FORWARD
#endif #endif
#else #else
#define N BOOST_PP_ITERATION() #define N BOOST_PP_ITERATION()
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
deque(BOOST_PP_ENUM_BINARY_PARAMS(N, typename add_reference<typename add_const<T, >::type>::type t)) deque(BOOST_PP_ENUM_BINARY_PARAMS(N, typename add_reference<typename add_const<T, >::type>::type t))
: base(detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(N, T)>::call(BOOST_PP_ENUM_PARAMS(N, t))) : base(detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(N, T)>::construct(BOOST_PP_ENUM_PARAMS(N, t)))
{} {}
#else
deque(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& t))
: base(detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(N, T)>::construct(BOOST_PP_ENUM_PARAMS(N, t)))
{}
template <BOOST_PP_ENUM_PARAMS(N, typename T_)>
deque(BOOST_PP_ENUM_BINARY_PARAMS(N, T_, && t))
: base(detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(N, T)>::
forward_(BOOST_PP_ENUM(N, FUSION_DEQUE_FORWARD_CTOR_FORWARD, _)))
{}
#endif
#undef N #undef N
#endif #endif

View File

@ -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_PP_DEQUE_FORWARD_02092007_0749)
#define FUSION_PP_DEQUE_FORWARD_02092007_0749
#if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
#error "C++03 only! This file should not have been included"
#endif
#include <boost/fusion/container/deque/detail/cpp03/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/cpp03/preprocessed/deque_fwd.hpp>
#else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "preprocessed/deque" FUSION_MAX_DEQUE_SIZE_STR "_fwd.hpp")
#endif
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
This is an auto-generated file. Do not edit!
==============================================================================*/
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 1)
#endif
namespace boost { namespace fusion
{
struct void_;
template<
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
FUSION_MAX_DEQUE_SIZE, typename T, void_)>
struct deque;
}}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#endif

View File

@ -1,5 +1,5 @@
/*============================================================================= /*=============================================================================
Copyright (c) 2005-2011 Joel de Guzman Copyright (c) 2005-2012 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden Copyright (c) 2005-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
@ -8,6 +8,10 @@
#if !defined(BOOST_FUSION_DEQUE_DETAIL_DEQUE_INITIAL_SIZE_26112006_2139) #if !defined(BOOST_FUSION_DEQUE_DETAIL_DEQUE_INITIAL_SIZE_26112006_2139)
#define BOOST_FUSION_DEQUE_DETAIL_DEQUE_INITIAL_SIZE_26112006_2139 #define BOOST_FUSION_DEQUE_DETAIL_DEQUE_INITIAL_SIZE_26112006_2139
#if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
#error "C++03 only! This file should not have been included"
#endif
#include <boost/preprocessor/repetition/enum_params.hpp> #include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/mpl/find.hpp> #include <boost/mpl/find.hpp>
#include <boost/mpl/begin.hpp> #include <boost/mpl/begin.hpp>
@ -21,7 +25,7 @@ namespace boost { namespace fusion
}} }}
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/deque/detail/preprocessed/deque_initial_size.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size.hpp>
#else #else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "preprocessed/deque_initial_size" FUSION_MAX_DEQUE_SIZE_STR ".hpp") #pragma wave option(preserve: 2, line: 0, output: "preprocessed/deque_initial_size" FUSION_MAX_DEQUE_SIZE_STR ".hpp")

View File

@ -0,0 +1,111 @@
/*=============================================================================
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_VARIADIC_DEQUE)
#error "C++03 only! This file should not have been included"
#endif
#include <boost/fusion/container/deque/detail/cpp03/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/cpp03/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 construct()
{
return type();
}
static type forward_()
{
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/cpp03/deque_keyed_values_call.hpp>
};
template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(FUSION_MAX_DEQUE_SIZE, typename T, void_)>
struct deque_keyed_values
: deque_keyed_values_impl<mpl::int_<0>, BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>
{};
}}}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#undef FUSION_VOID
#endif

View File

@ -0,0 +1,61 @@
/*=============================================================================
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_PP_IS_ITERATING)
#if !defined(BOOST_FUSION_SEQUENCE_DEQUE_DETAIL_DEQUE_KEYED_VALUES_CALL_04122006_2211)
#define BOOST_FUSION_SEQUENCE_DEQUE_DETAIL_DEQUE_KEYED_VALUES_CALL_04122006_2211
#if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
#error "C++03 only! This file should not have been included"
#endif
#include <boost/preprocessor/iterate.hpp>
#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
#include <boost/preprocessor/repetition/enum_shifted.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#define FUSION_DEQUE_KEYED_VALUES_FORWARD(z, n, _) \
std::forward<BOOST_PP_CAT(T_, n)>(BOOST_PP_CAT(t, n))
#define BOOST_PP_FILENAME_1 \
<boost/fusion/container/deque/detail/cpp03/deque_keyed_values_call.hpp>
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE)
#include BOOST_PP_ITERATE()
#undef FUSION_DEQUE_KEYED_VALUES_FORWARD
#endif
#else
#define N BOOST_PP_ITERATION()
static type construct(BOOST_PP_ENUM_BINARY_PARAMS(N, typename add_reference<typename add_const<T, >::type>::type t))
{
return type(t0,
deque_keyed_values_impl<
next_index
#if N > 1
, BOOST_PP_ENUM_SHIFTED_PARAMS(N, T)
#endif
>::construct(BOOST_PP_ENUM_SHIFTED_PARAMS(N, t)));
}
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <BOOST_PP_ENUM_PARAMS(N, typename T_)>
static type forward_(BOOST_PP_ENUM_BINARY_PARAMS(N, T_, && t))
{
return type(std::forward<T_0>(t0),
deque_keyed_values_impl<
next_index
#if N > 1
, BOOST_PP_ENUM_SHIFTED_PARAMS(N, T_)
#endif
>::forward_(BOOST_PP_ENUM_SHIFTED(N, FUSION_DEQUE_KEYED_VALUES_FORWARD, _)));
}
#endif
#undef N
#endif

View File

@ -1,5 +1,5 @@
/*============================================================================= /*=============================================================================
Copyright (c) 2005-2011 Joel de Guzman Copyright (c) 2005-2012 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden Copyright (c) 2005-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
@ -8,6 +8,10 @@
#if !defined(BOOST_FUSION_DEQUE_LIMITS_26112006_1737) #if !defined(BOOST_FUSION_DEQUE_LIMITS_26112006_1737)
#define BOOST_FUSION_DEQUE_LIMITS_26112006_1737 #define BOOST_FUSION_DEQUE_LIMITS_26112006_1737
#if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
#error "C++03 only! This file should not have been included"
#endif
#include <boost/fusion/container/vector/limits.hpp> #include <boost/fusion/container/vector/limits.hpp>
#if !defined(FUSION_MAX_DEQUE_SIZE) #if !defined(FUSION_MAX_DEQUE_SIZE)

View File

@ -8,15 +8,15 @@
==============================================================================*/ ==============================================================================*/
#if FUSION_MAX_DEQUE_SIZE <= 10 #if FUSION_MAX_DEQUE_SIZE <= 10
#include <boost/fusion/container/deque/detail/preprocessed/as_deque10.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque10.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 20 #elif FUSION_MAX_DEQUE_SIZE <= 20
#include <boost/fusion/container/deque/detail/preprocessed/as_deque20.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque20.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 30 #elif FUSION_MAX_DEQUE_SIZE <= 30
#include <boost/fusion/container/deque/detail/preprocessed/as_deque30.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque30.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 40 #elif FUSION_MAX_DEQUE_SIZE <= 40
#include <boost/fusion/container/deque/detail/preprocessed/as_deque40.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque40.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 50 #elif FUSION_MAX_DEQUE_SIZE <= 50
#include <boost/fusion/container/deque/detail/preprocessed/as_deque50.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque50.hpp>
#else #else
#error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers" #error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers"
#endif #endif

View File

@ -8,15 +8,15 @@
==============================================================================*/ ==============================================================================*/
#if FUSION_MAX_DEQUE_SIZE <= 10 #if FUSION_MAX_DEQUE_SIZE <= 10
#include <boost/fusion/container/deque/detail/preprocessed/deque10.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque10.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 20 #elif FUSION_MAX_DEQUE_SIZE <= 20
#include <boost/fusion/container/deque/detail/preprocessed/deque20.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque20.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 30 #elif FUSION_MAX_DEQUE_SIZE <= 30
#include <boost/fusion/container/deque/detail/preprocessed/deque30.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque30.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 40 #elif FUSION_MAX_DEQUE_SIZE <= 40
#include <boost/fusion/container/deque/detail/preprocessed/deque40.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque40.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 50 #elif FUSION_MAX_DEQUE_SIZE <= 50
#include <boost/fusion/container/deque/detail/preprocessed/deque50.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque50.hpp>
#else #else
#error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers" #error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers"
#endif #endif

View File

@ -8,15 +8,15 @@
==============================================================================*/ ==============================================================================*/
#if FUSION_MAX_DEQUE_SIZE <= 10 #if FUSION_MAX_DEQUE_SIZE <= 10
#include <boost/fusion/container/deque/detail/preprocessed/deque10_fwd.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque10_fwd.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 20 #elif FUSION_MAX_DEQUE_SIZE <= 20
#include <boost/fusion/container/deque/detail/preprocessed/deque20_fwd.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque20_fwd.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 30 #elif FUSION_MAX_DEQUE_SIZE <= 30
#include <boost/fusion/container/deque/detail/preprocessed/deque30_fwd.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque30_fwd.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 40 #elif FUSION_MAX_DEQUE_SIZE <= 40
#include <boost/fusion/container/deque/detail/preprocessed/deque40_fwd.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque40_fwd.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 50 #elif FUSION_MAX_DEQUE_SIZE <= 50
#include <boost/fusion/container/deque/detail/preprocessed/deque50_fwd.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque50_fwd.hpp>
#else #else
#error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers" #error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers"
#endif #endif

View File

@ -8,15 +8,15 @@
==============================================================================*/ ==============================================================================*/
#if FUSION_MAX_DEQUE_SIZE <= 10 #if FUSION_MAX_DEQUE_SIZE <= 10
#include <boost/fusion/container/deque/detail/preprocessed/deque_initial_size10.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size10.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 20 #elif FUSION_MAX_DEQUE_SIZE <= 20
#include <boost/fusion/container/deque/detail/preprocessed/deque_initial_size20.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size20.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 30 #elif FUSION_MAX_DEQUE_SIZE <= 30
#include <boost/fusion/container/deque/detail/preprocessed/deque_initial_size30.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size30.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 40 #elif FUSION_MAX_DEQUE_SIZE <= 40
#include <boost/fusion/container/deque/detail/preprocessed/deque_initial_size40.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size40.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 50 #elif FUSION_MAX_DEQUE_SIZE <= 50
#include <boost/fusion/container/deque/detail/preprocessed/deque_initial_size50.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size50.hpp>
#else #else
#error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers" #error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers"
#endif #endif

View File

@ -8,15 +8,15 @@
==============================================================================*/ ==============================================================================*/
#if FUSION_MAX_DEQUE_SIZE <= 10 #if FUSION_MAX_DEQUE_SIZE <= 10
#include <boost/fusion/container/deque/detail/preprocessed/deque_keyed_values10.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values10.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 20 #elif FUSION_MAX_DEQUE_SIZE <= 20
#include <boost/fusion/container/deque/detail/preprocessed/deque_keyed_values20.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values20.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 30 #elif FUSION_MAX_DEQUE_SIZE <= 30
#include <boost/fusion/container/deque/detail/preprocessed/deque_keyed_values30.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values30.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 40 #elif FUSION_MAX_DEQUE_SIZE <= 40
#include <boost/fusion/container/deque/detail/preprocessed/deque_keyed_values40.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values40.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 50 #elif FUSION_MAX_DEQUE_SIZE <= 50
#include <boost/fusion/container/deque/detail/preprocessed/deque_keyed_values50.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values50.hpp>
#else #else
#error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers" #error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers"
#endif #endif

View File

@ -1,102 +1,67 @@
/*============================================================================= /*=============================================================================
Copyright (c) 2005-2011 Joel de Guzman Copyright (c) 2005-2012 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden Copyright (c) 2005-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) 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) #if !defined(BOOST_FUSION_DEQUE_DETAIL_CPP11_DEQUE_KEYED_VALUES_07042012_1901)
#define BOOST_FUSION_DEQUE_DETAIL_DEQUE_KEYED_VALUES_26112006_1330 #define BOOST_FUSION_DEQUE_DETAIL_CPP11_DEQUE_KEYED_VALUES_07042012_1901
#include <boost/fusion/container/deque/limits.hpp>
#include <boost/fusion/container/deque/detail/keyed_element.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/type_traits/add_reference.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/mpl/plus.hpp>
#include <boost/mpl/int.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 namespace boost { namespace fusion { namespace detail
{ {
template<typename Key, typename Value, typename Rest> template<typename Key, typename Value, typename Rest>
struct keyed_element; struct keyed_element;
struct nil_keyed_element; template <typename N, typename ...Elements>
template<typename N, BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(FUSION_MAX_DEQUE_SIZE, typename T, void_)>
struct deque_keyed_values_impl; struct deque_keyed_values_impl;
template<typename N> template <typename N, typename Head, typename ...Tail>
struct deque_keyed_values_impl<N, BOOST_PP_ENUM(FUSION_MAX_DEQUE_SIZE, FUSION_VOID, _)> struct deque_keyed_values_impl<N, Head, Tail...>
{ {
typedef nil_keyed_element type; 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() static type construct(
typename detail::call_param<Head>::type head
, typename detail::call_param<Tail>::type... tail)
{ {
return type(); return type(
head
, deque_keyed_values_impl<next_index, Tail...>::construct(tail...)
);
}
template <typename Head_, typename ...Tail_>
static type forward_(Head_&& head, Tail_&&... tail)
{
return type(
std::forward<Head_>(head)
, deque_keyed_values_impl<next_index, Tail_...>::
forward_(std::forward<Tail_>(tail)...)
);
} }
}; };
template<typename N, BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename T)> struct nil_keyed_element;
struct deque_keyed_values_impl
template <typename N>
struct deque_keyed_values_impl<N>
{ {
typedef mpl::int_<mpl::plus<N, mpl::int_<1> >::value> next_index; typedef nil_keyed_element type;
static type construct() { return type(); }
typedef typename deque_keyed_values_impl< static type forward_() { return type(); }
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_)> template <typename ...Elements>
struct deque_keyed_values struct deque_keyed_values
: deque_keyed_values_impl<mpl::int_<0>, BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)> : deque_keyed_values_impl<mpl::int_<0>, Elements...> {};
{};
}}} }}}
#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 #endif

View File

@ -1,38 +0,0 @@
/*=============================================================================
Copyright (c) 2005-2011 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_PP_IS_ITERATING)
#if !defined(BOOST_FUSION_SEQUENCE_DEQUE_DETAIL_DEQUE_KEYED_VALUES_CALL_04122006_2211)
#define BOOST_FUSION_SEQUENCE_DEQUE_DETAIL_DEQUE_KEYED_VALUES_CALL_04122006_2211
#include <boost/preprocessor/iterate.hpp>
#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#define BOOST_PP_FILENAME_1 \
<boost/fusion/container/deque/detail/deque_keyed_values_call.hpp>
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE)
#include BOOST_PP_ITERATE()
#endif
#else
#define N BOOST_PP_ITERATION()
static type call(BOOST_PP_ENUM_BINARY_PARAMS(N, typename add_reference<typename add_const<T, >::type>::type t))
{
return type(t0,
deque_keyed_values_impl<
next_index
#if N > 1
, BOOST_PP_ENUM_SHIFTED_PARAMS(N, T)
#endif
>::call(BOOST_PP_ENUM_SHIFTED_PARAMS(N, t)));
}
#undef N
#endif

View File

@ -1,5 +1,5 @@
/*============================================================================= /*=============================================================================
Copyright (c) 2005-2011 Joel de Guzman Copyright (c) 2005-2012 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden Copyright (c) 2005-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
@ -13,8 +13,8 @@
#include <boost/mpl/equal_to.hpp> #include <boost/mpl/equal_to.hpp>
#include <boost/mpl/if.hpp> #include <boost/mpl/if.hpp>
namespace boost { namespace fusion { namespace boost { namespace fusion
{
struct deque_tag; struct deque_tag;
namespace extension namespace extension
@ -28,11 +28,13 @@ namespace boost { namespace fusion {
template<typename Sequence> template<typename Sequence>
struct apply struct apply
{ {
typedef typename mpl::if_< typedef typename
mpl::equal_to<typename Sequence::next_down, typename Sequence::next_up>, mpl::if_c<
deque_iterator<Sequence, 0>, (Sequence::next_down::value == Sequence::next_up::value)
deque_iterator< , deque_iterator<Sequence, 0>
Sequence, Sequence::next_up::value> >::type type; , deque_iterator<Sequence, Sequence::next_up::value>
>::type
type;
static type call(Sequence& seq) static type call(Sequence& seq)
{ {

View File

@ -23,9 +23,7 @@ namespace boost { namespace fusion
struct is_sequence_impl<deque_tag> struct is_sequence_impl<deque_tag>
{ {
template<typename Sequence> template<typename Sequence>
struct apply struct apply : mpl::true_ {};
: mpl::true_
{};
}; };
} }
}} }}

View File

@ -1,5 +1,5 @@
/*============================================================================= /*=============================================================================
Copyright (c) 2005-2011 Joel de Guzman Copyright (c) 2005-2012 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden Copyright (c) 2005-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
@ -8,18 +8,17 @@
#if !defined(BOOST_FUSION_DEQUE_DETAIL_KEYED_ELEMENT_26112006_1330) #if !defined(BOOST_FUSION_DEQUE_DETAIL_KEYED_ELEMENT_26112006_1330)
#define 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/fusion/support/detail/access.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/fusion/iterator/deref.hpp> #include <boost/fusion/iterator/deref.hpp>
#include <boost/fusion/iterator/next.hpp> #include <boost/fusion/iterator/next.hpp>
namespace boost { namespace fusion { namespace boost { namespace fusion
{
struct fusion_sequence_tag; struct fusion_sequence_tag;
}}
namespace detail { namespace boost { namespace fusion { namespace detail
{
struct nil_keyed_element struct nil_keyed_element
{ {
typedef fusion_sequence_tag tag; typedef fusion_sequence_tag tag;
@ -33,15 +32,14 @@ namespace detail {
} }
}; };
template<typename Key, typename Value, typename Rest> template <typename Key, typename Value, typename Rest>
struct keyed_element struct keyed_element : Rest
: Rest
{ {
typedef Rest base; typedef Rest base;
typedef fusion_sequence_tag tag; typedef fusion_sequence_tag tag;
using Rest::get; using Rest::get;
template<typename It> template <typename It>
static keyed_element static keyed_element
from_iterator(It const& it) from_iterator(It const& it)
{ {
@ -49,30 +47,65 @@ namespace detail {
*it, base::from_iterator(fusion::next(it))); *it, base::from_iterator(fusion::next(it)));
} }
template<typename U, typename Rst> keyed_element(keyed_element const& rhs)
: Rest(rhs.get_base()), value_(rhs.value_)
{}
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
keyed_element(keyed_element&& rhs)
: Rest(std::forward<Rest>(rhs.forward_base()))
, value_(std::forward<Value>(rhs.value_))
{}
#endif
template <typename U, typename Rst>
keyed_element(keyed_element<Key, U, Rst> const& rhs) keyed_element(keyed_element<Key, U, Rst> const& rhs)
: Rest(rhs.get_base()), value_(rhs.value_) : Rest(rhs.get_base()), value_(rhs.value_)
{} {}
Rest const get_base() const #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
#endif
Rest& get_base()
{ {
return *this; return *this;
} }
typename add_reference<typename add_const<Value>::type>::type get(Key) const Rest const& get_base() const
{
return *this;
}
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
Rest&& forward_base()
{
return std::forward<Rest>(*static_cast<Rest*>(this));
}
#endif
typename cref_result<Value>::type get(Key) const
{ {
return value_; return value_;
} }
typename add_reference<Value>::type get(Key) typename ref_result<Value>::type get(Key)
{ {
return value_; return value_;
} }
keyed_element(typename add_reference<typename add_const<Value>::type>::type value, Rest const& rest) keyed_element(
typename detail::call_param<Value>::type value
, Rest const& rest)
: Rest(rest), value_(value) : Rest(rest), value_(value)
{} {}
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
keyed_element(Value&& value, Rest&& rest)
: Rest(std::forward<Rest>(rest))
, value_(std::forward<Value>(value))
{}
#endif
keyed_element() keyed_element()
: Rest(), value_() : Rest(), value_()
{} {}
@ -92,6 +125,15 @@ namespace detail {
return *this; return *this;
} }
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
keyed_element& operator=(keyed_element&& rhs)
{
base::operator=(std::forward<keyed_element>(rhs));
value_ = std::forward<Value>(rhs.value_);
return *this;
}
#endif
Value value_; Value value_;
}; };
@ -105,7 +147,6 @@ namespace detail {
{ {
typedef Value type; typedef Value type;
}; };
}}} }}}
#endif #endif

View File

@ -1,5 +1,5 @@
/*============================================================================= /*=============================================================================
Copyright (c) 2005-2011 Joel de Guzman Copyright (c) 2005-2012 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden Copyright (c) 2005-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
@ -13,8 +13,8 @@
#include <boost/mpl/equal_to.hpp> #include <boost/mpl/equal_to.hpp>
#include <boost/mpl/assert.hpp> #include <boost/mpl/assert.hpp>
namespace boost { namespace fusion { namespace boost { namespace fusion
{
struct deque_tag; struct deque_tag;
namespace extension namespace extension
@ -32,9 +32,11 @@ namespace boost { namespace fusion {
typedef typename Sequence::next_down next_down; typedef typename Sequence::next_down next_down;
BOOST_MPL_ASSERT_RELATION(next_down::value, !=, next_up::value); BOOST_MPL_ASSERT_RELATION(next_down::value, !=, next_up::value);
typedef mpl::plus<next_down, mpl::int_<1> > offset; static int const offset = next_down::value + 1;
typedef mpl::int_<mpl::plus<N, offset>::value> adjusted_index; typedef mpl::int_<(N::value + offset)> adjusted_index;
typedef typename detail::keyed_element_value_at<Sequence, adjusted_index>::type type; typedef typename
detail::keyed_element_value_at<Sequence, adjusted_index>::type
type;
}; };
}; };
} }

View File

@ -1,5 +1,5 @@
/*============================================================================= /*=============================================================================
Copyright (c) 2005-2011 Joel de Guzman Copyright (c) 2005-2012 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden Copyright (c) 2005-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
@ -8,32 +8,39 @@
#if !defined(BOOST_FUSION_FRONT_EXTENDED_DEQUE_26112006_2209) #if !defined(BOOST_FUSION_FRONT_EXTENDED_DEQUE_26112006_2209)
#define BOOST_FUSION_FRONT_EXTENDED_DEQUE_26112006_2209 #define BOOST_FUSION_FRONT_EXTENDED_DEQUE_26112006_2209
#include <boost/fusion/container/deque/detail/keyed_element.hpp>
#include <boost/mpl/int.hpp> #include <boost/mpl/int.hpp>
#include <boost/mpl/minus.hpp>
#include <boost/mpl/plus.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/type_traits/add_reference.hpp>
#include <boost/fusion/support/sequence_base.hpp> #include <boost/fusion/support/sequence_base.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp>
#include <boost/fusion/container/deque/detail/keyed_element.hpp>
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
template<typename Deque, typename T> template <typename Deque, typename T>
struct front_extended_deque struct front_extended_deque
: detail::keyed_element<typename Deque::next_down, T, Deque>, : detail::keyed_element<typename Deque::next_down, T, Deque>
sequence_base<front_extended_deque<Deque, T> > , sequence_base<front_extended_deque<Deque, T> >
{ {
typedef detail::keyed_element<typename Deque::next_down, T, Deque> base; typedef detail::keyed_element<typename Deque::next_down, T, Deque> base;
typedef mpl::int_<mpl::minus<typename Deque::next_down, mpl::int_<1> >::value> next_down; typedef mpl::int_<(Deque::next_down::value - 1)> next_down;
typedef typename Deque::next_up next_up; typedef typename Deque::next_up next_up;
typedef mpl::plus<typename result_of::size<Deque>::type, mpl::int_<1> > size; typedef mpl::int_<(result_of::size<Deque>::value + 1)> size;
front_extended_deque(Deque const& deque, typename add_reference<typename add_const<T>::type>::type t) template <typename Arg>
: base(t, deque) front_extended_deque(Deque const& deque, Arg const& val)
: base(val, deque)
{} {}
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename Arg>
front_extended_deque(Deque const& deque, Arg& val)
: base(val, deque)
{}
#else
template <typename Arg>
front_extended_deque(Deque const& deque, Arg&& val)
: base(std::forward<Arg>(val), deque)
{}
#endif
}; };
}} }}

View File

@ -11,11 +11,11 @@
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
struct nil; struct nil_;
namespace result_of namespace result_of
{ {
template <typename Car, typename Cdr = nil> template <typename Car, typename Cdr = nil_>
struct cons_tie struct cons_tie
{ {
typedef cons<Car&, Cdr> type; typedef cons<Car&, Cdr> type;

View File

@ -1,41 +1,23 @@
/*============================================================================= /*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman Copyright (c) 2001-2013 Joel de Guzman
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) file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/ ==============================================================================*/
#ifndef BOOST_PP_IS_ITERATING #if !defined(FUSION_DEQUE_TIE_01272013_1401)
#if !defined(FUSION_DEQUE_TIE_07192005_1242) #define FUSION_DEQUE_TIE_01272013_1401
#define FUSION_DEQUE_TIE_07192005_1242
#include <boost/preprocessor/iterate.hpp>
#include <boost/preprocessor/cat.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/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/fusion/container/deque/deque.hpp> #include <boost/fusion/container/deque/deque.hpp>
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) #if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
#include <boost/fusion/container/generation/detail/preprocessed/deque_tie.hpp> # include <boost/fusion/container/generation/detail/pp_deque_tie.hpp>
#else #else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/deque_tie" FUSION_MAX_DEQUE_SIZE_STR".hpp")
#endif
/*============================================================================= ///////////////////////////////////////////////////////////////////////////////
Copyright (c) 2001-2011 Joel de Guzman // C++11 variadic interface
///////////////////////////////////////////////////////////////////////////////
Distributed under the Boost Software License, Version 1.0. (See accompanying #include <boost/fusion/support/detail/as_fusion_element.hpp>
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
{ {
@ -43,63 +25,21 @@ namespace boost { namespace fusion
namespace result_of namespace result_of
{ {
template < template <typename ...T>
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( struct deque_tie
FUSION_MAX_DEQUE_SIZE, typename T, void_)
, typename Extra = void_
>
struct deque_tie;
}
#define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)&
#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/deque_tie.hpp>
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE)
#include BOOST_PP_ITERATE()
#undef BOOST_FUSION_REF
}}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#endif
#else // defined(BOOST_PP_IS_ITERATING)
///////////////////////////////////////////////////////////////////////////////
//
// Preprocessor vertical repetition code
//
///////////////////////////////////////////////////////////////////////////////
#define N BOOST_PP_ITERATION()
namespace result_of
{ {
template <BOOST_PP_ENUM_PARAMS(N, typename T)> typedef deque<T&...> type;
#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
#define TEXT(z, n, text) , text
struct deque_tie< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_DEQUE_SIZE, TEXT, void_) >
#undef TEXT
#else
struct deque_tie<BOOST_PP_ENUM_PARAMS(N, T)>
#endif
{
typedef deque<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)> type;
}; };
} }
template <BOOST_PP_ENUM_PARAMS(N, typename T)> template <typename ...T>
inline deque<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)> inline deque<T&...>
deque_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & _)) deque_tie(T&... arg)
{ {
return deque<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)>( return deque<T&...>(arg...);
BOOST_PP_ENUM_PARAMS(N, _));
} }
}}
#undef N #endif
#endif // defined(BOOST_PP_IS_ITERATING) #endif

View File

@ -0,0 +1,105 @@
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Copyright (c) 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)
==============================================================================*/
#ifndef BOOST_PP_IS_ITERATING
#if !defined(FUSION_PP_DEQUE_TIE_07192005_1242)
#define FUSION_PP_DEQUE_TIE_07192005_1242
#include <boost/preprocessor/iterate.hpp>
#include <boost/preprocessor/cat.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/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/fusion/container/deque/deque.hpp>
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/generation/detail/preprocessed/deque_tie.hpp>
#else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/deque_tie" 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 void_;
namespace result_of
{
template <
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
FUSION_MAX_DEQUE_SIZE, typename T, void_)
, typename Extra = void_
>
struct deque_tie;
}
#define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)&
#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/detail/pp_deque_tie.hpp>
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE)
#include BOOST_PP_ITERATE()
#undef BOOST_FUSION_REF
}}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#endif
#else // defined(BOOST_PP_IS_ITERATING)
///////////////////////////////////////////////////////////////////////////////
//
// Preprocessor vertical repetition code
//
///////////////////////////////////////////////////////////////////////////////
#define N BOOST_PP_ITERATION()
namespace result_of
{
template <BOOST_PP_ENUM_PARAMS(N, typename T)>
#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
#define TEXT(z, n, text) , text
struct deque_tie< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_DEQUE_SIZE, TEXT, void_) >
#undef TEXT
#else
struct deque_tie<BOOST_PP_ENUM_PARAMS(N, T)>
#endif
{
typedef deque<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)> type;
};
}
template <BOOST_PP_ENUM_PARAMS(N, typename T)>
inline deque<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)>
deque_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & _))
{
return deque<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)>(
BOOST_PP_ENUM_PARAMS(N, _));
}
#undef N
#endif // defined(BOOST_PP_IS_ITERATING)

View File

@ -0,0 +1,121 @@
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Copyright (c) 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)
==============================================================================*/
#ifndef BOOST_PP_IS_ITERATING
#if !defined(FUSION_PP_MAKE_DEQUE_07162005_0243)
#define FUSION_MAKE_PP_DEQUE_07162005_0243
#include <boost/preprocessor/iterate.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/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/fusion/container/deque/deque.hpp>
#include <boost/fusion/support/detail/as_fusion_element.hpp>
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/generation/detail/preprocessed/make_deque.hpp>
#else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/make_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 void_;
namespace result_of
{
template <
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
FUSION_MAX_DEQUE_SIZE, typename T, void_)
, typename Extra = void_
>
struct make_deque;
template <>
struct make_deque<>
{
typedef deque<> type;
};
}
inline deque<>
make_deque()
{
return deque<>();
}
#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \
typename detail::as_fusion_element<BOOST_PP_CAT(T, n)>::type
#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \
typename detail::as_fusion_element<BOOST_PP_CAT(T, n)>::type
#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/detail/pp_make_deque.hpp>
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE)
#include BOOST_PP_ITERATE()
#undef BOOST_FUSION_AS_FUSION_ELEMENT
}}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#endif
#else // defined(BOOST_PP_IS_ITERATING)
///////////////////////////////////////////////////////////////////////////////
//
// Preprocessor vertical repetition code
//
///////////////////////////////////////////////////////////////////////////////
#define N BOOST_PP_ITERATION()
namespace result_of
{
template <BOOST_PP_ENUM_PARAMS(N, typename T)>
#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
#define TEXT(z, n, text) , text
struct make_deque< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_DEQUE_SIZE, TEXT, void_) >
#undef TEXT
#else
struct make_deque<BOOST_PP_ENUM_PARAMS(N, T)>
#endif
{
typedef deque<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> type;
};
}
template <BOOST_PP_ENUM_PARAMS(N, typename T)>
inline deque<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>
make_deque(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _))
{
return deque<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>(
BOOST_PP_ENUM_PARAMS(N, _));
}
#undef N
#endif // defined(BOOST_PP_IS_ITERATING)

View File

@ -0,0 +1,132 @@
/*=============================================================================
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)
==============================================================================*/
#ifndef BOOST_PP_IS_ITERATING
#if !defined(FUSION_PP_MAKE_MAP_07222005_1247)
#define FUSION_PP_MAKE_MAP_07222005_1247
#include <boost/preprocessor/iterate.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/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/fusion/container/map/map.hpp>
#include <boost/fusion/support/detail/as_fusion_element.hpp>
#include <boost/fusion/support/pair.hpp>
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/generation/detail/preprocessed/make_map.hpp>
#else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/make_map" FUSION_MAX_MAP_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 void_;
namespace result_of
{
template <
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
FUSION_MAX_VECTOR_SIZE, typename K, void_)
, BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
FUSION_MAX_VECTOR_SIZE, typename D, void_)
, typename Extra = void_
>
struct make_map;
template <>
struct make_map<>
{
typedef map<> type;
};
}
inline map<>
make_map()
{
return map<>();
}
#define BOOST_FUSION_PAIR(z, n, data) \
fusion::pair< \
BOOST_PP_CAT(K, n) \
, typename detail::as_fusion_element<BOOST_PP_CAT(D, n)>::type>
#define BOOST_FUSION_MAKE_PAIR(z, n, data) \
fusion::make_pair<BOOST_PP_CAT(K, n)>(BOOST_PP_CAT(_, n)) \
#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/detail/pp_make_map.hpp>
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE)
#include BOOST_PP_ITERATE()
#undef BOOST_FUSION_PAIR
#undef BOOST_FUSION_MAKE_PAIR
}}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#endif
#else // defined(BOOST_PP_IS_ITERATING)
///////////////////////////////////////////////////////////////////////////////
//
// Preprocessor vertical repetition code
//
///////////////////////////////////////////////////////////////////////////////
#define N BOOST_PP_ITERATION()
namespace result_of
{
template <
BOOST_PP_ENUM_PARAMS(N, typename K)
, BOOST_PP_ENUM_PARAMS(N, typename D)
>
#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
#define TEXT(z, n, text) , text
struct make_map<BOOST_PP_ENUM_PARAMS(N, K), BOOST_PP_ENUM_PARAMS(N, D) BOOST_PP_REPEAT_FROM_TO(N, FUSION_MAX_VECTOR_SIZE, TEXT, void_) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_VECTOR_SIZE, TEXT, void_)>
#undef TEXT
#else
struct make_map<BOOST_PP_ENUM_PARAMS(N, K), BOOST_PP_ENUM_PARAMS(N, D)>
#endif
{
typedef map<BOOST_PP_ENUM(N, BOOST_FUSION_PAIR, _)> type;
};
}
template <
BOOST_PP_ENUM_PARAMS(N, typename K)
, BOOST_PP_ENUM_PARAMS(N, typename D)
>
inline map<BOOST_PP_ENUM(N, BOOST_FUSION_PAIR, _)>
make_map(BOOST_PP_ENUM_BINARY_PARAMS(N, D, const& _))
{
return map<BOOST_PP_ENUM(N, BOOST_FUSION_PAIR, _)>(
BOOST_PP_ENUM(N, BOOST_FUSION_MAKE_PAIR, _));
}
#undef N
#endif // defined(BOOST_PP_IS_ITERATING)

View File

@ -0,0 +1,136 @@
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Copyright (c) 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)
==============================================================================*/
#ifndef BOOST_PP_IS_ITERATING
#if !defined(FUSION_PP_MAP_TIE_20060814_1116)
#define FUSION_PP_MAP_TIE_20060814_1116
#include <boost/preprocessor/iterate.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/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/fusion/container/map/map.hpp>
#include <boost/fusion/container/map/detail/cpp03/limits.hpp>
#include <boost/fusion/support/pair.hpp>
#include <boost/fusion/container/generation/pair_tie.hpp>
#include <boost/type_traits/add_reference.hpp>
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/generation/detail/preprocessed/map_tie.hpp>
#else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/map_tie" FUSION_MAX_MAP_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 void_;
namespace result_of
{
template <
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
FUSION_MAX_MAP_SIZE, typename K, void_)
, BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
FUSION_MAX_MAP_SIZE, typename D, void_)
, typename Extra = void_
>
struct map_tie;
template <>
struct map_tie<>
{
typedef map<> type;
};
}
inline map<>
map_tie()
{
return map<>();
}
#define BOOST_FUSION_TIED_PAIR(z, n, data) \
fusion::pair< \
BOOST_PP_CAT(K, n) \
, typename add_reference<BOOST_PP_CAT(D, n)>::type>
#define BOOST_FUSION_PAIR_TIE(z, n, data) \
fusion::pair_tie<BOOST_PP_CAT(K, n)>(BOOST_PP_CAT(_, n)) \
#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/detail/pp_map_tie.hpp>
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_MAP_SIZE)
#include BOOST_PP_ITERATE()
#undef BOOST_FUSION_PAIR
#undef BOOST_FUSION_MAKE_PAIR
}}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#endif
#else // defined(BOOST_PP_IS_ITERATING)
///////////////////////////////////////////////////////////////////////////////
//
// Preprocessor vertical repetition code
//
///////////////////////////////////////////////////////////////////////////////
#define N BOOST_PP_ITERATION()
namespace result_of
{
template <
BOOST_PP_ENUM_PARAMS(N, typename K)
, BOOST_PP_ENUM_PARAMS(N, typename D)
>
#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
#define TEXT(z, n, text) , text
struct map_tie<BOOST_PP_ENUM_PARAMS(N, K), BOOST_PP_ENUM_PARAMS(N, D) BOOST_PP_REPEAT_FROM_TO(N, FUSION_MAX_MAP_SIZE, TEXT, void_) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_MAP_SIZE, TEXT, void_)>
#undef TEXT
#else
struct map_tie<BOOST_PP_ENUM_PARAMS(N, K), BOOST_PP_ENUM_PARAMS(N, D)>
#endif
{
typedef map<BOOST_PP_ENUM(N, BOOST_FUSION_TIED_PAIR, _)> type;
};
}
template <
BOOST_PP_ENUM_PARAMS(N, typename K)
, BOOST_PP_ENUM_PARAMS(N, typename D)
>
inline map<BOOST_PP_ENUM(N, BOOST_FUSION_TIED_PAIR, _)>
map_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, D, & _))
{
return map<BOOST_PP_ENUM(N, BOOST_FUSION_TIED_PAIR, _)>(
BOOST_PP_ENUM(N, BOOST_FUSION_PAIR_TIE, _));
}
#undef N
#endif // defined(BOOST_PP_IS_ITERATING)

View File

@ -13,11 +13,11 @@
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
struct nil; struct nil_;
namespace result_of namespace result_of
{ {
template <typename Car, typename Cdr = nil> template <typename Car, typename Cdr = nil_>
struct make_cons struct make_cons
{ {
typedef cons<typename detail::as_fusion_element<Car>::type, Cdr> type; typedef cons<typename detail::as_fusion_element<Car>::type, Cdr> type;

View File

@ -1,124 +1,43 @@
/*============================================================================= /*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman Copyright (c) 2001-2013 Joel de Guzman
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) file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/ ==============================================================================*/
/*============================================================================= #if !defined(FUSION_MAKE_DEQUE_01272013_1401)
Copyright (c) 2001-2011 Joel de Guzman #define FUSION_MAKE_DEQUE_01272013_1401
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)
==============================================================================*/
#ifndef BOOST_PP_IS_ITERATING
#if !defined(FUSION_MAKE_DEQUE_07162005_0243)
#define FUSION_MAKE_DEQUE_07162005_0243
#include <boost/preprocessor/iterate.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/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/fusion/container/deque/deque.hpp> #include <boost/fusion/container/deque/deque.hpp>
#include <boost/fusion/support/detail/as_fusion_element.hpp>
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) #if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
#include <boost/fusion/container/generation/detail/preprocessed/make_deque.hpp> # include <boost/fusion/container/generation/detail/pp_make_deque.hpp>
#else #else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/make_deque" FUSION_MAX_DEQUE_SIZE_STR".hpp")
#endif
/*============================================================================= ///////////////////////////////////////////////////////////////////////////////
Copyright (c) 2001-2011 Joel de Guzman // C++11 variadic interface
///////////////////////////////////////////////////////////////////////////////
Distributed under the Boost Software License, Version 1.0. (See accompanying #include <boost/fusion/support/detail/as_fusion_element.hpp>
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 void_;
namespace result_of namespace result_of
{ {
template < template <typename ...T>
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( struct make_deque
FUSION_MAX_DEQUE_SIZE, typename T, void_)
, typename Extra = void_
>
struct make_deque;
template <>
struct make_deque<>
{ {
typedef deque<> type; typedef deque<T...> type;
}; };
} }
inline deque<> template <typename ...T>
make_deque() inline deque<typename detail::as_fusion_element<T>::type...>
make_deque(T const&... arg)
{ {
return deque<>(); return deque<typename detail::as_fusion_element<T>::type...>(arg...);
} }
}}
#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \
typename detail::as_fusion_element<BOOST_PP_CAT(T, n)>::type
#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/make_deque.hpp>
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE)
#include BOOST_PP_ITERATE()
#undef BOOST_FUSION_AS_FUSION_ELEMENT
}}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#endif #endif
#else // defined(BOOST_PP_IS_ITERATING)
///////////////////////////////////////////////////////////////////////////////
//
// Preprocessor vertical repetition code
//
///////////////////////////////////////////////////////////////////////////////
#define N BOOST_PP_ITERATION()
namespace result_of
{
template <BOOST_PP_ENUM_PARAMS(N, typename T)>
#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
#define TEXT(z, n, text) , text
struct make_deque< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_DEQUE_SIZE, TEXT, void_) >
#undef TEXT
#else
struct make_deque<BOOST_PP_ENUM_PARAMS(N, T)>
#endif #endif
{
typedef deque<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> type;
};
}
template <BOOST_PP_ENUM_PARAMS(N, typename T)>
inline deque<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>
make_deque(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _))
{
return deque<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>(
BOOST_PP_ENUM_PARAMS(N, _));
}
#undef N
#endif // defined(BOOST_PP_IS_ITERATING)

View File

@ -1,132 +1,62 @@
/*============================================================================= /*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman Copyright (c) 2001-2013 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) file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/ ==============================================================================*/
#ifndef BOOST_PP_IS_ITERATING
#if !defined(FUSION_MAKE_MAP_07222005_1247) #if !defined(FUSION_MAKE_MAP_07222005_1247)
#define FUSION_MAKE_MAP_07222005_1247 #define FUSION_MAKE_MAP_07222005_1247
#include <boost/preprocessor/iterate.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/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/fusion/container/map/map.hpp> #include <boost/fusion/container/map/map.hpp>
#if !defined(BOOST_FUSION_HAS_VARIADIC_MAP)
# include <boost/fusion/container/generation/detail/pp_make_map.hpp>
#else
///////////////////////////////////////////////////////////////////////////////
// C++11 variadic interface
///////////////////////////////////////////////////////////////////////////////
#include <boost/fusion/support/detail/as_fusion_element.hpp> #include <boost/fusion/support/detail/as_fusion_element.hpp>
#include <boost/fusion/support/pair.hpp> #include <boost/fusion/support/pair.hpp>
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/generation/detail/preprocessed/make_map.hpp>
#else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/make_map" FUSION_MAX_MAP_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 void_;
namespace result_of namespace result_of
{ {
template < template <typename ...Key>
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( struct make_map
FUSION_MAX_VECTOR_SIZE, typename K, void_)
, BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
FUSION_MAX_VECTOR_SIZE, typename D, void_)
, typename Extra = void_
>
struct make_map;
template <>
struct make_map<>
{ {
typedef map<> type; template <typename ...T>
struct apply
{
typedef map<
fusion::pair<
Key
, typename detail::as_fusion_element<T>::type
>...>
type;
};
}; };
} }
inline map<> template <typename ...Key, typename ...T>
make_map() inline map<
fusion::pair<
Key
, typename detail::as_fusion_element<T>::type
>...>
make_map(T const&... arg)
{ {
return map<>(); typedef map<
fusion::pair<
Key
, typename detail::as_fusion_element<T>::type
>...>
result_type;
return result_type(arg...);
} }
}}
#define BOOST_FUSION_PAIR(z, n, data) \
fusion::pair< \
BOOST_PP_CAT(K, n) \
, typename detail::as_fusion_element<BOOST_PP_CAT(D, n)>::type>
#define BOOST_FUSION_MAKE_PAIR(z, n, data) \
fusion::make_pair<BOOST_PP_CAT(K, n)>(BOOST_PP_CAT(_, n)) \
#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/make_map.hpp>
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE)
#include BOOST_PP_ITERATE()
#undef BOOST_FUSION_PAIR
#undef BOOST_FUSION_MAKE_PAIR
}}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#endif #endif
#else // defined(BOOST_PP_IS_ITERATING)
///////////////////////////////////////////////////////////////////////////////
//
// Preprocessor vertical repetition code
//
///////////////////////////////////////////////////////////////////////////////
#define N BOOST_PP_ITERATION()
namespace result_of
{
template <
BOOST_PP_ENUM_PARAMS(N, typename K)
, BOOST_PP_ENUM_PARAMS(N, typename D)
>
#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
#define TEXT(z, n, text) , text
struct make_map<BOOST_PP_ENUM_PARAMS(N, K), BOOST_PP_ENUM_PARAMS(N, D) BOOST_PP_REPEAT_FROM_TO(N, FUSION_MAX_VECTOR_SIZE, TEXT, void_) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_VECTOR_SIZE, TEXT, void_)>
#undef TEXT
#else
struct make_map<BOOST_PP_ENUM_PARAMS(N, K), BOOST_PP_ENUM_PARAMS(N, D)>
#endif #endif
{
typedef map<BOOST_PP_ENUM(N, BOOST_FUSION_PAIR, _)> type;
};
}
template <
BOOST_PP_ENUM_PARAMS(N, typename K)
, BOOST_PP_ENUM_PARAMS(N, typename D)
>
inline map<BOOST_PP_ENUM(N, BOOST_FUSION_PAIR, _)>
make_map(BOOST_PP_ENUM_BINARY_PARAMS(N, D, const& _))
{
return map<BOOST_PP_ENUM(N, BOOST_FUSION_PAIR, _)>(
BOOST_PP_ENUM(N, BOOST_FUSION_MAKE_PAIR, _));
}
#undef N
#endif // defined(BOOST_PP_IS_ITERATING)

Some files were not shown because too many files have changed in this diff Show More