From 46fc256c2fd0422b1346701561ffb451142decae Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sun, 11 Oct 2009 16:12:54 +0000 Subject: [PATCH] Sync from trunk (except adapt class) [SVN r56714] --- doc/container.qbk | 4 +- doc/html/fusion/acknowledgements.html | 15 +- doc/html/fusion/adapted.html | 31 +- doc/html/fusion/adapted/adapt_assoc.html | 77 ++- doc/html/fusion/adapted/adapt_struct.html | 73 +- doc/html/fusion/adapted/boost__array.html | 67 +- doc/html/fusion/adapted/boost__tuple.html | 59 +- doc/html/fusion/adapted/mpl_sequence.html | 72 +- doc/html/fusion/adapted/std__pair.html | 67 +- doc/html/fusion/algorithm.html | 71 +- doc/html/fusion/algorithm/iteration.html | 23 +- .../fusion/algorithm/iteration/functions.html | 15 +- .../iteration/functions/accumulate.html | 164 ++--- .../algorithm/iteration/functions/fold.html | 164 ++--- .../iteration/functions/for_each.html | 135 ++-- .../algorithm/iteration/metafunctions.html | 15 +- .../iteration/metafunctions/accumulate.html | 150 ++--- .../iteration/metafunctions/fold.html | 150 ++--- .../iteration/metafunctions/for_each.html | 122 ++-- doc/html/fusion/algorithm/query.html | 23 +- .../fusion/algorithm/query/functions.html | 15 +- .../fusion/algorithm/query/functions/all.html | 144 ++-- .../fusion/algorithm/query/functions/any.html | 144 ++-- .../algorithm/query/functions/count.html | 134 ++-- .../algorithm/query/functions/count_if.html | 132 ++-- .../algorithm/query/functions/find.html | 130 ++-- .../algorithm/query/functions/find_if.html | 128 ++-- .../algorithm/query/functions/none.html | 144 ++-- .../fusion/algorithm/query/metafunctions.html | 15 +- .../algorithm/query/metafunctions/all.html | 126 ++-- .../algorithm/query/metafunctions/any.html | 126 ++-- .../algorithm/query/metafunctions/count.html | 116 ++-- .../query/metafunctions/count_if.html | 116 ++-- .../algorithm/query/metafunctions/find.html | 120 ++-- .../query/metafunctions/find_if.html | 122 ++-- .../algorithm/query/metafunctions/none.html | 126 ++-- doc/html/fusion/algorithm/transformation.html | 27 +- .../algorithm/transformation/functions.html | 15 +- .../transformation/functions/clear.html | 101 ++- .../transformation/functions/erase.html | 172 +++-- .../transformation/functions/erase_key.html | 129 ++-- .../transformation/functions/filter.html | 127 ++-- .../transformation/functions/filter_if.html | 131 ++-- .../transformation/functions/insert.html | 148 ++--- .../functions/insert_range.html | 153 ++--- .../transformation/functions/join.html | 130 ++-- .../transformation/functions/pop_back.html | 103 ++- .../transformation/functions/pop_front.html | 103 ++- .../transformation/functions/push_back.html | 125 ++-- .../transformation/functions/push_front.html | 125 ++-- .../transformation/functions/remove.html | 127 ++-- .../transformation/functions/remove_if.html | 129 ++-- .../transformation/functions/replace.html | 155 ++--- .../transformation/functions/replace_if.html | 155 ++--- .../transformation/functions/reverse.html | 101 ++- .../transformation/functions/transform.html | 258 ++++---- .../transformation/functions/zip.html | 117 ++-- .../transformation/metafunctions.html | 15 +- .../transformation/metafunctions/clear.html | 90 ++- .../transformation/metafunctions/erase.html | 152 ++--- .../metafunctions/erase_key.html | 117 ++-- .../transformation/metafunctions/filter.html | 121 ++-- .../metafunctions/filter_if.html | 119 ++-- .../transformation/metafunctions/insert.html | 142 ++-- .../metafunctions/insert_range.html | 145 ++-- .../transformation/metafunctions/join.html | 46 +- .../metafunctions/pop_back.html | 95 ++- .../metafunctions/pop_front.html | 91 ++- .../metafunctions/push_back.html | 113 ++-- .../metafunctions/push_front.html | 113 ++-- .../transformation/metafunctions/remove.html | 121 ++-- .../metafunctions/remove_if.html | 121 ++-- .../transformation/metafunctions/replace.html | 115 ++-- .../metafunctions/replace_if.html | 141 ++-- .../transformation/metafunctions/reverse.html | 95 ++- .../metafunctions/transform.html | 258 ++++---- .../transformation/metafunctions/zip.html | 57 +- doc/html/fusion/change_log.html | 37 +- doc/html/fusion/container.html | 26 +- doc/html/fusion/container/cons.html | 340 +++++----- doc/html/fusion/container/conversion.html | 25 +- .../container/conversion/functions.html | 15 +- .../conversion/functions/as_list.html | 87 ++- .../conversion/functions/as_map.html | 95 ++- .../conversion/functions/as_set.html | 89 ++- .../conversion/functions/as_vector.html | 87 ++- .../container/conversion/metafunctions.html | 15 +- .../conversion/metafunctions/as_list.html | 91 ++- .../conversion/metafunctions/as_map.html | 99 ++- .../conversion/metafunctions/as_set.html | 93 ++- .../conversion/metafunctions/as_vector.html | 91 ++- doc/html/fusion/container/generation.html | 25 +- .../container/generation/functions.html | 15 +- .../generation/functions/list_tie.html | 101 ++- .../generation/functions/make_cons.html | 123 ++-- .../generation/functions/make_list.html | 107 ++- .../generation/functions/make_map.html | 143 ++-- .../generation/functions/make_set.html | 109 ++- .../generation/functions/make_vector.html | 107 ++- .../generation/functions/map_tie.html | 127 ++-- .../container/generation/functions/tiers.html | 47 +- .../generation/functions/vector_tie.html | 101 ++- .../container/generation/metafunctions.html | 15 +- .../generation/metafunctions/list_tie.html | 97 ++- .../generation/metafunctions/make_cons.html | 111 ++-- .../generation/metafunctions/make_list.html | 99 ++- .../generation/metafunctions/make_map.html | 131 ++-- .../generation/metafunctions/make_set.html | 101 ++- .../generation/metafunctions/make_vector.html | 99 ++- .../generation/metafunctions/map_tie.html | 123 ++-- .../generation/metafunctions/vector_tie.html | 97 ++- doc/html/fusion/container/list.html | 278 ++++---- doc/html/fusion/container/map.html | 259 ++++---- doc/html/fusion/container/set.html | 247 ++++--- doc/html/fusion/container/vector.html | 243 ++++--- doc/html/fusion/extension.html | 17 +- doc/html/fusion/extension/ext_full.html | 278 ++++---- .../fusion/extension/iterator_facade.html | 445 +++++-------- .../fusion/extension/sequence_facade.html | 283 ++++---- doc/html/fusion/functional.html | 68 +- doc/html/fusion/functional/adapters.html | 17 +- .../fusion/functional/adapters/fused.html | 249 ++++--- .../adapters/fused_function_object.html | 250 ++++--- .../functional/adapters/fused_procedure.html | 253 ++++--- .../fusion/functional/adapters/limits.html | 41 +- .../fusion/functional/adapters/unfused.html | 261 ++++---- .../functional/adapters/unfused_typed.html | 288 ++++---- doc/html/fusion/functional/concepts.html | 17 +- .../fusion/functional/concepts/callable.html | 55 +- .../functional/concepts/def_callable.html | 153 +++-- doc/html/fusion/functional/concepts/poly.html | 156 +++-- .../functional/concepts/reg_callable.html | 133 ++-- doc/html/fusion/functional/generation.html | 15 +- .../functional/generation/functions.html | 18 +- .../generation/functions/mk_fused.html | 122 ++-- .../generation/functions/mk_fused_fobj.html | 125 ++-- .../generation/functions/mk_fused_proc.html | 120 ++-- .../generation/functions/mk_unfused.html | 114 ++-- .../functional/generation/metafunctions.html | 19 +- .../generation/metafunctions/mk_fused.html | 44 +- .../metafunctions/mk_fused_fobj.html | 45 +- .../metafunctions/mk_fused_proc.html | 45 +- .../generation/metafunctions/mk_unfused.html | 42 +- doc/html/fusion/functional/invocation.html | 16 +- .../functional/invocation/functions.html | 15 +- .../invocation/functions/invoke.html | 152 ++--- .../invocation/functions/invoke_fobj.html | 148 ++--- .../invocation/functions/invoke_proc.html | 152 ++--- .../fusion/functional/invocation/limits.html | 42 +- .../functional/invocation/metafunctions.html | 16 +- .../invocation/metafunctions/invoke.html | 38 +- .../invocation/metafunctions/invoke_fobj.html | 42 +- .../invocation/metafunctions/invoke_proc.html | 44 +- doc/html/fusion/introduction.html | 53 +- doc/html/fusion/iterator.html | 25 +- doc/html/fusion/iterator/concepts.html | 33 +- .../concepts/bidirectional_iterator.html | 307 ++++----- .../iterator/concepts/forward_iterator.html | 623 +++++++----------- .../concepts/random_access_iterator.html | 285 ++++---- doc/html/fusion/iterator/functions.html | 16 +- .../fusion/iterator/functions/advance.html | 145 ++-- .../fusion/iterator/functions/advance_c.html | 145 ++-- doc/html/fusion/iterator/functions/deref.html | 120 ++-- .../fusion/iterator/functions/distance.html | 116 ++-- doc/html/fusion/iterator/functions/next.html | 120 ++-- doc/html/fusion/iterator/functions/prior.html | 120 ++-- doc/html/fusion/iterator/metafunctions.html | 16 +- .../iterator/metafunctions/advance.html | 147 ++--- .../iterator/metafunctions/advance_c.html | 149 ++--- .../fusion/iterator/metafunctions/deref.html | 124 ++-- .../iterator/metafunctions/distance.html | 122 ++-- .../iterator/metafunctions/equal_to.html | 123 ++-- .../fusion/iterator/metafunctions/next.html | 118 ++-- .../fusion/iterator/metafunctions/prior.html | 122 ++-- .../iterator/metafunctions/value_of.html | 124 ++-- doc/html/fusion/iterator/operator.html | 18 +- .../iterator/operator/operator_equality.html | 107 ++- .../operator/operator_inequality.html | 104 ++- .../operator/operator_unary_star.html | 125 ++-- doc/html/fusion/notes.html | 177 ++--- doc/html/fusion/organization.html | 137 ++-- doc/html/fusion/preface.html | 157 ++--- doc/html/fusion/quick_start.html | 155 ++--- doc/html/fusion/references.html | 31 +- doc/html/fusion/sequence.html | 29 +- doc/html/fusion/sequence/concepts.html | 54 +- .../concepts/associative_sequence.html | 319 ++++----- .../concepts/bidirectional_sequence.html | 342 ++++------ .../sequence/concepts/forward_sequence.html | 510 ++++++-------- .../concepts/random_access_sequence.html | 377 +++++------ doc/html/fusion/sequence/intrinsic.html | 36 +- .../fusion/sequence/intrinsic/functions.html | 15 +- .../sequence/intrinsic/functions/at.html | 124 ++-- .../sequence/intrinsic/functions/at_c.html | 124 ++-- .../sequence/intrinsic/functions/at_key.html | 120 ++-- .../sequence/intrinsic/functions/back.html | 100 ++- .../sequence/intrinsic/functions/begin.html | 114 ++-- .../sequence/intrinsic/functions/empty.html | 96 ++- .../sequence/intrinsic/functions/end.html | 114 ++-- .../sequence/intrinsic/functions/front.html | 100 ++- .../sequence/intrinsic/functions/has_key.html | 116 ++-- .../sequence/intrinsic/functions/size.html | 90 ++- .../sequence/intrinsic/functions/swap.html | 88 ++- .../sequence/intrinsic/metafunctions.html | 15 +- .../sequence/intrinsic/metafunctions/at.html | 124 ++-- .../intrinsic/metafunctions/at_c.html | 124 ++-- .../intrinsic/metafunctions/at_key.html | 128 ++-- .../intrinsic/metafunctions/back.html | 92 ++- .../intrinsic/metafunctions/begin.html | 96 ++- .../intrinsic/metafunctions/empty.html | 98 ++- .../sequence/intrinsic/metafunctions/end.html | 96 ++- .../intrinsic/metafunctions/front.html | 94 ++- .../intrinsic/metafunctions/has_key.html | 118 ++-- .../intrinsic/metafunctions/size.html | 92 ++- .../intrinsic/metafunctions/swap.html | 80 +-- .../intrinsic/metafunctions/value_at.html | 112 ++-- .../intrinsic/metafunctions/value_at_c.html | 112 ++-- .../intrinsic/metafunctions/value_at_key.html | 114 ++-- doc/html/fusion/sequence/operator.html | 17 +- .../fusion/sequence/operator/comparison.html | 31 +- .../sequence/operator/comparison/equal.html | 112 ++-- .../operator/comparison/greater_than.html | 107 ++- .../comparison/greater_than_equal.html | 104 ++- .../operator/comparison/less_than.html | 111 ++-- .../operator/comparison/less_than_equal.html | 107 ++- .../operator/comparison/not_equal.html | 104 ++- doc/html/fusion/sequence/operator/i_o.html | 77 +-- doc/html/fusion/sequence/operator/i_o/in.html | 107 ++- .../fusion/sequence/operator/i_o/out.html | 107 ++- doc/html/fusion/support.html | 15 +- doc/html/fusion/support/category_of.html | 117 ++-- doc/html/fusion/support/deduce.html | 65 +- doc/html/fusion/support/deduce_sequence.html | 69 +- doc/html/fusion/support/is_sequence.html | 123 ++-- doc/html/fusion/support/is_view.html | 121 ++-- doc/html/fusion/support/pair.html | 345 ++++------ doc/html/fusion/support/tag_of.html | 119 ++-- doc/html/fusion/tuple.html | 19 +- .../fusion/tuple/class_template_tuple.html | 28 +- .../class_template_tuple/construction.html | 86 +-- .../class_template_tuple/element_access.html | 73 +- .../relational_operators.html | 150 +++-- .../tuple_creation_functions.html | 58 +- .../tuple_helper_classes.html | 63 +- doc/html/fusion/tuple/pairs.html | 70 +- doc/html/fusion/view.html | 23 +- doc/html/fusion/view/filter_view.html | 237 +++---- doc/html/fusion/view/iterator_range.html | 257 ++++---- doc/html/fusion/view/joint_view.html | 245 +++---- doc/html/fusion/view/nview.html | 268 ++++---- doc/html/fusion/view/reverse_view.html | 202 +++--- doc/html/fusion/view/single_view.html | 197 +++--- doc/html/fusion/view/transform_view.html | 378 +++++------ doc/html/fusion/view/zip_view.html | 228 +++---- doc/html/index.html | 19 +- test/sequence/nview.cpp | 32 +- test/sequence/test_deduce_sequence.cpp | 16 + 257 files changed, 13732 insertions(+), 16068 deletions(-) create mode 100644 test/sequence/test_deduce_sequence.cpp diff --git a/doc/container.qbk b/doc/container.qbk index c859e4ae..226d3da1 100644 --- a/doc/container.qbk +++ b/doc/container.qbk @@ -716,9 +716,7 @@ default. Example: [heading Example] - make_map( - __fusion_make_pair__('X') - , __fusion_make_pair__("Men")) + make_map('X', "Men") [heading See also] diff --git a/doc/html/fusion/acknowledgements.html b/doc/html/fusion/acknowledgements.html index 10e477dc..77569ed6 100644 --- a/doc/html/fusion/acknowledgements.html +++ b/doc/html/fusion/acknowledgements.html @@ -3,10 +3,10 @@ Acknowledgements - + - + @@ -22,10 +22,13 @@
PrevUpHomeNext
-
- +
+

Special thanks to David Abrahams, Douglas Gregor, Hartmut Kaiser, Aleksey Gurtovoy, Peder Holt, Daniel Wallin, Jaakko Jarvi, Jeremiah Willcock, Dan Marsden, Eric diff --git a/doc/html/fusion/adapted.html b/doc/html/fusion/adapted.html index 092d31a7..bc480000 100644 --- a/doc/html/fusion/adapted.html +++ b/doc/html/fusion/adapted.html @@ -3,10 +3,10 @@ Adapted - + - + @@ -22,10 +22,13 @@

PrevUpHomeNext
-
- +
+
+ +
+

- Fusion provides a couple of adapters for other sequences such as std::pair, + Fusion provides a couple of adapters for other sequences such as std::pair, MPL sequences, - and boost::array. These adapters are written using Fusion's - non-intrusive Extension mechanism. + and boost::array. These adapters are written using Fusion's + non-intrusive Extension mechanism. If you wish to use these sequences with fusion, simply include the necessary files and they will be regarded as first-class, fully conforming fusion sequences.

@@ -46,16 +49,16 @@ Fusion also provides various schemes to make it easy for the user to adapt various data structures, non-intrusively, as full fledged Fusion sequences.

-

- - Header -

+

+ + Header +

#include <boost/fusion/adapted.hpp>
 #include <boost/fusion/include/adapted.hpp>
 

Fusion sequences may also be adapted as fully conforming MPL - sequences (see Intrinsics). + sequences (see Intrinsics). That way, we can have 2-way adaptation to and from MPL and Fusion. To make Fusion sequences fully conforming MPL sequences, include: diff --git a/doc/html/fusion/adapted/adapt_assoc.html b/doc/html/fusion/adapted/adapt_assoc.html index a15b8973..bc16c7f9 100644 --- a/doc/html/fusion/adapted/adapt_assoc.html +++ b/doc/html/fusion/adapted/adapt_assoc.html @@ -1,12 +1,12 @@ -BOOST_FUSION_ADAPT_ASSOC_STRUCT + BOOST_FUSION_ADAPT_ASSOC_STRUCT - + - + @@ -22,24 +22,29 @@

PrevUpHomeNext
-
- -
- - Description -
+
+ +

+ + Description +

BOOST_FUSION_ADAPT_ASSOC_STRUCT is a macro that can be used to generate all - the necessary boilerplate to make an arbitrary struct into a model of Random Access Sequence - and Associative + the necessary boilerplate to make an arbitrary struct into a model of Random Access Sequence + and Associative Sequence.

-
- - Synopsis -
+

+ + Synopsis +

BOOST_FUSION_ADAPT_ASSOC_STRUCT(
     struct_name,
     (member_type0, member_name0, key_type0)
@@ -47,35 +52,37 @@
     ...
     )
 
-
- - Semantics -
+

+ + Semantics +

- The above macro generates the necessary code to adapt struct_name - as a model of Random - Access Sequence and Associative - Sequence. The sequence of (member_typeN, + The above macro generates the necessary code to adapt struct_name + as a model of Random + Access Sequence and Associative + Sequence. The sequence of (member_typeN, member_nameN, - key_typeN) + key_typeN) triples declare the type, name and key type of each of the struct members that will be part of the sequence.

- The macro should be used at global scope, and struct_name + The macro should be used at global scope, and struct_name should be the fully namespace qualified name of the struct to be converted.

-
- - Header -
+

+ + Header +

#include <boost/fusion/adapted/struct/adapt_assoc_struct.hpp>
 #include <boost/fusion/include/adapt_assoc_struct.hpp>
 
-
- - Example -
+

+ + Example +

namespace demo
 {
     struct employee
diff --git a/doc/html/fusion/adapted/adapt_struct.html b/doc/html/fusion/adapted/adapt_struct.html
index 371f71dd..1e665cd6 100644
--- a/doc/html/fusion/adapted/adapt_struct.html
+++ b/doc/html/fusion/adapted/adapt_struct.html
@@ -1,13 +1,13 @@
 
 
 
-BOOST_FUSION_ADAPT_STRUCT
+ BOOST_FUSION_ADAPT_STRUCT
 
-
+
 
 
-
-
+
+
 
 
 
@@ -22,23 +22,27 @@
 
PrevUpHomeNext
-
- -
- - Description -
+
+ +

+ + Description +

BOOST_FUSION_ADAPT_STRUCT is a macro that can be used to generate all the - necessary boilerplate to make an arbitrary struct into a Random + necessary boilerplate to make an arbitrary struct into a Random Access Sequence.

-
- - Synopsis -
+

+ + Synopsis +

BOOST_FUSION_ADAPT_STRUCT(
     struct_name,
     (member_type0, member_name0)
@@ -46,33 +50,34 @@
     ...
     )
 
-
- - Semantics -
+

+ + Semantics +

- The above macro generates the necessary code to adapt struct_name - as a model of Random - Access Sequence. The sequence of (member_typeN, - member_nameN) + The above macro generates the necessary code to adapt struct_name + as a model of Random + Access Sequence. The sequence of (member_typeN, + member_nameN) pairs declare the type and names of each of the struct members that will be part of the sequence.

- The macro should be used at global scope, and struct_name + The macro should be used at global scope, and struct_name should be the fully namespace qualified name of the struct to be converted.

-
- - Header -
+

+ + Header +

#include <boost/fusion/adapted/struct/adapt_struct.hpp>
 #include <boost/fusion/include/adapt_struct.hpp>
 
-
- - Example -
+

+ + Example +

namespace demo
 {
     struct employee
diff --git a/doc/html/fusion/adapted/boost__array.html b/doc/html/fusion/adapted/boost__array.html
index ef50847b..1d64985c 100644
--- a/doc/html/fusion/adapted/boost__array.html
+++ b/doc/html/fusion/adapted/boost__array.html
@@ -3,10 +3,10 @@
 
 boost::array
 
-
+
 
 
-
+
 
 
 
@@ -22,45 +22,50 @@
 
PrevUpHomeNext
-
- +
+
+ +
+

- This module provides adapters for boost::array. - Including the module header makes boost::array - a fully conforming Random + This module provides adapters for boost::array. + Including the module header makes boost::array + a fully conforming Random Access Sequence.

-
- - Header -
+

+ + Header +

#include <boost/fusion/adapted/array.hpp>
 #include <boost/fusion/include/array.hpp>
 
-
- - Model of -
-
  • Random +

    + + Model of +

    + -
    - - Example -
    +

    + + Example +

    boost::array<int,3> arr = {{1,2,3}};
     
    -std::cout << *begin(arr) << std::endl;
    -std::cout << *next(begin(arr)) << std::endl;
    -std::cout << *advance_c<2>(begin(arr)) << std::endl;
    -std::cout << *prior(end(arr)) << std::endl;
    -std::cout << at_c<2>(arr) << std::endl;
    +std::cout << *begin(arr) << std::endl;
    +std::cout << *next(begin(arr)) << std::endl;
    +std::cout << *advance_c<2>(begin(arr)) << std::endl;
    +std::cout << *prior(end(arr)) << std::endl;
    +std::cout << at_c<2>(arr) << std::endl;
     
    -
    - - See also -
    +

    + + See also +

    Boost.Array Library

    diff --git a/doc/html/fusion/adapted/boost__tuple.html b/doc/html/fusion/adapted/boost__tuple.html index 1d391b4b..3ddd4b84 100644 --- a/doc/html/fusion/adapted/boost__tuple.html +++ b/doc/html/fusion/adapted/boost__tuple.html @@ -3,11 +3,11 @@ boost::tuple - + - - + +
@@ -22,40 +22,45 @@
PrevUpHomeNext
-
- +
+
+ +
+

- This module provides adapters for boost::tuple. - Including the module header makes boost::tuple - a fully conforming Forward + This module provides adapters for boost::tuple. + Including the module header makes boost::tuple + a fully conforming Forward Sequence.

-
- - Header -
+

+ + Header +

#include <boost/fusion/adapted/boost_tuple.hpp>
 #include <boost/fusion/include/boost_tuple.hpp>
 
-
- - Model of -
- -
- - Example -
+

+ + Model of +

+ +

+ + Example +

boost::tuple<int,std::string> example_tuple(101, "hello");
 std::cout << *boost::fusion::begin(example_tuple) << '\n';
 std::cout << *boost::fusion::next(boost::fusion::begin(example_tuple)) << '\n';
 
-
- - See also -
+

+ + See also +

Boost.Tuple Library diff --git a/doc/html/fusion/adapted/mpl_sequence.html b/doc/html/fusion/adapted/mpl_sequence.html index 768703e7..954dcc27 100644 --- a/doc/html/fusion/adapted/mpl_sequence.html +++ b/doc/html/fusion/adapted/mpl_sequence.html @@ -3,10 +3,10 @@ mpl sequence - + - + @@ -22,60 +22,66 @@

PrevUpHomeNext
-
- +
+
+ +
+

This module provides adapters for MPL sequences. Including the module header makes all MPL sequences fully conforming fusion sequences.

-
- - Header -
+

+ + Header +

#include <boost/fusion/adapted/mpl.hpp>
 #include <boost/fusion/include/mpl.hpp>
 
-
- - Model of -
-
diff --git a/doc/html/fusion/algorithm.html b/doc/html/fusion/algorithm.html index d14c7812..1bf2e3f8 100644 --- a/doc/html/fusion/algorithm.html +++ b/doc/html/fusion/algorithm.html @@ -3,10 +3,10 @@ Algorithm - + - + @@ -22,10 +22,13 @@
PrevUpHomeNext
-
- +
+
+ +
+
Iteration
@@ -43,10 +46,10 @@
Metafunctions
-

- - Lazy Evaluation -

+

+ + Lazy Evaluation +

Unlike MPL, Fusion algorithms are lazy and non sequence-type preserving. What does that mean? @@ -58,41 +61,41 @@ fusion algorithms are functional in nature such that algorithms are non mutating (no side effects). However, due to the high cost of returning full sequences such as vectors and lists, Views are returned from Fusion - algorithms instead. For example, the transform algorithm does not actually - return a transformed version of the original sequence. transform returns a transform_view. This view holds a + algorithms instead. For example, the transform algorithm does not actually + return a transformed version of the original sequence. transform returns a transform_view. This view holds a reference to the original sequence plus the transform function. Iteration over - the transform_view + the transform_view will apply the transform function over the sequence elements on demand. This lazy evaluation scheme allows us to chain as many algorithms as we want without incurring a high runtime penalty.

-

- - Sequence Extension -

+

+ + Sequence Extension +

- The lazy evaluation scheme where Algorithms - return Views also allows operations such - as push_back to be totally generic. In - Fusion, push_back is actually a generic algorithm - that works on all sequences. Given an input sequence s - and a value x, Fusion's push_back algorithm simply returns - a joint_view: - a view that holds a reference to the original sequence s - and the value x. Functions + The lazy evaluation scheme where Algorithms + return Views also allows operations such + as push_back to be totally generic. In + Fusion, push_back is actually a generic algorithm + that works on all sequences. Given an input sequence s + and a value x, Fusion's push_back algorithm simply returns + a joint_view: + a view that holds a reference to the original sequence s + and the value x. Functions that were once sequence specific and need to be implemented N times over N different sequences are now implemented only once. That is to say that Fusion sequences are cheaply extensible. However, an important caveat is that the - result of a sequence extending operation like push_back does not retain the properties - of the original sequence such as associativity of set(s). To regain the original sequence, - Conversion functions - are provided. You may use one of the Conversion + result of a sequence extending operation like push_back does not retain the properties + of the original sequence such as associativity of set(s). To regain the original sequence, + Conversion functions + are provided. You may use one of the Conversion functions to convert back to the original sequence type.

-

- - Header -

+

+ + Header +

#include <boost/fusion/algorithm.hpp>
 #include <boost/fusion/include/algorithm.hpp>
 
diff --git a/doc/html/fusion/algorithm/iteration.html b/doc/html/fusion/algorithm/iteration.html index a82a8d1e..c99b7083 100644 --- a/doc/html/fusion/algorithm/iteration.html +++ b/doc/html/fusion/algorithm/iteration.html @@ -3,10 +3,10 @@ Iteration - + - + @@ -22,10 +22,13 @@
PrevUpHomeNext
-
- +
+
+ +
+
Functions
Metafunctions
@@ -34,10 +37,10 @@ The iteration algorithms provide the fundamental algorithms for traversing a sequence repeatedly applying an operation to its elements.

-
- - Header -
+

+ + Header +

#include <boost/fusion/algorithm/iteration.hpp>
 #include <boost/fusion/include/iteration.hpp>
 
diff --git a/doc/html/fusion/algorithm/iteration/functions.html b/doc/html/fusion/algorithm/iteration/functions.html index 9b310aee..dcba7466 100644 --- a/doc/html/fusion/algorithm/iteration/functions.html +++ b/doc/html/fusion/algorithm/iteration/functions.html @@ -3,10 +3,10 @@ Functions - + - + @@ -22,10 +22,13 @@
PrevUpHomeNext
-
- +
+
+ +
+
fold
accumulate
diff --git a/doc/html/fusion/algorithm/iteration/functions/accumulate.html b/doc/html/fusion/algorithm/iteration/functions/accumulate.html index eb9ca358..b3d7e94a 100644 --- a/doc/html/fusion/algorithm/iteration/functions/accumulate.html +++ b/doc/html/fusion/algorithm/iteration/functions/accumulate.html @@ -3,10 +3,10 @@ accumulate - + - + @@ -22,150 +22,130 @@
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- For a sequence Seq, initial - state, and binary function object or function pointer f, - accumulate repeatedly applies binary f - to each element of Seq + For a sequence Seq, initial + state, and binary function object or function pointer f, + accumulate repeatedly applies binary f + to each element of Seq and the previous state.

- - Synopsis + + Synopsis
template<
     typename Sequence,
     typename State,
     typename F
     >
-typename result_of::accumulate<Sequence, State, F>::type accumulate(
+typename result_of::accumulate<Sequence, State, F>::type accumulate(
     Sequence& seq, State const& initial_state, F const& f);
 
-

Table 1.34. Parameters

-
+

Table 1.34. Parameters

+
- - + - + +

- - - + + +

- - + - + +

- - - + + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

- A model of Forward - Sequence, f(eN - ....f(e2,f(e1,initial_state))) must be a valid expression for - each element e1 - to eN in seq -

-
-

+

+ seq +

+ A model of Forward + Sequence, f(eN + ....f(e2,f(e1,initial_state))) must be a valid expression for + each element e1 + to eN in seq +

Operation's argument -

-
-

- initial_state -

-
-

+

+ initial_state +

Any type -

-
-

+

Initial state -

-
-

- f -

-
-

- boost::result_of<F(E,S)>::type is the return type of f(e,s) - for each element e - of type E in seq, and current state s of type S -

-
-

+

+ f +

+ boost::result_of<F(E,S)>::type is the return type of f(e,s) + for each element e + of type E in seq, and current state s of type S +

Operation's argument -

-
+
-
- - Expression +
+ + Expression Semantics
accumulate(seq, initial_state, f);
 

- Return type: Any type + Return type: Any type

- Semantics: Equivalent to f(eN ....f(e2,f(e1,initial_state))) - where e1 ...eN are the elements of seq. + Semantics: Equivalent to f(eN ....f(e2,f(e1,initial_state))) + where e1 ...eN are the elements of seq.

- - Complexity + + Complexity

- Linear, exactly result_of::size<Sequence>::value applications of f. + Linear, exactly result_of::size<Sequence>::value applications of f.

- - Header + + Header
#include <boost/fusion/algorithm/iteration/accumulate.hpp>
 #include <boost/fusion/include/accumulate.hpp>
 
- - Example + + Example
struct make_string
 {
@@ -178,8 +158,8 @@
     }
 };
 ...
-const vector<int,int> vec(1,2);
-assert(accumulate(vec,std::string(""), make_string()) == "12");
+const vector<int,int> vec(1,2);
+assert(accumulate(vec,std::string(""), make_string()) == "12");
 
diff --git a/doc/html/fusion/algorithm/iteration/functions/fold.html b/doc/html/fusion/algorithm/iteration/functions/fold.html index e266f0f3..8bc6fb46 100644 --- a/doc/html/fusion/algorithm/iteration/functions/fold.html +++ b/doc/html/fusion/algorithm/iteration/functions/fold.html @@ -3,10 +3,10 @@ fold - + - + @@ -22,150 +22,130 @@
PrevUpHomeNext
-
-
-fold -
+
+
+
+fold +
+
+
- - Description + + Description

- For a sequence Seq, initial - state, and binary function object or function pointer f, - fold repeatedly applies binary f - to each element of Seq + For a sequence Seq, initial + state, and binary function object or function pointer f, + fold repeatedly applies binary f + to each element of Seq and the previous state.

- - Synopsis + + Synopsis
template<
     typename Sequence,
     typename State,
     typename F
     >
-typename result_of::fold<Sequence, State, F>::type fold(
+typename result_of::fold<Sequence, State, F>::type fold(
     Sequence& seq, State const& initial_state, F const& f);
 
-

Table 1.33. Parameters

-
+

Table 1.33. Parameters

+
- - + - + +

- - - + + +

- - + - + +

- - - + + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

- A model of Forward - Sequence,f(e,s) must be a valid expression for - each element e - in seq, and current - state s -

-
-

+

+ seq +

+ A model of Forward + Sequence,f(e,s) must be a valid expression for + each element e + in seq, and current + state s +

Operation's argument -

-
-

- initial_state -

-
-

+

+ initial_state +

Any type -

-
-

+

Initial state -

-
-

- f -

-
-

- boost::result_of<F(E,S)>::type is the return type of f(e,s) - for each element e - of type E in seq, and current state s of type S -

-
-

+

+ f +

+ boost::result_of<F(E,S)>::type is the return type of f(e,s) + for each element e + of type E in seq, and current state s of type S +

Operation's argument -

-
+
-
- - Expression +
+ + Expression Semantics
fold(seq, initial_state, f);
 

- Return type: Any type + Return type: Any type

- Semantics: Equivalent to f(eN ....f(e2,f(e1,initial_state))) - where e1 ...eN are the elements of seq. + Semantics: Equivalent to f(eN ....f(e2,f(e1,initial_state))) + where e1 ...eN are the elements of seq.

- - Complexity + + Complexity

- Linear, exactly result_of::size<Sequence>::value applications of f. + Linear, exactly result_of::size<Sequence>::value applications of f.

- - Header + + Header
#include <boost/fusion/algorithm/iteration/fold.hpp>
 #include <boost/fusion/include/fold.hpp>
 
- - Example + + Example
struct make_string
 {
@@ -178,8 +158,8 @@
     }
 };
 ...
-const vector<int,int> vec(1,2);
-assert(fold(vec,std::string(""), make_string()) == "12");
+const vector<int,int> vec(1,2);
+assert(fold(vec,std::string(""), make_string()) == "12");
 
diff --git a/doc/html/fusion/algorithm/iteration/functions/for_each.html b/doc/html/fusion/algorithm/iteration/functions/for_each.html index aa78fa40..01231181 100644 --- a/doc/html/fusion/algorithm/iteration/functions/for_each.html +++ b/doc/html/fusion/algorithm/iteration/functions/for_each.html @@ -3,10 +3,10 @@ for_each - + - + @@ -22,126 +22,113 @@
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

Applies a unary function object to each element of a sequence.

- - Synopsis + + Synopsis
template<
     typename Sequence,
     typename F
     >
-typename result_of::for_each<Sequence, F>::type for_each(
+typename result_of::for_each<Sequence, F>::type for_each(
     Sequence& seq, F const& f);
 
-

Table 1.35. Parameters

-
+

Table 1.35. Parameters

+
- - + - + +

- - - + + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

- A model of Forward - Sequence, f(e) must be a valid expression for - each element e - in seq -

-
-

+

+ seq +

+ A model of Forward + Sequence, f(e) must be a valid expression for + each element e + in seq +

Operation's argument -

-
-

- f -

-
-

- A unary Regular +

+ f +

+ A unary Regular Callable Object -

-
-

+

Operation's argument -

-
+ -
- - Expression +
+ + Expression Semantics
-
for_each(seq, f);
+
for_each(seq, f);
 

- Return type: void + Return type: void

- Semantics: Calls f(e) for each element e - in seq. + Semantics: Calls f(e) for each element e + in seq.

- - Complexity + + Complexity

- Linear, exactly result_of::size<Sequence>::value applications of f. + Linear, exactly result_of::size<Sequence>::value applications of f.

- - Header + + Header
#include <boost/fusion/algorithm/iteration/for_each.hpp>
 #include <boost/fusion/include/for_each.hpp>
 
- - Example + + Example
struct increment
 {
@@ -152,9 +139,9 @@
     }
 };
 ...
-vector<int,int> vec(1,2);
-for_each(vec, increment());
-assert(vec == make_vector(2,3));
+vector<int,int> vec(1,2);
+for_each(vec, increment());
+assert(vec == make_vector(2,3));
 
diff --git a/doc/html/fusion/algorithm/iteration/metafunctions.html b/doc/html/fusion/algorithm/iteration/metafunctions.html index f49150fd..d4d69116 100644 --- a/doc/html/fusion/algorithm/iteration/metafunctions.html +++ b/doc/html/fusion/algorithm/iteration/metafunctions.html @@ -3,10 +3,10 @@ Metafunctions - + - + @@ -22,10 +22,13 @@
PrevUpHomeNext
-
- +
+
+ +
+
fold
accumulate
diff --git a/doc/html/fusion/algorithm/iteration/metafunctions/accumulate.html b/doc/html/fusion/algorithm/iteration/metafunctions/accumulate.html index 90ea13a2..da430a99 100644 --- a/doc/html/fusion/algorithm/iteration/metafunctions/accumulate.html +++ b/doc/html/fusion/algorithm/iteration/metafunctions/accumulate.html @@ -3,10 +3,10 @@ accumulate - + - + @@ -22,20 +22,23 @@
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- Returns the result type of accumulate. + Returns the result type of accumulate.

- - Synopsis + + Synopsis
template<
     typename Sequence,
@@ -47,115 +50,92 @@
 };
 
-

Table 1.37. Parameters

-
+

Table 1.37. Parameters

+
- - + - + +

- - + - + +

- - + - +

+ - - - + + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Sequence -

-
-

- A model of Forward +

+ Sequence +

+ A model of Forward Sequence -

-
-

+

The sequence to iterate -

-
-

- State -

-
-

+

+ State +

Any type -

-
-

- The initial state for the first application of F -

-

+ The initial state for the first application of F +

-

- F -

-
-

- boost::result_of<F(E,S)>::type is the return type of f(e,s) - for each element e - of type E in seq, and current state s of type S -

-
-

+

+ F +

+ boost::result_of<F(E,S)>::type is the return type of f(e,s) + for each element e + of type E in seq, and current state s of type S +

The operation to be applied on forward traversal -

-
+ -
- - Expression +
+ + Expression Semantics
-
result_of::accumulate<Sequence, State, F>::type
+
result_of::accumulate<Sequence, State, F>::type
 

- Return type: Any type + Return type: Any type

- Semantics: Returns the result of applying - accumulate to a sequence - of type Sequence, with - an initial state of type State - and binary function object or function pointer of type F. + Semantics: Returns the result of applying + accumulate to a sequence + of type Sequence, with + an initial state of type State + and binary function object or function pointer of type F.

- - Complexity + + Complexity

- Linear, exactly result_of::size<Sequence>::value applications of F. + Linear, exactly result_of::size<Sequence>::value applications of F.

- - Header + + Header
#include <boost/fusion/algorithm/iteration/accumulate.hpp>
 #include <boost/fusion/include/accumulate.hpp>
diff --git a/doc/html/fusion/algorithm/iteration/metafunctions/fold.html b/doc/html/fusion/algorithm/iteration/metafunctions/fold.html
index 1bf2a6a3..3688b58d 100644
--- a/doc/html/fusion/algorithm/iteration/metafunctions/fold.html
+++ b/doc/html/fusion/algorithm/iteration/metafunctions/fold.html
@@ -3,10 +3,10 @@
 
 fold
 
-
+
 
 
-
+
 
 
 
@@ -22,20 +22,23 @@
 
PrevUpHomeNext
-
-
-fold -
+
+
+
+fold +
+
+
- - Description + + Description

- Returns the result type of fold. + Returns the result type of fold.

- - Synopsis + + Synopsis
template<
     typename Sequence,
@@ -47,115 +50,92 @@
 };
 
-

Table 1.36. Parameters

-
+

Table 1.36. Parameters

+
- - + - + +

- - + - + +

- - + - +

+ - - - + + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Sequence -

-
-

- A model of Forward +

+ Sequence +

+ A model of Forward Sequence -

-
-

+

The sequence to iterate -

-
-

- State -

-
-

+

+ State +

Any type -

-
-

- The initial state for the first application of F -

-

+ The initial state for the first application of F +

-

- F -

-
-

- boost::result_of<F(E,S)>::type is the return type of f(e,s) - for each element e - of type E in seq, and current state s of type S -

-
-

+

+ F +

+ boost::result_of<F(E,S)>::type is the return type of f(e,s) + for each element e + of type E in seq, and current state s of type S +

The operation to be applied on forward traversal -

-
+
-
- - Expression +
+ + Expression Semantics
-
result_of::fold<Sequence, State, F>::type
+
result_of::fold<Sequence, State, F>::type
 

- Return type: Any type + Return type: Any type

- Semantics: Returns the result of applying - fold to a sequence of - type Sequence, with an - initial state of type State - and binary function object or function pointer of type F. + Semantics: Returns the result of applying + fold to a sequence of + type Sequence, with an + initial state of type State + and binary function object or function pointer of type F.

- - Complexity + + Complexity

- Linear, exactly result_of::size<Sequence>::value applications of F. + Linear, exactly result_of::size<Sequence>::value applications of F.

- - Header + + Header
#include <boost/fusion/algorithm/iteration/fold.hpp>
 #include <boost/fusion/include/fold.hpp>
diff --git a/doc/html/fusion/algorithm/iteration/metafunctions/for_each.html b/doc/html/fusion/algorithm/iteration/metafunctions/for_each.html
index 9ff50008..341f181d 100644
--- a/doc/html/fusion/algorithm/iteration/metafunctions/for_each.html
+++ b/doc/html/fusion/algorithm/iteration/metafunctions/for_each.html
@@ -3,10 +3,10 @@
 
 for_each
 
-
+
 
 
-
+
 
 
 
@@ -22,21 +22,24 @@
 
PrevUpHomeNext
-
- +
+
+ +
+

- A metafunction returning the result type of applying for_each to a sequence. The - return type of for_each is always void. + A metafunction returning the result type of applying for_each to a sequence. The + return type of for_each is always void.

- - Description + + Description
- - Synopsis + + Synopsis
template<
     typename Sequence,
@@ -48,96 +51,79 @@
 };
 
-

Table 1.38. Parameters

-
+

Table 1.38. Parameters

+
- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Sequence -

-
-

- A model of Forward +

+ Sequence +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- F -

-
-

+

+ F +

Any type -

-
-

+

Operation's argument -

-
+
-
- - Expression +
+ + Expression Semantics
-
result_of::for_each<Sequence, F>::type
+
result_of::for_each<Sequence, F>::type
 

- Return type: void. + Return type: void.

- Semantics: Returns the return type of - for_each for a sequence of type - Sequence and a unary - function object F. The - return type is always void. + Semantics: Returns the return type of + for_each for a sequence of type + Sequence and a unary + function object F. The + return type is always void.

- - Complexity + + Complexity

Constant.

- - Header + + Header
#include <boost/fusion/algorithm/iteration/for_each.hpp>
 #include <boost/fusion/include/for_each.hpp>
diff --git a/doc/html/fusion/algorithm/query.html b/doc/html/fusion/algorithm/query.html
index 81960755..2a36a1f4 100644
--- a/doc/html/fusion/algorithm/query.html
+++ b/doc/html/fusion/algorithm/query.html
@@ -3,10 +3,10 @@
 
 Query
 
-
+
 
 
-
+
 
 
 
@@ -22,10 +22,13 @@
 
PrevUpHomeNext
-
-

-Query -

+
+
+

+Query +

+
+
Functions
Metafunctions
@@ -33,10 +36,10 @@

The query algorithms provide support for searching and analyzing sequences.

-
- - Header -
+

+ + Header +

#include <boost/fusion/algorithm/query.hpp>
 #include <boost/fusion/include/query.hpp>
 
diff --git a/doc/html/fusion/algorithm/query/functions.html b/doc/html/fusion/algorithm/query/functions.html index f1d19357..67be2efb 100644 --- a/doc/html/fusion/algorithm/query/functions.html +++ b/doc/html/fusion/algorithm/query/functions.html @@ -3,10 +3,10 @@ Functions - + - + @@ -22,10 +22,13 @@
PrevUpHomeNext
-
- +
+
+ +
+
any
all
diff --git a/doc/html/fusion/algorithm/query/functions/all.html b/doc/html/fusion/algorithm/query/functions/all.html index 8b696e11..99b995ba 100644 --- a/doc/html/fusion/algorithm/query/functions/all.html +++ b/doc/html/fusion/algorithm/query/functions/all.html @@ -3,10 +3,10 @@ all - + - + @@ -22,131 +22,117 @@
PrevUpHomeNext
-
-
-all -
+
+
+
+all +
+
+
- - Description + + Description

- For a sequence seq and - unary function object f, - all returns true if - f returns true for every - element of seq. + For a sequence seq and + unary function object f, + all returns true if + f returns true for every + element of seq.

- - Synopsis + + Synopsis
template<
     typename Sequence,
     typename F
     >
-typename result_of::all<Sequence,F>::type all(
+typename result_of::all<Sequence,F>::type all(
     Sequence const& seq, F f);
 
-

Table 1.40. Parameters

-
+

Table 1.40. Parameters

+
- - + - + +

- - - + + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

- A model of Forward - Sequence, f(e) is a valid expression, convertible - to bool, for every - element e in seq -

-
-

+

+ seq +

+ A model of Forward + Sequence, f(e) is a valid expression, convertible + to bool, for every + element e in seq +

The sequence to search -

-
-

- f -

-
-

+

+ f +

A unary function object -

-
-

+

The search predicate -

-
+
-
- - Expression +
+ + Expression Semantics
-
all(seq, f);
+
all(seq, f);
 

- Return type: bool + Return type: bool

- Semantics: Returns true if and only - if f(e) - evaluates to true for every - element e in seq. + Semantics: Returns true if and only + if f(e) + evaluates to true for every + element e in seq.

- - Complexity + + Complexity

- Linear. At most result_of::size<Sequence>::value comparisons. + Linear. At most result_of::size<Sequence>::value comparisons.

- - Header + + Header
#include <boost/fusion/algorithm/query/all.hpp>
 #include <boost/fusion/include/all.hpp>
 
- - Example + + Example
struct odd
 {
@@ -157,8 +143,8 @@
     }
 };
 ...
-assert(all(make_vector(1,3), odd()));
-assert(!all(make_vector(1,2), odd()));
+assert(all(make_vector(1,3), odd()));
+assert(!all(make_vector(1,2), odd()));
 
diff --git a/doc/html/fusion/algorithm/query/functions/any.html b/doc/html/fusion/algorithm/query/functions/any.html index 1e5a1a53..011b019e 100644 --- a/doc/html/fusion/algorithm/query/functions/any.html +++ b/doc/html/fusion/algorithm/query/functions/any.html @@ -3,10 +3,10 @@ any - + - + @@ -22,131 +22,117 @@
PrevUpHomeNext
-
-
-any -
+
+
+
+any +
+
+
- - Description + + Description

- For a sequence seq and - unary function object f, - any returns true if - f returns true for at - least one element of seq. + For a sequence seq and + unary function object f, + any returns true if + f returns true for at + least one element of seq.

- - Synopsis + + Synopsis
template<
     typename Sequence,
     typename F
     >
-typename result_of::any<Sequence,F>::type any(
+typename result_of::any<Sequence,F>::type any(
     Sequence const& seq, F f);
 
-

Table 1.39. Parameters

-
+

Table 1.39. Parameters

+
- - + - + +

- - - + + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

- A model of Forward - Sequence, f(e) must be a valid expression, convertible - to bool, for each - element e in seq -

-
-

+

+ seq +

+ A model of Forward + Sequence, f(e) must be a valid expression, convertible + to bool, for each + element e in seq +

The sequence to search -

-
-

- f -

-
-

+

+ f +

A unary function object -

-
-

+

The search predicate -

-
+
-
- - Expression +
+ + Expression semantics
-
any(seq, f);
+
any(seq, f);
 

- Return type: bool + Return type: bool

- Semantics: Returns true if and only - if f(e) - evaluates to true for some - element e in seq. + Semantics: Returns true if and only + if f(e) + evaluates to true for some + element e in seq.

- - Complexity + + Complexity

- Linear. At most result_of::size<Sequence>::value comparisons. + Linear. At most result_of::size<Sequence>::value comparisons.

- - Header + + Header
#include <boost/fusion/algorithm/query/any.hpp>
 #include <boost/fusion/include/any.hpp>
 
- - Example + + Example
struct odd
 {
@@ -157,8 +143,8 @@
     }
 };
 ...
-assert(any(make_vector(1,2), odd()));
-assert(!any(make_vector(2,4), odd()));
+assert(any(make_vector(1,2), odd()));
+assert(!any(make_vector(2,4), odd()));
 
diff --git a/doc/html/fusion/algorithm/query/functions/count.html b/doc/html/fusion/algorithm/query/functions/count.html index 284af260..8675a7d3 100644 --- a/doc/html/fusion/algorithm/query/functions/count.html +++ b/doc/html/fusion/algorithm/query/functions/count.html @@ -3,10 +3,10 @@ count - + - + @@ -22,130 +22,116 @@
PrevUpHomeNext
-
-
-count -
+
+
+
+count +
+
+
- - Description + + Description

Returns the number of elements of a given type within a sequence.

- - Synopsis + + Synopsis
template<
     typename Sequence,
     typename T
     >
-typename result_of::count<Sequence, T>::type count(
+typename result_of::count<Sequence, T>::type count(
     Sequence const& seq, T const& t);
 
-

Table 1.44. Parameters

-
+

Table 1.44. Parameters

+
- - + - + +

- - - + + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

- A model of Forward - Sequence, e == t - must be a valid expression, convertible to bool, - for each element e - in seq -

-
-

+

+ seq +

+ A model of Forward + Sequence, e == t + must be a valid expression, convertible to bool, + for each element e + in seq +

The sequence to search -

-
-

- T -

-
-

+

+ T +

Any type -

-
-

+

The type to count -

-
+
-
- - Expression +
+ + Expression Semantics
-
count(seq, t);
+
count(seq, t);
 

- Return type: int + Return type: int

- Semantics: Returns the number of elements - of type T and equal to - t in seq. + Semantics: Returns the number of elements + of type T and equal to + t in seq.

- - Complexity + + Complexity

- Linear. At most result_of::size<Sequence>::value comparisons. + Linear. At most result_of::size<Sequence>::value comparisons.

- - Header + + Header
#include <boost/fusion/algorithm/query/count.hpp>
 #include <boost/fusion/include/count.hpp>
 
- - Example + + Example
-
const vector<double,int,int> vec(1.0,2,3);
-assert(count(vec,2) == 1);
+
const vector<double,int,int> vec(1.0,2,3);
+assert(count(vec,2) == 1);
 
diff --git a/doc/html/fusion/algorithm/query/functions/count_if.html b/doc/html/fusion/algorithm/query/functions/count_if.html index 6c31ef0e..0ea219a0 100644 --- a/doc/html/fusion/algorithm/query/functions/count_if.html +++ b/doc/html/fusion/algorithm/query/functions/count_if.html @@ -3,10 +3,10 @@ count_if - + - + @@ -22,129 +22,115 @@
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

Returns the number of elements within a sequence with a type for which - a given unary function object evaluates to true. + a given unary function object evaluates to true.

- - Synopsis + + Synopsis
template<
     typename Sequence,
     typename F
     >
-typename result_of::count_if<Sequence, F>::type count_if(
+typename result_of::count_if<Sequence, F>::type count_if(
     Sequence const& seq, F f);
 
-

Table 1.45. Parameters

-
+

Table 1.45. Parameters

+
- - + - + +

- - - + + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

- A model of Forward - Sequence, f(e) is a valid expression, convertible - to bool, for each - element e in seq -

-
-

+

+ seq +

+ A model of Forward + Sequence, f(e) is a valid expression, convertible + to bool, for each + element e in seq +

The sequence to search -

-
-

- f -

-
-

+

+ f +

A unary function object -

-
-

+

The search predicate -

-
+
-
- - Expression +
+ + Expression Semantics
-
count_if(seq, f)
+
count_if(seq, f)
 

- Return type: int + Return type: int

- Semantics: Returns the number of elements - in seq where f evaluates to true. + Semantics: Returns the number of elements + in seq where f evaluates to true.

- - Complexity + + Complexity

- Linear. At most result_of::size<Sequence>::value comparisons. + Linear. At most result_of::size<Sequence>::value comparisons.

- - Header + + Header
#include <boost/fusion/algorithm/query/count_if.hpp>
 #include <boost/fusion/include/count_if.hpp>
 
- - Example + + Example
-
const vector<int,int,int> vec(1,2,3);
-assert(count_if(vec,odd()) == 2);
+
const vector<int,int,int> vec(1,2,3);
+assert(count_if(vec,odd()) == 2);
 
diff --git a/doc/html/fusion/algorithm/query/functions/find.html b/doc/html/fusion/algorithm/query/functions/find.html index 1a5ea6b7..f3f695fe 100644 --- a/doc/html/fusion/algorithm/query/functions/find.html +++ b/doc/html/fusion/algorithm/query/functions/find.html @@ -3,10 +3,10 @@ find - + - + @@ -22,20 +22,23 @@
PrevUpHomeNext
-
-
-find -
+
+
+
+find +
+
+
- - Description + + Description

Finds the first element of a given type within a sequence.

- - Synopsis + + Synopsis
template<
     typename T,
@@ -50,107 +53,90 @@
 unspecified find(Sequence& seq);
 
-

Table 1.42. Parameters

-
+

Table 1.42. Parameters

+
- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

- A model of Forward +

+ seq +

+ A model of Forward Sequence -

-
-

+

The sequence to search -

-
-

- T -

-
-

+

+ T +

Any type -

-
-

+

The type to search for -

-
+
-
- - Expression +
+ + Expression Semantics
-
find<T>(seq)
+
find<T>(seq)
 

- Return type: A model of the same iterator - category as the iterators of seq. + Return type: A model of the same iterator + category as the iterators of seq.

- Semantics: Returns an iterator to the - first element of seq - of type T, or end(seq) if there is no such element. Equivalent - to find_if<boost::is_same<_, T> >(seq) + Semantics: Returns an iterator to the + first element of seq + of type T, or end(seq) if there is no such element. Equivalent + to find_if<boost::is_same<_, T> >(seq)

- - Complexity + + Complexity

- Linear. At most result_of::size<Sequence>::value comparisons. + Linear. At most result_of::size<Sequence>::value comparisons.

- - Header + + Header
#include <boost/fusion/algorithm/query/find.hpp>
 #include <boost/fusion/include/find.hpp>
 
- - Example + + Example
-
const vector<char,int> vec('a','0');
-assert(*find<int>(vec) == '0');
-assert(find<double>(vec) == end(vec));
+
const vector<char,int> vec('a','0');
+assert(*find<int>(vec) == '0');
+assert(find<double>(vec) == end(vec));
 
diff --git a/doc/html/fusion/algorithm/query/functions/find_if.html b/doc/html/fusion/algorithm/query/functions/find_if.html index 7ca805cc..d5eed466 100644 --- a/doc/html/fusion/algorithm/query/functions/find_if.html +++ b/doc/html/fusion/algorithm/query/functions/find_if.html @@ -3,10 +3,10 @@ find_if - + - + @@ -22,22 +22,25 @@
PrevUpHomeNext
-
- +
+
+ +
+

Finds the first element within a sequence with a type for which a given MPL - Lambda Expression evaluates to boost::mpl::true_. + Lambda Expression evaluates to boost::mpl::true_.

- - Description + + Description
- - Synopsis + + Synopsis
template<
     typename F,
@@ -52,105 +55,88 @@
 unspecified find_if(Sequence& seq);
 
-

Table 1.43. Parameters

-
+

Table 1.43. Parameters

+
- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

- A model of Forward +

+ seq +

+ A model of Forward Sequence -

-
-

+

The sequence to search -

-
-

- F -

-
-

+

+ F +

A unary MPL Lambda Expression -

-
-

+

The search predicate -

-
+ -
- - Expression +
+ + Expression Semantics
-
find_if<F>(seq)
+
find_if<F>(seq)
 

- Return type: An iterator of the same - iterator category as the iterators of seq. + Return type: An iterator of the same + iterator category as the iterators of seq.

- Semantics: Returns the first element - of seq for which MPL - Lambda Expression F - evaluates to boost::mpl::true_, or end(seq) + Semantics: Returns the first element + of seq for which MPL + Lambda Expression F + evaluates to boost::mpl::true_, or end(seq) if there is no such element.

- - Complexity + + Complexity

- Linear. At most result_of::size<Sequence>::value comparisons. + Linear. At most result_of::size<Sequence>::value comparisons.

/algorithm/query/find_if.hpp>

- - Example + + Example
-
const vector<double,int> vec(1.0,2);
-assert(*find_if<is_integral<mpl::_> >(vec) == 2);
-assert(find_if<is_class<mpl::_> >(vec) == end(vec));
+
const vector<double,int> vec(1.0,2);
+assert(*find_if<is_integral<mpl::_> >(vec) == 2);
+assert(find_if<is_class<mpl::_> >(vec) == end(vec));
 
diff --git a/doc/html/fusion/algorithm/query/functions/none.html b/doc/html/fusion/algorithm/query/functions/none.html index a93362b3..fb2f13e2 100644 --- a/doc/html/fusion/algorithm/query/functions/none.html +++ b/doc/html/fusion/algorithm/query/functions/none.html @@ -3,10 +3,10 @@ none - + - + @@ -22,131 +22,117 @@
PrevUpHomeNext
-
-
-none -
+
+
+
+none +
+
+
- - Description + + Description

- For a sequence seq and - unary function object f, - none returns true if - f returns false for every - element of seq. + For a sequence seq and + unary function object f, + none returns true if + f returns false for every + element of seq.

- - Synopsis + + Synopsis
template<
     typename Sequence,
     typename F
     >
-typename result_of::none<Sequence,F>::type none(
+typename result_of::none<Sequence,F>::type none(
     Sequence const& seq, F f);
 
-

Table 1.41. Parameters

-
+

Table 1.41. Parameters

+
- - + - + +

- - - + + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

- A model of Forward - Sequence, f(e) is a valid expression, convertible - to bool, for every - element e in seq -

-
-

+

+ seq +

+ A model of Forward + Sequence, f(e) is a valid expression, convertible + to bool, for every + element e in seq +

The sequence to search -

-
-

- f -

-
-

+

+ f +

A unary function object -

-
-

+

The search predicate -

-
+ -
- - Expression +
+ + Expression Semantics
-
none(seq, f);
+
none(seq, f);
 

- Return type: bool + Return type: bool

- Semantics: Returns true if and only - if f(e) - evaluates to false for every - element e in seq. Result equivalent to !any(seq, f). + Semantics: Returns true if and only + if f(e) + evaluates to false for every + element e in seq. Result equivalent to !any(seq, f).

- - Complexity + + Complexity

- Linear. At most result_of::size<Sequence>::value comparisons. + Linear. At most result_of::size<Sequence>::value comparisons.

- - Header + + Header
#include <boost/fusion/algorithm/query/none.hpp>
 #include <boost/fusion/include/none.hpp>
 
- - Example + + Example
struct odd
 {
@@ -157,8 +143,8 @@
     }
 };
 ...
-assert(none(make_vector(2,4), odd()));
-assert(!none(make_vector(1,2), odd()));
+assert(none(make_vector(2,4), odd()));
+assert(!none(make_vector(1,2), odd()));
 
diff --git a/doc/html/fusion/algorithm/query/metafunctions.html b/doc/html/fusion/algorithm/query/metafunctions.html index f6b639c1..03aa9147 100644 --- a/doc/html/fusion/algorithm/query/metafunctions.html +++ b/doc/html/fusion/algorithm/query/metafunctions.html @@ -3,10 +3,10 @@ Metafunctions - + - + @@ -22,10 +22,13 @@
PrevUpHomeNext
-
- +
+
+ +
+
any
all
diff --git a/doc/html/fusion/algorithm/query/metafunctions/all.html b/doc/html/fusion/algorithm/query/metafunctions/all.html index 2e34c969..5c4d3889 100644 --- a/doc/html/fusion/algorithm/query/metafunctions/all.html +++ b/doc/html/fusion/algorithm/query/metafunctions/all.html @@ -3,10 +3,10 @@ all - + - + @@ -22,20 +22,23 @@
PrevUpHomeNext
-
-
-all -
+
+
+
+all +
+
+
- - Description + + Description

- A metafunction returning the result type of all. + A metafunction returning the result type of all.

- - Synopsis + + Synopsis
template<
     typename Sequence,
@@ -47,98 +50,83 @@
 };
 
-

Table 1.47. Parameters

-
+

Table 1.47. Parameters

+
- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Sequence -

-
-

- A model of Forward +

+ Sequence +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- F -

-
-

- A model of unary Polymorphic +

+ F +

+ A model of unary Polymorphic Function Object -

-
-

+

Operation's argument -

-
+ -
- - Expression +
+ + Expression Semantics
-
result_of::all<Sequence, F>::type
+
result_of::all<Sequence, F>::type
 

- Return type: bool. + Return type: bool.

- Semantics: Returns the return type of - all - given a sequence of type Sequence - and a unary Polymorphic - Function Object of type F. - The return type is always bool. + Semantics: Returns the return type of + all + given a sequence of type Sequence + and a unary Polymorphic + Function Object of type F. + The return type is always bool.

- - Complexity + + Complexity

Constant.

- - Header + + Header
#include <boost/fusion/algorithm/query/all.hpp>
 #include <boost/fusion/include/all.hpp>
diff --git a/doc/html/fusion/algorithm/query/metafunctions/any.html b/doc/html/fusion/algorithm/query/metafunctions/any.html
index c91cb670..772e1969 100644
--- a/doc/html/fusion/algorithm/query/metafunctions/any.html
+++ b/doc/html/fusion/algorithm/query/metafunctions/any.html
@@ -3,10 +3,10 @@
 
 any
 
-
+
 
 
-
+
 
 
 
@@ -22,20 +22,23 @@
 
PrevUpHomeNext
-
-
-any -
+
+
+
+any +
+
+
- - Description + + Description

- A metafunction returning the result type of any. + A metafunction returning the result type of any.

- - Synopsis + + Synopsis
template<
     typename Sequence,
@@ -47,98 +50,83 @@
 };
 
-

Table 1.46. Parameters

-
+

Table 1.46. Parameters

+
- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Sequence -

-
-

- A model of Forward +

+ Sequence +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- F -

-
-

- A model of unary Polymorphic +

+ F +

+ A model of unary Polymorphic Function Object -

-
-

+

Operation's argument -

-
+
-
- - Expression +
+ + Expression Semantics
-
result_of::any<Sequence, F>::type
+
result_of::any<Sequence, F>::type
 

- Return type: bool. + Return type: bool.

- Semantics: Returns the return type of - any - given a sequence of type Sequence - and a unary Polymorphic - Function Object of type F. - The return type is always bool. + Semantics: Returns the return type of + any + given a sequence of type Sequence + and a unary Polymorphic + Function Object of type F. + The return type is always bool.

- - Complexity + + Complexity

Constant.

- - Header + + Header
#include <boost/fusion/algorithm/query/any.hpp>
 #include <boost/fusion/include/any.hpp>
diff --git a/doc/html/fusion/algorithm/query/metafunctions/count.html b/doc/html/fusion/algorithm/query/metafunctions/count.html
index 9d771d66..0e20ddc0 100644
--- a/doc/html/fusion/algorithm/query/metafunctions/count.html
+++ b/doc/html/fusion/algorithm/query/metafunctions/count.html
@@ -3,10 +3,10 @@
 
 count
 
-
+
 
 
-
+
 
 
 
@@ -22,21 +22,24 @@
 
PrevUpHomeNext
-
-
-count -
+
+
+
+count +
+
+
- - Description + + Description

- A metafunction that returns the result type of count + A metafunction that returns the result type of count given the sequence and search types.

- - Synopsis + + Synopsis
template<
     typename Sequence,
@@ -48,94 +51,77 @@
 };
 
-

Table 1.51. Parameters

-
+

Table 1.51. Parameters

+
- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

heading Description -

-
-

- Sequence -

-
-

- A model of Forward +

+ Sequence +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- T -

-
-

+

+ T +

Any type -

-
-

+

Operation's argument -

-
+
-
- - Expression +
+ + Expression Semantics
-
result_of::count<T>::type
+
result_of::count<T>::type
 

- Return type: int. + Return type: int.

- Semantics: Returns the return type of - count. The return type is always - int. + Semantics: Returns the return type of + count. The return type is always + int.

- - Complexity + + Complexity

Constant.

- - Header + + Header
#include <boost/fusion/algorithm/query/count.hpp>
 #include <boost/fusion/include/count.hpp>
diff --git a/doc/html/fusion/algorithm/query/metafunctions/count_if.html b/doc/html/fusion/algorithm/query/metafunctions/count_if.html
index 7a81368c..8587194e 100644
--- a/doc/html/fusion/algorithm/query/metafunctions/count_if.html
+++ b/doc/html/fusion/algorithm/query/metafunctions/count_if.html
@@ -3,10 +3,10 @@
 
 count_if
 
-
+
 
 
-
+
 
 
 
@@ -22,21 +22,24 @@
 
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- A metafunction that returns the result type of count_if + A metafunction that returns the result type of count_if given the sequence and predicate types.

- - Synopsis + + Synopsis
template<
     typename Sequence,
@@ -48,94 +51,77 @@
 };
 
-

Table 1.52. Parameters

-
+

Table 1.52. Parameters

+
- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Sequence -

-
-

- A model of Forward +

+ Sequence +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- Pred -

-
-

+

+ Pred +

A unary function object -

-
-

+

Operation's argument -

-
+
-
- - Expression +
+ + Expression Semantics
-
result_of::count_if<Sequence, Pred>::type
+
result_of::count_if<Sequence, Pred>::type
 

- Return type: int. + Return type: int.

- Semantics: Returns the return type of - count_if. The return type is - always int. + Semantics: Returns the return type of + count_if. The return type is + always int.

- - Complexity + + Complexity

Constant.

- - Header + + Header
#include <boost/fusion/algorithm/query/count_if.hpp>
 #include <boost/fusion/include/count_if.hpp>
diff --git a/doc/html/fusion/algorithm/query/metafunctions/find.html b/doc/html/fusion/algorithm/query/metafunctions/find.html
index 3172d49c..305bb4ba 100644
--- a/doc/html/fusion/algorithm/query/metafunctions/find.html
+++ b/doc/html/fusion/algorithm/query/metafunctions/find.html
@@ -3,10 +3,10 @@
 
 find
 
-
+
 
 
-
+
 
 
 
@@ -22,21 +22,24 @@
 
PrevUpHomeNext
-
-
-find -
+
+
+
+find +
+
+
- - Description + + Description

- Returns the result type of find, + Returns the result type of find, given the sequence and search types.

- - Synopsis + + Synopsis
template<
     typename Sequence,
@@ -48,96 +51,79 @@
 };
 
-

Table 1.49. Parameters

-
+

Table 1.49. Parameters

+
- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Sequence -

-
-

- Model of Forward +

+ Sequence +

+ Model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- T -

-
-

+

+ T +

Any type -

-
-

+

Operation's argument -

-
+
-
- - Expression +
+ + Expression Semantics
-
result_of::find<Sequence, T>::type
+
result_of::find<Sequence, T>::type
 

- Return type: A model of the same iterator - category as the iterators of Sequence. + Return type: A model of the same iterator + category as the iterators of Sequence.

- Semantics: Returns an iterator to the - first element of type T - in Sequence, or result_of::end<Sequence>::type + Semantics: Returns an iterator to the + first element of type T + in Sequence, or result_of::end<Sequence>::type if there is no such element.

- - Complexity + + Complexity

- Linear, at most result_of::size<Sequence>::value comparisons. + Linear, at most result_of::size<Sequence>::value comparisons.

- - Header + + Header
#include <boost/fusion/algorithm/query/find.hpp>
 #include <boost/fusion/include/find.hpp>
diff --git a/doc/html/fusion/algorithm/query/metafunctions/find_if.html b/doc/html/fusion/algorithm/query/metafunctions/find_if.html
index c05ecb3d..ee10c29c 100644
--- a/doc/html/fusion/algorithm/query/metafunctions/find_if.html
+++ b/doc/html/fusion/algorithm/query/metafunctions/find_if.html
@@ -3,10 +3,10 @@
 
 find_if
 
-
+
 
 
-
+
 
 
 
@@ -22,21 +22,24 @@
 
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- Returns the result type of find_if + Returns the result type of find_if given the sequence and predicate types.

- - Synopsis + + Synopsis
template<
     typename Sequence,
@@ -48,97 +51,80 @@
 };
 
-

Table 1.50. Parameters

-
+

Table 1.50. Parameters

+
- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Sequence -

-
-

- A model of Forward +

+ Sequence +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- Pred -

-
-

+

+ Pred +

A model of MPL Lambda Expression -

-
-

+

Operation's arguments -

-
+
-
- - Expression +
+ + Expression Semantics
-
result_of::find_if<Sequence, Pred>::type
+
result_of::find_if<Sequence, Pred>::type
 

- Return type: A model of the same iterator - category as the iterators of Sequence. + Return type: A model of the same iterator + category as the iterators of Sequence.

- Semantics: Returns an iterator to the - first element in Sequence - for which Pred evaluates - to true. Returns result_of::end<Sequence>::type if there is no such element. + Semantics: Returns an iterator to the + first element in Sequence + for which Pred evaluates + to true. Returns result_of::end<Sequence>::type if there is no such element.

- - Complexity + + Complexity

- Linear. At most result_of::size<Sequence>::value comparisons. + Linear. At most result_of::size<Sequence>::value comparisons.

- - Header + + Header
#include <boost/fusion/algorithm/query/find_if.hpp>
 #include <boost/fusion/include/find_if.hpp>
diff --git a/doc/html/fusion/algorithm/query/metafunctions/none.html b/doc/html/fusion/algorithm/query/metafunctions/none.html
index 1bb5329e..cbcc6bad 100644
--- a/doc/html/fusion/algorithm/query/metafunctions/none.html
+++ b/doc/html/fusion/algorithm/query/metafunctions/none.html
@@ -3,10 +3,10 @@
 
 none
 
-
+
 
 
-
+
 
 
 
@@ -22,20 +22,23 @@
 
PrevUpHomeNext
-
-
-none -
+
+
+
+none +
+
+
- - Description + + Description

- A metafunction returning the result type of none. + A metafunction returning the result type of none.

- - Synopsis + + Synopsis
template<
     typename Sequence,
@@ -47,98 +50,83 @@
 };
 
-

Table 1.48. Parameters

-
+

Table 1.48. Parameters

+
- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Sequence -

-
-

- A model of Forward +

+ Sequence +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- F -

-
-

- A model of unary Polymorphic +

+ F +

+ A model of unary Polymorphic Function Object -

-
-

+

Operation's argument -

-
+
-
- - Expression +
+ + Expression Semantics
-
result_of::none<Sequence, F>::type
+
result_of::none<Sequence, F>::type
 

- Return type: bool. + Return type: bool.

- Semantics: Returns the return type of - none - given a sequence of type Sequence - and a unary Polymorphic - Function Object of type F. - The return type is always bool. + Semantics: Returns the return type of + none + given a sequence of type Sequence + and a unary Polymorphic + Function Object of type F. + The return type is always bool.

- - Complexity + + Complexity

Constant.

- - Header + + Header
#include <boost/fusion/algorithm/query/none.hpp>
 #include <boost/fusion/include/none.hpp>
diff --git a/doc/html/fusion/algorithm/transformation.html b/doc/html/fusion/algorithm/transformation.html
index 6c7283f0..17f9572e 100644
--- a/doc/html/fusion/algorithm/transformation.html
+++ b/doc/html/fusion/algorithm/transformation.html
@@ -3,10 +3,10 @@
 
 Transformation
 
-
+
 
 
-
+
 
 
 
@@ -22,10 +22,13 @@
 
PrevUpHomeNext
-
- +
+
+ +
+
Functions
Metafunctions
@@ -35,21 +38,21 @@ by performing some sort of transformation. In reality the new sequences are views onto the data in the original sequences.

-
+
-
[Note] Note

+

As the transformation algorithms return views onto their input arguments, it is important that the lifetime of the input arguments is greater than the period during which you wish to use the results.

-
- - Header -
+

+ + Header +

#include <boost/fusion/algorithm/transformation.hpp>
 #include <boost/fusion/include/transformation.hpp>
 
diff --git a/doc/html/fusion/algorithm/transformation/functions.html b/doc/html/fusion/algorithm/transformation/functions.html index 0ce466d5..99877326 100644 --- a/doc/html/fusion/algorithm/transformation/functions.html +++ b/doc/html/fusion/algorithm/transformation/functions.html @@ -3,10 +3,10 @@ Functions - + - + @@ -22,10 +22,13 @@
PrevUpHomeNext
-
- +
+
+ +
+
filter
filter_if
diff --git a/doc/html/fusion/algorithm/transformation/functions/clear.html b/doc/html/fusion/algorithm/transformation/functions/clear.html index eb400f13..f9338990 100644 --- a/doc/html/fusion/algorithm/transformation/functions/clear.html +++ b/doc/html/fusion/algorithm/transformation/functions/clear.html @@ -3,10 +3,10 @@ clear - + - + @@ -22,105 +22,98 @@
PrevUpHomeNext
-
-
-clear -
+
+
+
+clear +
+
+
- - Description + + Description

- clear returns an empty sequence. + clear returns an empty sequence.

- - Synposis + + Synposis
template<
     typename Sequence
     >
-typename result_of::clear<Sequence const>::type clear(Sequence const& seq);
+typename result_of::clear<Sequence const>::type clear(Sequence const& seq);
 
-

Table 1.62. Parameters

-
+

Table 1.62. Parameters

+
- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

- A model of Forward +

+ seq +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
+
-
- - Expression +
+ + Expression Semantics
-
clear(seq);
+
clear(seq);
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Expression Semantics: Returns a sequence + Expression Semantics: Returns a sequence with no elements.

- - Complexity + + Complexity

Constant.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/clear.hpp>
 #include <boost/fusion/include/clear.hpp>
 
- - Example + + Example
-
assert(clear(make_vector(1,2,3)) == make_vector());
+
assert(clear(make_vector(1,2,3)) == make_vector());
 
diff --git a/doc/html/fusion/algorithm/transformation/functions/erase.html b/doc/html/fusion/algorithm/transformation/functions/erase.html index b086ac00..0160fd20 100644 --- a/doc/html/fusion/algorithm/transformation/functions/erase.html +++ b/doc/html/fusion/algorithm/transformation/functions/erase.html @@ -3,10 +3,10 @@ erase - + - + @@ -22,27 +22,30 @@
PrevUpHomeNext
-
-
-erase -
+
+
+
+erase +
+
+
- - Description + + Description

Returns a new sequence, containing all the elements of the original except those at a specified iterator, or between two iterators.

- - Synposis + + Synposis
template<
     typename Sequence,
     typename First
     >
-typename result_of::erase<Sequence const, First>::type erase(
+typename result_of::erase<Sequence const, First>::type erase(
     Sequence const& seq, First const& it1);
 
 template<
@@ -50,141 +53,122 @@
     typename First,
     typename Last
     >
-typename result_of::erase<Sequence const, First, Last>::type erase(
+typename result_of::erase<Sequence const, First, Last>::type erase(
     Sequence const& seq, First const& it1, Last const& it2);
 
-

Table 1.63. Parameters

-
+

Table 1.63. Parameters

+
- - + - + +

- - + - + +

- - + - +

+ - - + - +

+ -
-

+

Parameters -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

- A model of Forward +

+ seq +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- it1 -

-
-

- A model of Forward +

+ it1 +

+ A model of Forward Iterator -

-
-

- Iterator into seq -

-

+ Iterator into seq +

-

- it2 -

-
-

- A model of Forward +

+ it2 +

+ A model of Forward Iterator -

-
-

- Iterator into seq - after it1 -

-

+ Iterator into seq + after it1 +

+
-
- - Expression +
+ + Expression Semantics
-
erase(seq, pos);
+
erase(seq, pos);
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a new sequence, containing - all the elements of seq - except the element at pos. + Semantics: Returns a new sequence, containing + all the elements of seq + except the element at pos.

-
erase(seq, first, last);
+
erase(seq, first, last);
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a new sequence, with - all the elements of seq, - in their original order, except those in the range [first,last). + Semantics: Returns a new sequence, with + all the elements of seq, + in their original order, except those in the range [first,last).

- - Complexity + + Complexity

Constant. Returns a view which is lazily evaluated.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/erase.hpp>
 #include <boost/fusion/include/erase.hpp>
 
- - Example + + Example
-
const vector<int, double, char> vec(1, 2.0, 'c');
-assert(erase(vec, next(begin(vec))) == make_vector(1, 'c'));
-assert(erase(vec, next(begin(vec)), end(vec)) == make_vector(1));
+
const vector<int, double, char> vec(1, 2.0, 'c');
+assert(erase(vec, next(begin(vec))) == make_vector(1, 'c'));
+assert(erase(vec, next(begin(vec)), end(vec)) == make_vector(1));
 
diff --git a/doc/html/fusion/algorithm/transformation/functions/erase_key.html b/doc/html/fusion/algorithm/transformation/functions/erase_key.html index d121b4b0..ca02e1f1 100644 --- a/doc/html/fusion/algorithm/transformation/functions/erase_key.html +++ b/doc/html/fusion/algorithm/transformation/functions/erase_key.html @@ -3,10 +3,10 @@ erase_key - + - + @@ -22,24 +22,29 @@
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- For an Associative - Sequence seq, - returns a Forward + For an Associative + Sequence seq, + returns a Forward Sequence containing all the elements of the original except those with a given key.

- - Synposis + + Synposis
template<
     typename Key,
@@ -48,104 +53,88 @@
 typename result_of::erase_key<Sequence const, Key>::type erase_key(Sequence const& seq);
 
-

Table 1.64. Parameters

-
+

Table 1.64. Parameters

+
- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

- A model of Associative +

+ seq +

+ A model of Associative Sequence -

-
-

+

Operation's argument -

-
-

- Key -

-
-

+

+ Key +

Any type -

-
-

+

Key to erase -

-
+
-
- - Expression +
+ + Expression Semantics
-
erase_key<Key>(seq);
+
erase_key<Key>(seq);
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a new sequence, containing - all the elements of seq, - except those with key Key. + Semantics: Returns a new sequence, containing + all the elements of seq, + except those with key Key.

- - Complexity + + Complexity

Constant. Returns a view which is lazily evaluated.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/erase_key.hpp>
 #include <boost/fusion/include/erase_key.hpp>
 
- - Example + + Example
-
assert(erase_key<int>(make_map<int, long>('a', 'b')) == make_map<long>('b'));
+
assert(erase_key<int>(make_map<int, long>('a', 'b')) == make_map<long>('b'));
 
diff --git a/doc/html/fusion/algorithm/transformation/functions/filter.html b/doc/html/fusion/algorithm/transformation/functions/filter.html index a8234730..9fbefd71 100644 --- a/doc/html/fusion/algorithm/transformation/functions/filter.html +++ b/doc/html/fusion/algorithm/transformation/functions/filter.html @@ -3,10 +3,10 @@ filter - + - + @@ -22,129 +22,116 @@
PrevUpHomeNext
-
-
-filter -
+
+
+
+filter +
+
+
- - Description + + Description

For a given sequence, filter returns a new sequences containing only the elements of a specified type.

- - Synopsis + + Synopsis
template<
     typename T,
     typename Sequence
     >
-typename result_of::filter<Sequence const, T>::type filter(Sequence const& seq);
+typename result_of::filter<Sequence const, T>::type filter(Sequence const& seq);
 
-

Table 1.53. Parameters

-
+

Table 1.53. Parameters

+
- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

- A model of Forward +

+ seq +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- T -

-
-

+

+ T +

Any type -

-
-

+

The type to retain -

-
+
-
- - Expression +
+ + Expression Semantics
-
filter<T>(seq);
+
filter<T>(seq);
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a sequence containing - all the elements of seq - of type T. Equivalent - to filter_if<boost::same_type<_, T> >(seq). + Semantics: Returns a sequence containing + all the elements of seq + of type T. Equivalent + to filter_if<boost::same_type<_, T> >(seq).

- - Complexity + + Complexity

Constant. Returns a view which is lazily evaluated.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/filter.hpp>
 #include <boost/fusion/include/filter.hpp>
 
- - Example + + Example
-
const vector<int,int,long,long> vec(1,2,3,4);
-assert(filter<int>(vec) == make_vector(1,2));
+
const vector<int,int,long,long> vec(1,2,3,4);
+assert(filter<int>(vec) == make_vector(1,2));
 
diff --git a/doc/html/fusion/algorithm/transformation/functions/filter_if.html b/doc/html/fusion/algorithm/transformation/functions/filter_if.html index 528ca4e0..be0cf834 100644 --- a/doc/html/fusion/algorithm/transformation/functions/filter_if.html +++ b/doc/html/fusion/algorithm/transformation/functions/filter_if.html @@ -3,10 +3,10 @@ filter_if - + - + @@ -22,132 +22,119 @@
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- For a given sequence, filter_if returns a new sequences + For a given sequence, filter_if returns a new sequences containing only the elements with types for which a given MPL - Lambda Expression evaluates to boost::mpl::true_. + Lambda Expression evaluates to boost::mpl::true_.

- - Synopsis + + Synopsis
template<
     typename Pred,
     typename Sequence
     >
-typename result_of::filter_if<Sequence const, Pred>::type filter_if(Sequence const& seq);
+typename result_of::filter_if<Sequence const, Pred>::type filter_if(Sequence const& seq);
 
-

Table 1.54. Parameters

-
+

Table 1.54. Parameters

+
- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

- A model of Forward +

+ seq +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- Pred -

-
-

+

+ Pred +

A unary MPL Lambda Expression -

-
-

+

The predicate to filter by -

-
+
-
- - Expression +
+ + Expression Semantics
-
filter_if<Pred>(seq);
+
filter_if<Pred>(seq);
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a sequence containing - all the elements of seq - with types for which Pred - evaluates to boost::mpl::true_. The order of the retained elements + Semantics: Returns a sequence containing + all the elements of seq + with types for which Pred + evaluates to boost::mpl::true_. The order of the retained elements is the same as in the original sequence.

- - Complexity + + Complexity

Constant. Returns a view which is lazily evaluated.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/filter_if.hpp>
 #include <boost/fusion/include/filter_if.hpp>
 
- - Example + + Example
-
const vector<int,int,double,double> vec(1,2,3.0,4.0);
-assert(filter_if<is_integral<mpl::_> >(vec) == make_vector(1,2));
+
const vector<int,int,double,double> vec(1,2,3.0,4.0);
+assert(filter_if<is_integral<mpl::_> >(vec) == make_vector(1,2));
 
diff --git a/doc/html/fusion/algorithm/transformation/functions/insert.html b/doc/html/fusion/algorithm/transformation/functions/insert.html index 711d9965..2149d2b4 100644 --- a/doc/html/fusion/algorithm/transformation/functions/insert.html +++ b/doc/html/fusion/algorithm/transformation/functions/insert.html @@ -3,10 +3,10 @@ insert - + - + @@ -22,21 +22,24 @@
PrevUpHomeNext
-
-
-insert -
+
+
+
+insert +
+
+
- - Description + + Description

Returns a new sequence with all the elements of the original, an a new element inserted the position described by a given iterator.

- - Synposis + + Synposis
template<
     typename Sequence,
@@ -46,125 +49,104 @@
 unspecified insert(Sequence const& seq, Pos const& pos, T const& t);
 
-

Table 1.65. Parameters

-
+

Table 1.65. Parameters

+
- - + - + +

- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

- A model of Forward +

+ seq +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- pos -

-
-

- A model of Forward +

+ pos +

+ A model of Forward Iterator -

-
-

+

The position to insert at -

-
-

- t -

-
-

+

+ t +

Any type -

-
-

+

The value to insert -

-
+
-
- - Expression +
+ + Expression Semantics
-
insert(seq, p, t);
+
insert(seq, p, t);
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a new sequence, containing - all the elements of seq, + Semantics: Returns a new sequence, containing + all the elements of seq, in their original order, and a new element with the type and value of - t inserted at iterator - pos. + t inserted at iterator + pos.

- - Complexity + + Complexity

Constant. Returns a view which is lazily evaluated.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/insert.hpp>
 #include <boost/fusion/include/insert.hpp>
 
- - Example + + Example
-
const vector<int,int> vec(1,2);
-assert(insert(vec, next(begin(vec)), 3) == make_vector(1,3,2));
+
const vector<int,int> vec(1,2);
+assert(insert(vec, next(begin(vec)), 3) == make_vector(1,3,2));
 
diff --git a/doc/html/fusion/algorithm/transformation/functions/insert_range.html b/doc/html/fusion/algorithm/transformation/functions/insert_range.html index 041574dc..53cc548f 100644 --- a/doc/html/fusion/algorithm/transformation/functions/insert_range.html +++ b/doc/html/fusion/algorithm/transformation/functions/insert_range.html @@ -3,10 +3,10 @@ insert_range - + - + @@ -22,151 +22,134 @@
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

Returns a new sequence with another sequence inserted at a specified iterator.

- - Synposis + + Synposis
template<
     typename Sequence,
     typename Pos,
     typename Range
     >
-typename result_of::insert_range<Sequence const, Pos, Range>::type insert_range(
+typename result_of::insert_range<Sequence const, Pos, Range>::type insert_range(
     Sequence const& seq, Pos const& pos, Range const& range);
 
-

Table 1.66. Parameters

-
+

Table 1.66. Parameters

+
- - + - + +

- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

- A model of Forward +

+ seq +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- pos -

-
-

- A model of Forward +

+ pos +

+ A model of Forward Iterator -

-
-

+

The position to insert at -

-
-

- range -

-
-

- A model of Forward +

+ range +

+ A model of Forward Sequence -

-
-

+

Range to insert -

-
+
-
- - Expression +
+ + Expression Semantics
-
insert(seq, pos, range);
+
insert(seq, pos, range);
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a new sequence, containing - all the elements of seq, - and the elements of range - inserted at iterator pos. + Semantics: Returns a new sequence, containing + all the elements of seq, + and the elements of range + inserted at iterator pos. All elements retaining their ordering from the orignal sequences.

- - Complexity + + Complexity

Constant. Returns a view which is lazily evaluated.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/insert_range.hpp>
 #include <boost/fusion/include/insert_range.hpp>
 
- - Example + + Example
-
const vector<int,int> vec(1,2);
-assert(insert_range(vec, next(begin(vec)), make_vector(3,4)) == make_vector(1,3,4,2));
+
const vector<int,int> vec(1,2);
+assert(insert_range(vec, next(begin(vec)), make_vector(3,4)) == make_vector(1,3,4,2));
 
diff --git a/doc/html/fusion/algorithm/transformation/functions/join.html b/doc/html/fusion/algorithm/transformation/functions/join.html index a49b802b..1b910024 100644 --- a/doc/html/fusion/algorithm/transformation/functions/join.html +++ b/doc/html/fusion/algorithm/transformation/functions/join.html @@ -3,10 +3,10 @@ join - + - + @@ -22,130 +22,118 @@
PrevUpHomeNext
-
-
-join -
+
+
+
+join +
+
+
- - Description + + Description

Takes 2 sequences and returns a sequence containing the elements of the first followed by the elements of the second.

- - Synopsis + + Synopsis
template<
     typename LhSequence,
     typename RhSequence>
-typename result_of::join<LhSequence, RhSequence>::type join(LhSequence const& lhs, RhSequence const& rhs);
+typename result_of::join<LhSequence, RhSequence>::type join(LhSequence const& lhs, RhSequence const& rhs);
 
-

Table 1.67. Parameters

-
+

Table 1.67. Parameters

+
- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- lhs -

-
-

- A model of Forward +

+ lhs +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- rhs -

-
-

- A model of Forward +

+ rhs +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
+ -
- - Expression +
+ + Expression Semantics
-
join(lhs, rhs);
+
join(lhs, rhs);
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a sequence containing - all the elements of lhs - followed by all the elements of rhs. + Semantics: Returns a sequence containing + all the elements of lhs + followed by all the elements of rhs. The order of th elements is preserved.

- - Complexity + + Complexity

Constant. Returns a view which is lazily evaluated.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/join.hpp>
 #include <boost/fusion/include/join.hpp>
 
- - Example + + Example
-
vector<int,char> v1(1, 'a');
-vector<int,char> v2(2, 'b');
-assert(join(v1, v2) == make_vector(1,'a',2,'b'));
+
vector<int,char> v1(1, 'a');
+vector<int,char> v2(2, 'b');
+assert(join(v1, v2) == make_vector(1,'a',2,'b'));
 
diff --git a/doc/html/fusion/algorithm/transformation/functions/pop_back.html b/doc/html/fusion/algorithm/transformation/functions/pop_back.html index 9d2dab07..5335bf4c 100644 --- a/doc/html/fusion/algorithm/transformation/functions/pop_back.html +++ b/doc/html/fusion/algorithm/transformation/functions/pop_back.html @@ -3,10 +3,10 @@ pop_back - + - + @@ -22,107 +22,100 @@
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

Returns a new sequence, with the last element of the original removed.

- - Synopsis + + Synopsis
template<
     typename Sequence
     >
-typename result_of::pop_back<Sequence const>::type pop_back(Sequence const& seq);
+typename result_of::pop_back<Sequence const>::type pop_back(Sequence const& seq);
 
-

Table 1.69. Parameters

-
+

Table 1.69. Parameters

+
- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

- A model of Forward +

+ seq +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
+ -
- - Expression +
+ + Expression Semantics
-
pop_back(seq);
+
pop_back(seq);
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a new sequence containing - all the elements of seq, + Semantics: Returns a new sequence containing + all the elements of seq, except the last element. The elements in the new sequence are in the - same order as they were in seq. + same order as they were in seq.

- - Complexity + + Complexity

Constant. Returns a view which is lazily evaluated.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/pop_back.hpp>
 #include <boost/fusion/include/pop_back.hpp>
 
- - Example + + Example
-
assert(___pop_back__(make_vector(1,2,3)) == make_vector(1,2));
+
assert(___pop_back__(make_vector(1,2,3)) == make_vector(1,2));
 
diff --git a/doc/html/fusion/algorithm/transformation/functions/pop_front.html b/doc/html/fusion/algorithm/transformation/functions/pop_front.html index ad3177f2..66766f43 100644 --- a/doc/html/fusion/algorithm/transformation/functions/pop_front.html +++ b/doc/html/fusion/algorithm/transformation/functions/pop_front.html @@ -3,10 +3,10 @@ pop_front - + - + @@ -22,107 +22,100 @@
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

Returns a new sequence, with the first element of the original removed.

- - Synopsis + + Synopsis
template<
     typename Sequence
     >
-typename result_of::pop_front<Sequence const>::type pop_front(Sequence const& seq);
+typename result_of::pop_front<Sequence const>::type pop_front(Sequence const& seq);
 
-

Table 1.70. Parameters

-
+

Table 1.70. Parameters

+
- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

- A model of Forward +

+ seq +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
+ -
- - Expression +
+ + Expression Semantics
-
pop_front(seq);
+
pop_front(seq);
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a new sequence containing - all the elements of seq, + Semantics: Returns a new sequence containing + all the elements of seq, except the first element. The elements in the new sequence are in the - same order as they were in seq. + same order as they were in seq.

- - Complexity + + Complexity

Constant. Returns a view which is lazily evaluated.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/pop_front.hpp>
 #include <boost/fusion/include/pop_front.hpp>
 
- - Example + + Example
-
assert(pop_front(make_vector(1,2,3)) == make_vector(2,3));
+
assert(pop_front(make_vector(1,2,3)) == make_vector(2,3));
 
diff --git a/doc/html/fusion/algorithm/transformation/functions/push_back.html b/doc/html/fusion/algorithm/transformation/functions/push_back.html index 15cc4b66..7a4a9d26 100644 --- a/doc/html/fusion/algorithm/transformation/functions/push_back.html +++ b/doc/html/fusion/algorithm/transformation/functions/push_back.html @@ -3,10 +3,10 @@ push_back - + - + @@ -22,128 +22,115 @@
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

Returns a new sequence with an element added at the end.

- - Synopsis + + Synopsis
template<
     typename Sequence,
     typename T
     >
-typename result_of::push_back<Sequence, T>::type push_back(
+typename result_of::push_back<Sequence, T>::type push_back(
     Sequence const& seq, T const& t);
 
-

Table 1.71. Parameters

-
+

Table 1.71. Parameters

+
- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

- A model of Forward +

+ seq +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- t -

-
-

+

+ t +

Any type -

-
-

+

The value to add to the end -

-
+ -
- - Expression +
+ + Expression Semantics
-
push_back(seq, t);
+
push_back(seq, t);
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a new sequence, containing - all the elements of seq, - and new element t appended - to the end. The elements are in the same order as they were in seq. + Semantics: Returns a new sequence, containing + all the elements of seq, + and new element t appended + to the end. The elements are in the same order as they were in seq.

- - Complexity + + Complexity

Constant. Returns a view which is lazily evaluated.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/push_back.hpp>
 #include <boost/fusion/include/push_back.hpp>
 
- - Example + + Example
-
assert(push_back(make_vector(1,2,3),4) == make_vector(1,2,3,4));
+
assert(push_back(make_vector(1,2,3),4) == make_vector(1,2,3,4));
 
diff --git a/doc/html/fusion/algorithm/transformation/functions/push_front.html b/doc/html/fusion/algorithm/transformation/functions/push_front.html index fc7d0540..637636fd 100644 --- a/doc/html/fusion/algorithm/transformation/functions/push_front.html +++ b/doc/html/fusion/algorithm/transformation/functions/push_front.html @@ -3,10 +3,10 @@ push_front - + - + @@ -22,129 +22,116 @@
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

Returns a new sequence with an element added at the beginning.

- - Synopsis + + Synopsis
template<
     typename Sequence,
     typename T
     >
-typename result_of::push_front<Sequence, T>::type push_front(
+typename result_of::push_front<Sequence, T>::type push_front(
     Sequence const& seq, T const& t);
 
-

Table 1.72. Parameters

-
+

Table 1.72. Parameters

+
- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

- A model of Forward +

+ seq +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- t -

-
-

+

+ t +

Any type -

-
-

+

The value to add to the beginning -

-
+ -
- - Expression +
+ + Expression Semantics
-
push_back(seq, t);
+
push_back(seq, t);
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a new sequence, containing - all the elements of seq, - and new element t appended + Semantics: Returns a new sequence, containing + all the elements of seq, + and new element t appended to the beginning. The elements are in the same order as they were in - seq. + seq.

- - Complexity + + Complexity

Constant. Returns a view which is lazily evaluated.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/push_front.hpp>
 #include <boost/fusion/include/push_front.hpp>
 
- - Example + + Example
-
assert(push_front(make_vector(1,2,3),0) == make_vector(0,1,2,3));
+
assert(push_front(make_vector(1,2,3),0) == make_vector(0,1,2,3));
 
diff --git a/doc/html/fusion/algorithm/transformation/functions/remove.html b/doc/html/fusion/algorithm/transformation/functions/remove.html index 9150de0d..b2512b28 100644 --- a/doc/html/fusion/algorithm/transformation/functions/remove.html +++ b/doc/html/fusion/algorithm/transformation/functions/remove.html @@ -3,10 +3,10 @@ remove - + - + @@ -22,129 +22,116 @@
PrevUpHomeNext
-
-
-remove -
+
+
+
+remove +
+
+
- - Description + + Description

Returns a new sequence, with all the elements of the original sequence, except those of a given type.

- - Synopsis + + Synopsis
template<
     typename T,
     typename Sequence
     >
-typename result_of::remove<Sequence const, T>::type replace(Sequence const& seq);
+typename result_of::remove<Sequence const, T>::type replace(Sequence const& seq);
 
-

Table 1.59. Parameters

-
+

Table 1.59. Parameters

+
- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

- A model of Forward +

+ seq +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- T -

-
-

+

+ T +

Any type -

-
-

+

Type to remove -

-
+ -
- - Expression +
+ + Expression Semantics
-
remove<T>(seq);
+
remove<T>(seq);
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a new sequence, containing - all the elements of seq, - in their original order, except those of type T. - Equivalent to remove_if<boost::is_same<_,T> >(seq). + Semantics: Returns a new sequence, containing + all the elements of seq, + in their original order, except those of type T. + Equivalent to remove_if<boost::is_same<_,T> >(seq).

- - Complexity + + Complexity

Constant. Returns a view which is lazily evaluated.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/remove.hpp>
 #include <boost/fusion/include/remove.hpp>
 
- - Example + + Example
-
const vector<int,double> vec(1,2.0);
-assert(remove<double>(vec) == make_vector(1));
+
const vector<int,double> vec(1,2.0);
+assert(remove<double>(vec) == make_vector(1));
 
diff --git a/doc/html/fusion/algorithm/transformation/functions/remove_if.html b/doc/html/fusion/algorithm/transformation/functions/remove_if.html index f1a4161b..a4bd622b 100644 --- a/doc/html/fusion/algorithm/transformation/functions/remove_if.html +++ b/doc/html/fusion/algorithm/transformation/functions/remove_if.html @@ -3,10 +3,10 @@ remove_if - + - + @@ -22,131 +22,118 @@
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

Returns a new sequence, containing all the elements of the original except - those where a given unary function object evaluates to true. + those where a given unary function object evaluates to true.

- - Synopsis + + Synopsis
template<
     typename Pred,
     typename Sequence
     >
-typename result_of::remove_if<Sequence const, Pred>::type remove_if(Sequence const& seq);
+typename result_of::remove_if<Sequence const, Pred>::type remove_if(Sequence const& seq);
 
-

Table 1.60. Parameters

-
+

Table 1.60. Parameters

+
- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

- A model of Forward +

+ seq +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- Pred -

-
-

+

+ Pred +

A model of unary MPL Lambda Expression -

-
-

+

Removal predicate -

-
+ -
- - Expression +
+ + Expression Semantics
-
remove_if<Pred>(seq);
+
remove_if<Pred>(seq);
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a new sequence, containing - all the elements of seq, + Semantics: Returns a new sequence, containing + all the elements of seq, in their original order, except those elements with types for which - Pred evaluates to boost::mpl::true_. Equivalent to filter<boost::mpl::not_<Pred> - >(seq). + Pred evaluates to boost::mpl::true_. Equivalent to filter<boost::mpl::not_<Pred> + >(seq).

- - Complexity + + Complexity

Constant. Returns a view which is lazily evaluated.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/remove_if.hpp>
 #include <boost/fusion/include/remove_if.hpp>
 
- - Example + + Example
-
const vector<int,double> vec(1,2.0);
-assert(remove_if<is_floating_point<mpl::_> >(vec) == make_vector(1));
+
const vector<int,double> vec(1,2.0);
+assert(remove_if<is_floating_point<mpl::_> >(vec) == make_vector(1));
 
diff --git a/doc/html/fusion/algorithm/transformation/functions/replace.html b/doc/html/fusion/algorithm/transformation/functions/replace.html index d11940a6..ef8b4384 100644 --- a/doc/html/fusion/algorithm/transformation/functions/replace.html +++ b/doc/html/fusion/algorithm/transformation/functions/replace.html @@ -3,10 +3,10 @@ replace - + - + @@ -22,150 +22,131 @@
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

Replaces each value within a sequence of a given type and value with a new value.

- - Synopsis + + Synopsis
template<
     typename Sequence,
     typename T
     >
-typename result_of::replace<Sequence const, T>::type replace(
+typename result_of::replace<Sequence const, T>::type replace(
     Sequence const& seq, T const& old_value, T const& new_value);
 
-

Table 1.57. Parameters

-
+

Table 1.57. Parameters

+
- - + - + +

- - - + + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

- A model of Forward - Sequence, e == old_value - is a valid expression, convertible to bool, - for each element e - in seq with type - convertible to T -

-
-

+

+ seq +

+ A model of Forward + Sequence, e == old_value + is a valid expression, convertible to bool, + for each element e + in seq with type + convertible to T +

Operation's argument -

-
-

- old_value -

-
-

+

+ old_value +

Any type -

-
-

+

Value to replace -

-
-

- new_value -

-
-

+

+ new_value +

Any type -

-
-

+

Replacement value -

-
+ -
- - Expression +
+ + Expression Semantics
-
replace(seq, old_value, new_value);
+
replace(seq, old_value, new_value);
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a new sequence with - all the values of seq - with new_value assigned - to elements with the same type and equal to old_value. + Semantics: Returns a new sequence with + all the values of seq + with new_value assigned + to elements with the same type and equal to old_value.

- - Complexity + + Complexity

Constant. Returns a view which is lazily evaluated.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/replace.hpp>
 #include <boost/fusion/include/replace.hpp>
 
- - Example + + Example
-
assert(replace(make_vector(1,2), 2, 3) == make_vector(1,3));
+
assert(replace(make_vector(1,2), 2, 3) == make_vector(1,3));
 
diff --git a/doc/html/fusion/algorithm/transformation/functions/replace_if.html b/doc/html/fusion/algorithm/transformation/functions/replace_if.html index cc1c3028..4298583f 100644 --- a/doc/html/fusion/algorithm/transformation/functions/replace_if.html +++ b/doc/html/fusion/algorithm/transformation/functions/replace_if.html @@ -3,10 +3,10 @@ replace_if - + - + @@ -22,148 +22,129 @@
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

Replaces each element of a given sequence for which an unary function - object evaluates to true + object evaluates to true replaced with a new value.

- - Synopsis + + Synopsis
template<
     typename Sequence,
     typename F,
     typename T>
-typename result_of::replace_if<Sequence const, F, T>::type replace_if(
+typename result_of::replace_if<Sequence const, F, T>::type replace_if(
     Sequence const& seq, F f, T const& new_value);
 
-

Table 1.58. Parameters

-
+

Table 1.58. Parameters

+
- - + - + +

- - + - + +

- - - + + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

- A model of Forward +

+ seq +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- f -

-
-

- A function object for which f(e) is a valid expression, convertible - to bool, for each - element e in seq -

-
-

+

+ f +

+ A function object for which f(e) is a valid expression, convertible + to bool, for each + element e in seq +

Operation's argument -

-
-

- new_value -

-
-

+

+ new_value +

Any type -

-
-

+

Replacement value -

-
+ -
- - Expression +
+ + Expression Semantics
-
replace_if(seq, f, new_value);
+
replace_if(seq, f, new_value);
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a new sequence with - all the elements of seq, - with new_value assigned - to each element for which f - evaluates to true. + Semantics: Returns a new sequence with + all the elements of seq, + with new_value assigned + to each element for which f + evaluates to true.

- - Complexity + + Complexity

Constant. Returns a view which is lazily evaluated.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/replace_if.hpp>
 #include <boost/fusion/include/replace_if.hpp>
 
- - Example + + Example
struct odd
 {
@@ -174,7 +155,7 @@
     }
 };
 ...
-assert(replace_if(make_vector(1,2), odd(), 3) == make_vector(3,2));
+assert(replace_if(make_vector(1,2), odd(), 3) == make_vector(3,2));
 
diff --git a/doc/html/fusion/algorithm/transformation/functions/reverse.html b/doc/html/fusion/algorithm/transformation/functions/reverse.html index 20727fe5..a827ef7e 100644 --- a/doc/html/fusion/algorithm/transformation/functions/reverse.html +++ b/doc/html/fusion/algorithm/transformation/functions/reverse.html @@ -3,10 +3,10 @@ reverse - + - + @@ -22,106 +22,99 @@
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

Returns a new sequence with the elements of the original in reverse order.

- - Synposis + + Synposis
template<
     typename Sequence
     >
-typename result_of::reverse<Sequence const>::type reverse(Sequence const& seq);
+typename result_of::reverse<Sequence const>::type reverse(Sequence const& seq);
 
-

Table 1.61. Parameters

-
+

Table 1.61. Parameters

+
- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

- A model of Bidirectional +

+ seq +

+ A model of Bidirectional Sequence -

-
-

+

Operation's argument -

-
+ -
- - Expression +
+ + Expression Semantics
-
reverse(seq);
+
reverse(seq);
 

- Return type: A model of Bidirectional + Return type: A model of Bidirectional Sequence.

- Semantics: Returns a new sequence containing - all the elements of seq + Semantics: Returns a new sequence containing + all the elements of seq in reverse order.

- - Complexity + + Complexity

Constant. Returns a view which is lazily evaluated.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/reverse.hpp>
 #include <boost/fusion/include/reverse.hpp>
 
- - Example + + Example
-
assert(reverse(make_vector(1,2,3)) == make_vector(3,2,1));
+
assert(reverse(make_vector(1,2,3)) == make_vector(3,2,1));
 
diff --git a/doc/html/fusion/algorithm/transformation/functions/transform.html b/doc/html/fusion/algorithm/transformation/functions/transform.html index d0084f29..3bbfd6a3 100644 --- a/doc/html/fusion/algorithm/transformation/functions/transform.html +++ b/doc/html/fusion/algorithm/transformation/functions/transform.html @@ -3,10 +3,10 @@ transform - + - + @@ -22,119 +22,106 @@
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- For a sequence seq and - function object or function pointer f, - transform returns a new - sequence with elements created by applying f(e) to each element of e - of seq. + For a sequence seq and + function object or function pointer f, + transform returns a new + sequence with elements created by applying f(e) to each element of e + of seq.

- - Unary + + Unary version synopsis
template<
     typename Sequence,
     typename F
     >
-typename result_of::transform<Sequence const, F>::type transform(
+typename result_of::transform<Sequence const, F>::type transform(
     Sequence const& seq, F f);
 
-

Table 1.55. Parameters

-
+

Table 1.55. Parameters

+
- - + - + +

- - + - + +

- - - + + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

- A model of Forward +

+ seq +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- f -

-
-

- f(e) - is a valid expression for each element e - of seq. boost::result_of<F(E)>::type is the return type of f when called with a value of - each element type E. -

-
-

+

+ f +

+ f(e) + is a valid expression for each element e + of seq. boost::result_of<F(E)>::type is the return type of f when called with a value of + each element type E. +

Transformation function -

-
+ -
- - Expression +
+ + Expression Semantics
-
transform(seq, f);
+
transform(seq, f);
 

- Return type: A model of Forward + Return type: A model of Forward Sequence

- Semantics: Returns a new sequence, containing - the return values of f(e) for each element e - within seq. + Semantics: Returns a new sequence, containing + the return values of f(e) for each element e + within seq.

- - Binary + + Binary version synopsis
template<
@@ -142,121 +129,100 @@
     typename Sequence2,
     typename F
     >
-typename result_of::transform<Sequence1 const, Sequence2 const, F>::type transform(
+typename result_of::transform<Sequence1 const, Sequence2 const, F>::type transform(
     Sequence1 const& seq1, Sequence2 const& seq2, F f);
 
-

Table 1.56. Parameters

-
+

Table 1.56. Parameters

+
- - + - + +

- - + - + +

- - + - + +

- - - + + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq1 -

-
-

- A model of Forward +

+ seq1 +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- seq2 -

-
-

- A model of Forward +

+ seq2 +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- f -

-
-

- f(e1,e2) - is a valid expression for each pair of elements e1 - of seq1 and e2 of seq2. - boost::result_of<F(E1,E2)>::type is the return type of f when called with elements of - type E1 and E2 -

-
-

+

+ f +

+ f(e1,e2) + is a valid expression for each pair of elements e1 + of seq1 and e2 of seq2. + boost::result_of<F(E1,E2)>::type is the return type of f when called with elements of + type E1 and E2 +

Transformation function -

-
+
-

- Return type: A model of Forward +

+ Return type: A model of Forward Sequence.

- Semantics: Returns a new sequence, containing - the return values of f(e1, e2) for each pair of elements e1 and e2 - within seq1 and seq2 respectively. + Semantics: Returns a new sequence, containing + the return values of f(e1, e2) for each pair of elements e1 and e2 + within seq1 and seq2 respectively.

- - Complexity + + Complexity

Constant. Returns a view which is lazily evaluated.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/transform.hpp>
 #include <boost/fusion/include/transform.hpp>
 
- - Example + + Example
struct triple
 {
@@ -268,7 +234,7 @@
     };
 };
 ...
-assert(transform(make_vector(1,2,3), triple()) == make_vector(3,6,9));
+assert(transform(make_vector(1,2,3), triple()) == make_vector(3,6,9));
 
diff --git a/doc/html/fusion/algorithm/transformation/functions/zip.html b/doc/html/fusion/algorithm/transformation/functions/zip.html index 27b408b7..d150346a 100644 --- a/doc/html/fusion/algorithm/transformation/functions/zip.html +++ b/doc/html/fusion/algorithm/transformation/functions/zip.html @@ -3,10 +3,10 @@ zip - + - + @@ -22,21 +22,24 @@
PrevUpHomeNext
-
-
-zip -
+
+
+
+zip +
+
+
- - Description + + Description

Zips sequences together to form a single sequence, whos members are tuples of the members of the component sequences.

- - Synopsis + + Synopsis
template<
     typename Sequence1,
@@ -44,96 +47,86 @@
     ...
     typename SequenceN
     >
-typename result_of::zip<Sequence1, Sequence2, ... SequenceN>::type
+typename result_of::zip<Sequence1, Sequence2, ... SequenceN>::type
 zip(Sequence1 const& seq1, Sequence2 const& seq2, ... SequenceN const& seqN);
 
-

Table 1.68. Parameters

-
+

Table 1.68. Parameters

+
- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq1 to seqN -

-
-

- Each sequence is a model of Forward +

+ seq1 to seqN +

+ Each sequence is a model of Forward Sequence. -

-
-

+

Operation's argument -

-
+ -
- - Expression +
+ + Expression Semantics
-
zip(seq1, seq2, ... seqN);
+
zip(seq1, seq2, ... seqN);
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a sequence containing - tuples of elements from sequences seq1 - to seqN. For example, - applying zip to tuples (1, 2, 3) - and ('a', 'b', - 'c') - would return ((1, 'a'),(2, 'b'),(3, - 'c')) + Semantics: Returns a sequence containing + tuples of elements from sequences seq1 + to seqN. For example, + applying zip to tuples (1, 2, 3) + and ('a', 'b', + 'c') + would return ((1, 'a'),(2, 'b'),(3, + 'c'))

- - Complexity + + Complexity

Constant. Returns a view which is lazily evaluated.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/zip.hpp>
 #include <boost/fusion/include/zip.hpp>
 
- - Example + + Example
-
vector<int,char> v1(1, 'a');
-vector<int,char> v2(2, 'b');
-assert(zip(v1, v2) == make_vector(make_vector(1, 2),make_vector('a', 'b'));
+
vector<int,char> v1(1, 'a');
+vector<int,char> v2(2, 'b');
+assert(zip(v1, v2) == make_vector(make_vector(1, 2),make_vector('a', 'b'));
 
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions.html b/doc/html/fusion/algorithm/transformation/metafunctions.html index 58e32ad4..f51eb53b 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions.html @@ -3,10 +3,10 @@ Metafunctions - + - + @@ -22,10 +22,13 @@
PrevUpHomeNext
-
- +
+
+ +
+
filter
filter_if
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/clear.html b/doc/html/fusion/algorithm/transformation/metafunctions/clear.html index 04778f69..3834fce7 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/clear.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/clear.html @@ -3,10 +3,10 @@ clear - + - + @@ -22,21 +22,24 @@
PrevUpHomeNext
-
-
-clear -
+
+
+
+clear +
+
+
- - Description + + Description

- Returns the result type of clear, given the input sequence + Returns the result type of clear, given the input sequence type.

- - Synopsis + + Synopsis
template<
     typename Sequence
@@ -47,73 +50,62 @@
 };
 
-

Table 1.82. Parameters

-
+

Table 1.82. Parameters

+
- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Sequence -

-
-

+

+ Sequence +

Any type -

-
-

+

Operation's argument -

-
+ -
- - Expression +
+ + Expression Semantics
-
result_of::clear<Sequence>::type
+
result_of::clear<Sequence>::type
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns an empty sequence. + Semantics: Returns an empty sequence.

- - Complexity + + Complexity

Constant.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/clear.hpp>
 #include <boost/fusion/include/clear.hpp>
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/erase.html b/doc/html/fusion/algorithm/transformation/metafunctions/erase.html
index 6b243133..d09ea874 100644
--- a/doc/html/fusion/algorithm/transformation/metafunctions/erase.html
+++ b/doc/html/fusion/algorithm/transformation/metafunctions/erase.html
@@ -3,10 +3,10 @@
 
 erase
 
-
+
 
 
-
+
 
 
 
@@ -22,21 +22,24 @@
 
PrevUpHomeNext
-
-
-erase -
+
+
+
+erase +
+
+

- Returns the result type of erase, given the input sequence + Returns the result type of erase, given the input sequence and range delimiting iterator types.

- - Description + + Description
- - Synopsis + + Synopsis
template<
     typename Sequence,
@@ -48,124 +51,105 @@
 };
 
-

Table 1.83. Parameters

-
+

Table 1.83. Parameters

+
- - + - + +

- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Sequence -

-
-

- A model of Forward +

+ Sequence +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- It1 -

-
-

- A model of Forward +

+ It1 +

+ A model of Forward Iterator -

-
-

+

Operation's argument -

-
-

- It2 -

-
-

- A model of Forward +

+ It2 +

+ A model of Forward Iterator -

-
-

+

Operation's argument -

-
+
-
- - Expression +
+ + Expression Semantics
-
result_of::erase<Sequence, It1>::type
+
result_of::erase<Sequence, It1>::type
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a new sequence with - the element at It1 removed. + Semantics: Returns a new sequence with + the element at It1 removed.

-
result_of::erase<Sequence, It1, It2>::type
+
result_of::erase<Sequence, It1, It2>::type
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a new sequence with - the elements between It1 - and It2 removed. + Semantics: Returns a new sequence with + the elements between It1 + and It2 removed.

- - Complexity + + Complexity

Constant.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/erase.hpp>
 #include <boost/fusion/include/erase.hpp>
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/erase_key.html b/doc/html/fusion/algorithm/transformation/metafunctions/erase_key.html
index 6d7b1a9c..8be1990a 100644
--- a/doc/html/fusion/algorithm/transformation/metafunctions/erase_key.html
+++ b/doc/html/fusion/algorithm/transformation/metafunctions/erase_key.html
@@ -3,10 +3,10 @@
 
 erase_key
 
-
+
 
 
-
+
 
 
 
@@ -22,21 +22,24 @@
 
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- Returns the result type of erase_key, given the sequence + Returns the result type of erase_key, given the sequence and key types.

- - Synopsis + + Synopsis
template<
     typename Sequence,
@@ -48,95 +51,79 @@
 };
 
-

Table 1.84. Parameters

-
+

Table 1.84. Parameters

+
- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Sequence -

-
-

- A model of Associative +

+ Sequence +

+ A model of Associative Sequence -

-
-

+

Operation's argument -

-
-

- Key -

-
-

+

+ Key +

Any type -

-
-

+

Key type -

-
+
-
- - Expression +
+ + Expression Semantics
-
result_of::erase_key<Sequence, Key>::type
+
result_of::erase_key<Sequence, Key>::type
 

- Return type: A model of Associative + Return type: A model of Associative Sequence.

- Semantics: Returns a sequence with the - elements of Sequence, - except those with key Key. + Semantics: Returns a sequence with the + elements of Sequence, + except those with key Key.

- - Complexity + + Complexity

Constant.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/erase_key.hpp>
 #include <boost/fusion/include/erase_key.hpp>
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/filter.html b/doc/html/fusion/algorithm/transformation/metafunctions/filter.html
index a93af175..a752f5c2 100644
--- a/doc/html/fusion/algorithm/transformation/metafunctions/filter.html
+++ b/doc/html/fusion/algorithm/transformation/metafunctions/filter.html
@@ -3,10 +3,10 @@
 
 filter
 
-
+
 
 
-
+
 
 
 
@@ -22,21 +22,24 @@
 
PrevUpHomeNext
-
-
-filter -
+
+
+
+filter +
+
+
- - Description + + Description

- Returns the result type of filter given the sequence type + Returns the result type of filter given the sequence type and type to retain.

- - Synopsis + + Synopsis
template<
     typename Sequence,
@@ -48,97 +51,81 @@
 };
 
-

Table 1.73. Parameter

-
+

Table 1.73. Parameter

+
- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Sequence -

-
-

- A model of Forward +

+ Sequence +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- T -

-
-

+

+ T +

Any type -

-
-

+

Type to retain -

-
+
-
- - Expression +
+ + Expression Semantics
-
result_of::filter<Sequence, T>::type
+
result_of::filter<Sequence, T>::type
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a sequence containing - the elements of Sequence - that are of type T. Equivalent - to result_of::filter_if<Sequence, - boost::is_same<mpl::_, T> >::type. + Semantics: Returns a sequence containing + the elements of Sequence + that are of type T. Equivalent + to result_of::filter_if<Sequence, + boost::is_same<mpl::_, T> >::type.

- - Complexity + + Complexity

Constant.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/filter.hpp>
 #include <boost/fusion/include/filter.hpp>
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/filter_if.html b/doc/html/fusion/algorithm/transformation/metafunctions/filter_if.html
index dc9c45f0..14e36e11 100644
--- a/doc/html/fusion/algorithm/transformation/metafunctions/filter_if.html
+++ b/doc/html/fusion/algorithm/transformation/metafunctions/filter_if.html
@@ -3,10 +3,10 @@
 
 filter_if
 
-
+
 
 
-
+
 
 
 
@@ -22,22 +22,25 @@
 
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- Returns the result type of filter_if given the sequence + Returns the result type of filter_if given the sequence and unary MPL Lambda Expression predicate type.

- - Synopsis + + Synopsis
template<
     typename Sequence,
@@ -49,97 +52,81 @@
 };
 
-

Table 1.74. Parameter

-
+

Table 1.74. Parameter

+
- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Sequence -

-
-

- A model of Forward +

+ Sequence +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- Pred -

-
-

+

+ Pred +

A unary MPL Lambda Expression -

-
-

+

Type to retain -

-
+
-
- - Expression +
+ + Expression Semantics
-
result_of::filter_if<Sequence, Pred>::type
+
result_of::filter_if<Sequence, Pred>::type
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a sequence containing - the elements of Sequence - for which Pred evaluates - to boost::mpl::true_. + Semantics: Returns a sequence containing + the elements of Sequence + for which Pred evaluates + to boost::mpl::true_.

- - Complexity + + Complexity

Constant.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/filter_if.hpp>
 #include <boost/fusion/include/filter_if.hpp>
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/insert.html b/doc/html/fusion/algorithm/transformation/metafunctions/insert.html
index 983fd85d..1eeffc70 100644
--- a/doc/html/fusion/algorithm/transformation/metafunctions/insert.html
+++ b/doc/html/fusion/algorithm/transformation/metafunctions/insert.html
@@ -3,10 +3,10 @@
 
 insert
 
-
+
 
 
-
+
 
 
 
@@ -22,21 +22,24 @@
 
PrevUpHomeNext
-
-
-insert -
+
+
+
+insert +
+
+
- - Description + + Description

- Returns the result type of insert, given the sequence, + Returns the result type of insert, given the sequence, position iterator and insertion types.

- - Synopsis + + Synopsis
template<
     typename Sequence,
@@ -49,114 +52,93 @@
 };
 
-

Table 1.85. Parameters

-
+

Table 1.85. Parameters

+
- - + - + +

- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Sequence -

-
-

- A model of Forward +

+ Sequence +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- Position -

-
-

- A model of Forward +

+ Position +

+ A model of Forward Iterator -

-
-

+

Operation's argument -

-
-

- T -

-
-

+

+ T +

Any type -

-
-

+

Operation's argument -

-
+
-
- - Expression +
+ + Expression Semantics
-
result_of::insert<Sequence, Position, T>::type
+
result_of::insert<Sequence, Position, T>::type
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a sequence with an - element of type T inserted - at position Position - in Sequence. + Semantics: Returns a sequence with an + element of type T inserted + at position Position + in Sequence.

- - Complexity + + Complexity

Constant.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/insert.hpp>
 #include <boost/fusion/include/insert.hpp>
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/insert_range.html b/doc/html/fusion/algorithm/transformation/metafunctions/insert_range.html
index 10ec861a..097c63eb 100644
--- a/doc/html/fusion/algorithm/transformation/metafunctions/insert_range.html
+++ b/doc/html/fusion/algorithm/transformation/metafunctions/insert_range.html
@@ -3,10 +3,10 @@
 
 insert_range
 
-
+
 
 
-
+
 
 
 
@@ -22,21 +22,24 @@
 
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- Returns the result type of insert_range, given the input + Returns the result type of insert_range, given the input sequence, position iterator and insertion range types.

- - Synopsis + + Synopsis
template<
     typename Sequence,
@@ -49,115 +52,95 @@
 };
 
-

Table 1.86. Parameters

-
+

Table 1.86. Parameters

+
- - + - + +

- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Sequence -

-
-

- A model of Forward +

+ Sequence +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- Position -

-
-

- A model of Forward +

+ Position +

+ A model of Forward Iterator -

-
-

+

Operation's argument -

-
-

- Range -

-
-

- A model of Forward +

+ Range +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
+
-
- - Expression +
+ + Expression Semantics
-
result_of::insert_range<Sequence, Position, Range>::type
+
result_of::insert_range<Sequence, Position, Range>::type
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a sequence with the - elements of Range inserted - at position Position - into Sequence. + Semantics: Returns a sequence with the + elements of Range inserted + at position Position + into Sequence.

- - Complexity + + Complexity

Constant.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/insert_range.hpp>
 #include <boost/fusion/include/insert_range.hpp>
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/join.html b/doc/html/fusion/algorithm/transformation/metafunctions/join.html
index 696245f9..39d35ca8 100644
--- a/doc/html/fusion/algorithm/transformation/metafunctions/join.html
+++ b/doc/html/fusion/algorithm/transformation/metafunctions/join.html
@@ -3,10 +3,10 @@
 
 join
 
-
+
 
 
-
+
 
 
 
@@ -22,20 +22,23 @@
 
PrevUpHomeNext
-
-
-join -
+
+
+
+join +
+
+
- - Description + + Description

Returns the result of joining 2 sequences, given the sequence types.

- - Synopsis + + Synopsis
template<
     typename LhSequence,
@@ -47,32 +50,33 @@
 };
 
- - Expression + + Expression Semantics
-
result_of::join<LhSequence, RhSequence>::type
+
result_of::join<LhSequence, RhSequence>::type
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a sequence containing - the elements of LhSequence - followed by the elements of RhSequence. + Semantics: Returns a sequence containing + the elements of LhSequence + followed by the elements of RhSequence. The order of the elements in the 2 sequences is preserved.

- - Complexity + + Complexity

Constant.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/join.hpp>
 #include <boost/fusion/include/join.hpp>
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/pop_back.html b/doc/html/fusion/algorithm/transformation/metafunctions/pop_back.html
index 5859e925..6ad86087 100644
--- a/doc/html/fusion/algorithm/transformation/metafunctions/pop_back.html
+++ b/doc/html/fusion/algorithm/transformation/metafunctions/pop_back.html
@@ -3,10 +3,10 @@
 
 pop_back
 
-
+
 
 
-
+
 
 
 
@@ -22,21 +22,24 @@
 
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- Returns the result type of pop_back, given the input sequence + Returns the result type of pop_back, given the input sequence type.

- - Synopsis + + Synopsis
template<
     typename Sequence
@@ -47,76 +50,66 @@
 };
 
-

Table 1.87. Parameters

-
+

Table 1.87. Parameters

+
- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Sequence -

-
-

- A model of Forward +

+ Sequence +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
+
-
- - Expression +
+ + Expression Semantics
-
result_of::pop_back<Sequence>::type
+
result_of::pop_back<Sequence>::type
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a sequence with all - the elements of Sequence + Semantics: Returns a sequence with all + the elements of Sequence except the last element.

- - Complexity + + Complexity

Constant.

- - Header + + Header
#include <boost/fusion/algorithm/tranformation/pop_back.hpp>
 #include <boost/fusion/include/pop_back.hpp>
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/pop_front.html b/doc/html/fusion/algorithm/transformation/metafunctions/pop_front.html
index c0577a61..54d17335 100644
--- a/doc/html/fusion/algorithm/transformation/metafunctions/pop_front.html
+++ b/doc/html/fusion/algorithm/transformation/metafunctions/pop_front.html
@@ -3,10 +3,10 @@
 
 pop_front
 
-
+
 
 
-
+
 
 
 
@@ -22,21 +22,24 @@
 
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- Returns the result type of pop_front, given the input sequence + Returns the result type of pop_front, given the input sequence type.

- - Synopsis + + Synopsis
template<
     typename Sequence
@@ -47,69 +50,59 @@
 };
 
-

Table 1.88. Parameters

-
+

Table 1.88. Parameters

+
- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Sequence -

-
-

- A model of Forward +

+ Sequence +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
+
-
- - Expression +
+ + Expression Semantics
-
result_of::pop_front<Sequence>::type
+
result_of::pop_front<Sequence>::type
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a sequence with all - the elements of Sequence + Semantics: Returns a sequence with all + the elements of Sequence except the first element.

- - Complexity + + Complexity

Constant. diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/push_back.html b/doc/html/fusion/algorithm/transformation/metafunctions/push_back.html index 1ae0b42e..e6038f04 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/push_back.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/push_back.html @@ -3,10 +3,10 @@ push_back - + - + @@ -22,21 +22,24 @@

PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- Returns the result type of push_back, given the types of + Returns the result type of push_back, given the types of the input sequence and element to push.

- - Synopsis + + Synopsis
template<
     typename Sequence,
@@ -48,89 +51,73 @@
 };
 
-

Table 1.89. Parameters

-
+

Table 1.89. Parameters

+
- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Sequence -

-
-

- A model of Forward +

+ Sequence +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- T -

-
-

+

+ T +

Any type -

-
-

+

Operation's argument -

-
+
-
- - Expression +
+ + Expression Semantics
-
result_of::push_back<Sequence, T>::type
+
result_of::push_back<Sequence, T>::type
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a sequence with the - elements of Sequence - and an element of type T + Semantics: Returns a sequence with the + elements of Sequence + and an element of type T added to the end.

- - Complexity + + Complexity

Constant. diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/push_front.html b/doc/html/fusion/algorithm/transformation/metafunctions/push_front.html index 5a04893f..bfa4c9a4 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/push_front.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/push_front.html @@ -3,10 +3,10 @@ push_front - + - + @@ -22,21 +22,24 @@

PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- Returns the result type of push_front, given the types + Returns the result type of push_front, given the types of the input sequence and element to push.

- - Synopsis + + Synopsis
template<
     typename Sequence,
@@ -48,89 +51,73 @@
 };
 
-

Table 1.90. Parameters

-
+

Table 1.90. Parameters

+
- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Sequence -

-
-

- A model of Forward +

+ Sequence +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- T -

-
-

+

+ T +

Any type -

-
-

+

Operation's argument -

-
+
-
- - Expression +
+ + Expression Semantics
-
result_of::push_front<Sequence, T>::type
+
result_of::push_front<Sequence, T>::type
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a sequence with the - elements of Sequence - and an element of type T + Semantics: Returns a sequence with the + elements of Sequence + and an element of type T added to the beginning.

- - Complexity + + Complexity

Constant. diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/remove.html b/doc/html/fusion/algorithm/transformation/metafunctions/remove.html index a4be10fb..ed429d68 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/remove.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/remove.html @@ -3,10 +3,10 @@ remove - + - + @@ -22,21 +22,24 @@

PrevUpHomeNext
-
-
-remove -
+
+
+
+remove +
+
+
- - Description + + Description

- Returns the result type of remove, given the sequence and + Returns the result type of remove, given the sequence and removal types.

- - Synopsis + + Synopsis
template<
     typename Sequence,
@@ -48,97 +51,81 @@
 };
 
-

Table 1.79. Parameters

-
+

Table 1.79. Parameters

+
- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Sequence -

-
-

- A model of Forward +

+ Sequence +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- T -

-
-

+

+ T +

Any type -

-
-

+

Remove elements of this type -

-
+
-
- - Expression +
+ + Expression Semantics
-
result_of::remove<Sequence, T>::type
+
result_of::remove<Sequence, T>::type
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a sequence containing - the elements of Sequence - not of type T. Equivalent - to result_of::replace_if<Sequence, - boost::is_same<mpl::_, T> >::type. + Semantics: Returns a sequence containing + the elements of Sequence + not of type T. Equivalent + to result_of::replace_if<Sequence, + boost::is_same<mpl::_, T> >::type.

- - Complexity + + Complexity

Constant.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/remove.hpp>
 #include <boost/fusion/include/remove.hpp>
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/remove_if.html b/doc/html/fusion/algorithm/transformation/metafunctions/remove_if.html
index b2118f07..81161922 100644
--- a/doc/html/fusion/algorithm/transformation/metafunctions/remove_if.html
+++ b/doc/html/fusion/algorithm/transformation/metafunctions/remove_if.html
@@ -3,10 +3,10 @@
 
 remove_if
 
-
+
 
 
-
+
 
 
 
@@ -22,22 +22,25 @@
 
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- Returns the result type of remove_if, given the input sequence + Returns the result type of remove_if, given the input sequence and unary MPL Lambda Expression predicate types.

- - Synopsis + + Synopsis
template<
     typename Sequence,
@@ -49,97 +52,81 @@
 };
 
-

Table 1.80. Parameters

-
+

Table 1.80. Parameters

+
- - + - + +

- - + - + +

- - + - +

+ -
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Sequence -

-
-

- A model of Forward +

+ Sequence +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- Pred -

-
-

+

+ Pred +

A model of unary MPL Lambda Expression -

-
-

- Remove elements which evaluate to boost::mpl::true_ -

-

+ Remove elements which evaluate to boost::mpl::true_ +

+
-
- - Expression +
+ + Expression Semantics
-
result_of::remove_if<Sequence, Pred>::type
+
result_of::remove_if<Sequence, Pred>::type
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns a sequence containing - the elements of Sequence - for which Pred evaluates - to boost::mpl::false_. + Semantics: Returns a sequence containing + the elements of Sequence + for which Pred evaluates + to boost::mpl::false_.

- - Complexity + + Complexity

Constant.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/remove_if.hpp>
 #include <boost/fusion/include/remove_if.hpp>
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/replace.html b/doc/html/fusion/algorithm/transformation/metafunctions/replace.html
index 47c94e70..8318882a 100644
--- a/doc/html/fusion/algorithm/transformation/metafunctions/replace.html
+++ b/doc/html/fusion/algorithm/transformation/metafunctions/replace.html
@@ -3,10 +3,10 @@
 
 replace
 
-
+
 
 
-
+
 
 
 
@@ -22,21 +22,24 @@
 
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- Returns the result type of replace, given the types of + Returns the result type of replace, given the types of the input sequence and element to replace.

- - Synopsis + + Synopsis
template<
     typename Sequence,
@@ -48,94 +51,78 @@
 };
 
-

Table 1.77. Parameters

-
+

Table 1.77. Parameters

+
- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Sequence -

-
-

- A model of Forward +

+ Sequence +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- T -

-
-

+

+ T +

Any type -

-
-

+

The type of the search and replacement objects -

-
+
-
- - Expression +
+ + Expression Semantics
-
result_of::replace<Sequence,T>::type
+
result_of::replace<Sequence,T>::type
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns the return type of - replace. + Semantics: Returns the return type of + replace.

- - Complexity + + Complexity

Constant.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/replace.hpp>
 #include <boost/fusion/include/replace.hpp>
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/replace_if.html b/doc/html/fusion/algorithm/transformation/metafunctions/replace_if.html
index 4bc21140..082689a8 100644
--- a/doc/html/fusion/algorithm/transformation/metafunctions/replace_if.html
+++ b/doc/html/fusion/algorithm/transformation/metafunctions/replace_if.html
@@ -3,10 +3,10 @@
 
 replace_if
 
-
+
 
 
-
+
 
 
 
@@ -22,22 +22,26 @@
 
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- Returns the result type of replace_if, given the types - of the sequence, Polymorphic + Returns the result type of replace_if, given the types + of the sequence, Polymorphic Function Object predicate and replacement object.

- - Synopsis + + Synopsis
template<
     typename Sequence,
@@ -49,112 +53,91 @@
 };
 
-

Table 1.78. Parameters

-
+

Table 1.78. Parameters

+
- - + - + +

- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Sequence -

-
-

- A model of Forward +

+ Sequence +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- F -

-
-

- A model of unary Polymorphic +

+ F +

+ A model of unary Polymorphic Function Object -

-
-

+

Replacement predicate -

-
-

- T -

-
-

+

+ T +

Any type -

-
-

+

The type of the replacement object -

-
+
-
- - Expression +
+ + Expression Semantics
-
result_of::replace_if<Sequence,F,T>::type
+
result_of::replace_if<Sequence,F,T>::type
 

- Return type: A model of Forward + Return type: A model of Forward Sequence.

- Semantics: Returns the return type of - replace_if. + Semantics: Returns the return type of + replace_if.

- - Complexity + + Complexity

Constant.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/replace_if.hpp>
 #include <boost/fusion/include/replace_if.hpp>
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/reverse.html b/doc/html/fusion/algorithm/transformation/metafunctions/reverse.html
index cb0f6d3b..dd237ca1 100644
--- a/doc/html/fusion/algorithm/transformation/metafunctions/reverse.html
+++ b/doc/html/fusion/algorithm/transformation/metafunctions/reverse.html
@@ -3,10 +3,10 @@
 
 reverse
 
-
+
 
 
-
+
 
 
 
@@ -22,21 +22,24 @@
 
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- Returns the result type of reverse, given the input sequence + Returns the result type of reverse, given the input sequence type.

- - Synopsis + + Synopsis
template<
     typename Sequence
@@ -47,75 +50,65 @@
 };
 
-

Table 1.81. Parameters

-
+

Table 1.81. Parameters

+
- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Sequence -

-
-

- A model of Bidirectional +

+ Sequence +

+ A model of Bidirectional Sequence -

-
-

+

Operation's argument -

-
+
-
- - Expression +
+ + Expression Semantics
-
result_of::reverse<Sequence>::type
+
result_of::reverse<Sequence>::type
 

- Return type: A model of Bidirectional + Return type: A model of Bidirectional Sequence.

- Semantics: Returns a sequence with the - elements in the reverse order to Sequence. + Semantics: Returns a sequence with the + elements in the reverse order to Sequence.

- - Complexity + + Complexity

Constant.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/reverse.hpp>
 #include <boost/fusion/include/reverse.hpp>
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/transform.html b/doc/html/fusion/algorithm/transformation/metafunctions/transform.html
index 260ef5c1..5dd6e4ce 100644
--- a/doc/html/fusion/algorithm/transformation/metafunctions/transform.html
+++ b/doc/html/fusion/algorithm/transformation/metafunctions/transform.html
@@ -3,10 +3,10 @@
 
 transform
 
-
+
 
 
-
+
 
 
 
@@ -22,119 +22,106 @@
 
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- For a sequence seq and - function object or function pointer f, - transform returns a new - sequence with elements created by applying f(e) to each element of e - of seq. + For a sequence seq and + function object or function pointer f, + transform returns a new + sequence with elements created by applying f(e) to each element of e + of seq.

- - Unary + + Unary version synopsis
template<
     typename Sequence,
     typename F
     >
-typename result_of::transform<Sequence const, F>::type transform(
+typename result_of::transform<Sequence const, F>::type transform(
     Sequence const& seq, F f);
 
-

Table 1.75. Parameters

-
+

Table 1.75. Parameters

+
- - + - + +

- - + - + +

- - - + + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

- A model of Forward +

+ seq +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- f -

-
-

- f(e) - is a valid expression for each element e - of seq. boost::result_of<F(E)>::type is the return type of f when called with a value of - each element type E. -

-
-

+

+ f +

+ f(e) + is a valid expression for each element e + of seq. boost::result_of<F(E)>::type is the return type of f when called with a value of + each element type E. +

Transformation function -

-
+
-
- - Expression +
+ + Expression Semantics
-
transform(seq, f);
+
transform(seq, f);
 

- Return type: A model of Forward + Return type: A model of Forward Sequence

- Semantics: Returns a new sequence, containing - the return values of f(e) for each element e - within seq. + Semantics: Returns a new sequence, containing + the return values of f(e) for each element e + within seq.

- - Binary + + Binary version synopsis
template<
@@ -142,121 +129,100 @@
     typename Sequence2,
     typename F
     >
-typename result_of::transform<Sequence1 const, Sequence2 const, F>::type transform(
+typename result_of::transform<Sequence1 const, Sequence2 const, F>::type transform(
     Sequence1 const& seq1, Sequence2 const& seq2, F f);
 
-

Table 1.76. Parameters

-
+

Table 1.76. Parameters

+
- - + - + +

- - + - + +

- - + - + +

- - - + + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq1 -

-
-

- A model of Forward +

+ seq1 +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- seq2 -

-
-

- A model of Forward +

+ seq2 +

+ A model of Forward Sequence -

-
-

+

Operation's argument -

-
-

- f -

-
-

- f(e1,e2) - is a valid expression for each pair of elements e1 - of seq1 and e2 of seq2. - boost::result_of<F(E1,E2)>::type is the return type of f when called with elements of - type E1 and E2 -

-
-

+

+ f +

+ f(e1,e2) + is a valid expression for each pair of elements e1 + of seq1 and e2 of seq2. + boost::result_of<F(E1,E2)>::type is the return type of f when called with elements of + type E1 and E2 +

Transformation function -

-
+
-

- Return type: A model of Forward +

+ Return type: A model of Forward Sequence.

- Semantics: Returns a new sequence, containing - the return values of f(e1, e2) for each pair of elements e1 and e2 - within seq1 and seq2 respectively. + Semantics: Returns a new sequence, containing + the return values of f(e1, e2) for each pair of elements e1 and e2 + within seq1 and seq2 respectively.

- - Complexity + + Complexity

Constant. Returns a view which is lazily evaluated.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/transform.hpp>
 #include <boost/fusion/include/transform.hpp>
 
- - Example + + Example
struct triple
 {
@@ -268,7 +234,7 @@
     };
 };
 ...
-assert(transform(make_vector(1,2,3), triple()) == make_vector(3,6,9));
+assert(transform(make_vector(1,2,3), triple()) == make_vector(3,6,9));
 
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/zip.html b/doc/html/fusion/algorithm/transformation/metafunctions/zip.html index cf8cbe7f..8ecd5532 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/zip.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/zip.html @@ -3,10 +3,10 @@ zip - + - + @@ -22,21 +22,24 @@
PrevUpHomeNext
-
-
-zip -
+
+
+
+zip +
+
+
- - Description + + Description

Zips sequences together to form a single sequence, whos members are tuples of the members of the component sequences.

- - Synopsis + + Synopsis
template<
     typename Sequence1,
@@ -50,37 +53,37 @@
 };
 
- - Expression + + Expression Semantics
-
result_of::zip<Sequence1, Sequence2, ... SequenceN>::type
+
result_of::zip<Sequence1, Sequence2, ... SequenceN>::type
 

- Return type: A model of the most restrictive - traversal category of sequences Sequence1 - to SequenceN. + Return type: A model of the most restrictive + traversal category of sequences Sequence1 + to SequenceN.

- Semantics: Return a sequence containing + Semantics: Return a sequence containing tuples of elements from each sequence. For example, applying zip to tuples - (1, 2, - 3) - and ('a', 'b', - 'c') - would return ((1, 'a'),(2, 'b'),(3, - 'c')) + (1, 2, + 3) + and ('a', 'b', + 'c') + would return ((1, 'a'),(2, 'b'),(3, + 'c'))

- - Complexity + + Complexity

Constant.

- - Header + + Header
#include <boost/fusion/algorithm/transformation/zip.hpp>
 #include <boost/fusion/include/zip.hpp>
diff --git a/doc/html/fusion/change_log.html b/doc/html/fusion/change_log.html
index d3bd0560..38a42e09 100644
--- a/doc/html/fusion/change_log.html
+++ b/doc/html/fusion/change_log.html
@@ -3,10 +3,10 @@
 
 Change log
 
-
+
 
 
-
+
 
 
 
@@ -22,38 +22,41 @@
 
PrevUpHomeNext
-
- +
+
+ +
+

This section summarizes significant changes to the Fusion library.

-
    -
  • - Sep 27, 2006: Added boost::tuple +
      +
    • + Sep 27, 2006: Added boost::tuple support. (Joel de Guzman)
    • -
    • - Nov 17, 2006: Added boost::variant +
    • + Nov 17, 2006: Added boost::variant support. (Joel de Guzman)
    • -
    • +
    • Feb 15, 2007: Added functional module. (Tobias Schwinger)
    • -
    • +
    • APRIL 2, 2007: Added struct adapter. (Joel de Guzman)
    • -
    • +
    • May 8, 2007: Added associative struct adapter. (Dan Marsden)
    • -
    • - Dec 20, 2007: Removed boost::variant +
    • + Dec 20, 2007: Removed boost::variant support. After thorough investigation, I think now that the move to make variant a fusion sequence is rather quirky. A variant will always have a size==1 regardless of the number of types it can contain and there's no way to know at compile time what it contains. Iterating over its types is simply - wrong. All these imply that the variant is not + wrong. All these imply that the variant is not a fusion sequence. (Joel de Guzman)
    diff --git a/doc/html/fusion/container.html b/doc/html/fusion/container.html index 5d1dcfe0..d8c2ac88 100644 --- a/doc/html/fusion/container.html +++ b/doc/html/fusion/container.html @@ -3,10 +3,11 @@ Container - + - + @@ -22,10 +23,13 @@
    PrevUpHomeNext
    -
    - +
    +
    + +
    +
    vector
    cons
    @@ -45,13 +49,13 @@

    Fusion provides a few predefined sequences out of the box. These containers - actually hold heterogenously typed data; unlike Views. + actually hold heterogenously typed data; unlike Views. These containers are more or less counterparts of those in STL.

    -

    - - Header -

    +

    + + Header +

    #include <boost/fusion/container.hpp>
     #include <boost/fusion/include/container.hpp>
     
    diff --git a/doc/html/fusion/container/cons.html b/doc/html/fusion/container/cons.html index 06583d06..1aa4dca7 100644 --- a/doc/html/fusion/container/cons.html +++ b/doc/html/fusion/container/cons.html @@ -3,10 +3,10 @@ cons - + - + @@ -22,43 +22,47 @@
    PrevUpHomeNext
    -
    -

    -cons -

    -
    - - Description -
    +
    +
    +

    +cons +

    +
    +
    +

    + + Description +

    - cons is a simple Forward - Sequence. It is a lisp style recursive list structure where car is the head and - cdr is the tail: - usually another cons structure or nil: - the empty list. Fusion's list is built on top of this more - primitive data structure. It is more efficient than vector when the target sequence + cons is a simple Forward + Sequence. It is a lisp style recursive list structure where car is the head and + cdr is the tail: + usually another cons structure or nil: + the empty list. Fusion's list is built on top of this more + primitive data structure. It is more efficient than vector when the target sequence is constructed piecemeal (a data at a time). The runtime cost of access to - each element is peculiarly constant (see Recursive + each element is peculiarly constant (see Recursive Inlined Functions).

    -
    - - Header -
    +

    + + Header +

    #include <boost/fusion/container/list/cons.hpp>
     #include <boost/fusion/include/cons.hpp>
     
    -
    - - Synopsis -
    +

    + + Synopsis +

    template <typename Car, typename Cdr = nil>
     struct cons;
     
    -
    - - Template parameters -
    +

    + + Template parameters +

@@ -66,105 +70,90 @@ - - + - + +

- - + - +

+ - - + - +

+
-

+

Parameter -

-
-

+

Description -

-
-

+

Default -

-
-

- Car -

-
-

+

+ Car +

Head type -

-
-

-

-

+

-

- Cdr -

-
-

+

+ Cdr +

Tail type -

-
-

- nil -

-

+ nil +

-
- - Model of -
- -
+

+ + Model of +

+ +

Notation

-
nil
+
nil

- An empty cons + An empty cons

-
C
+
C

- A cons type + A cons type

-
l, - l2
+
l, + l2

- Instances of cons + Instances of cons

-
car
+
car

An arbitrary data

-
cdr
+
cdr

- Another cons list + Another cons list

-
s
+
s

- A Forward Sequence + A Forward Sequence

-
N
+
N

An MPL Integral Constant

-
- - Expression Semantics -
+

+ + Expression Semantics +

Semantics of an expression is defined only where it differs from, or is not - defined in Forward + defined in Forward Sequence.

@@ -173,131 +162,100 @@ - - + +

- - + +

- - + +

- - + +

- - + + - - + + - - + + - - + +
-

+

Expression -

-
-

+

Semantics -

-
-

- nil() -

-
-

+

+ nil() +

Creates an empty list. -

-
-

- C() -

-
-

+

+ C() +

Creates a cons with default constructed elements. -

-
-

- C(car) -

-
-

- Creates a cons with car +

+ C(car) +

+ Creates a cons with car head and default constructed tail. -

-
-

- C(car, - cdr) -

-
-

- Creates a cons with car - head and cdr tail. -

-

+ C(car, + cdr) +

+ Creates a cons with car + head and cdr tail. +

-

- C(s) -

-
-

- Copy constructs a cons from a Forward - Sequence, s. -

-

+ C(s) +

+ Copy constructs a cons from a Forward + Sequence, s. +

-

- l = - s -

-
-

- Assigns to a cons, l, - from a Forward - Sequence, s. -

-

+ l = + s +

+ Assigns to a cons, l, + from a Forward + Sequence, s. +

-

- at<N>(l) -

-
-

- The Nth element from the beginning of the sequence; see at. -

-

+ at<N>(l) +

+ The Nth element from the beginning of the sequence; see at. +

- +

+ + Example +

cons<int, cons<float> > l(12, cons<float>(5.5f));
-std::cout << at_c<0>(l) << std::endl;
-std::cout << at_c<1>(l) << std::endl;
+std::cout << at_c<0>(l) << std::endl;
+std::cout << at_c<1>(l) << std::endl;
 
diff --git a/doc/html/fusion/container/conversion.html b/doc/html/fusion/container/conversion.html index c07e740c..7222d05a 100644 --- a/doc/html/fusion/container/conversion.html +++ b/doc/html/fusion/container/conversion.html @@ -3,10 +3,10 @@ Conversion - + - + @@ -22,22 +22,25 @@
PrevUpHomeNext
-
- +
+
+ +
+

- All fusion sequences can be converted to one of the Container + All fusion sequences can be converted to one of the Container types using one of these conversion functions.

-
- - Header -
+

+ + Header +

#include <boost/fusion/include/convert.hpp>
 
diff --git a/doc/html/fusion/container/conversion/functions.html b/doc/html/fusion/container/conversion/functions.html index 740140ba..b1a32164 100644 --- a/doc/html/fusion/container/conversion/functions.html +++ b/doc/html/fusion/container/conversion/functions.html @@ -3,10 +3,10 @@ Functions - + - + @@ -22,10 +22,13 @@
PrevUpHomeNext
-
- +
+
+ +
+
as_list
as_vector
diff --git a/doc/html/fusion/container/conversion/functions/as_list.html b/doc/html/fusion/container/conversion/functions/as_list.html index eaaa3622..3fdc906c 100644 --- a/doc/html/fusion/container/conversion/functions/as_list.html +++ b/doc/html/fusion/container/conversion/functions/as_list.html @@ -3,10 +3,10 @@ as_list - + - + @@ -22,20 +22,23 @@
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- Convert a fusion sequence to a list. + Convert a fusion sequence to a list.

- - Synopsis + + Synopsis
template <typename Sequence>
 typename result_of::as_list<Sequence>::type
@@ -46,8 +49,8 @@
 as_list(Sequence const& seq);
 
- - Parameters + + Parameters
@@ -56,66 +59,54 @@ - - + - + +

- - + - + +

-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

+

+ seq +

An instance of Sequence -

-
-

+

The sequence to convert. -

-
- - Expression + + Expression Semantics
as_list(seq);
 

- Return type: result_of::as_list<Sequence>::type + Return type: result_of::as_list<Sequence>::type

- Semantics: Convert a fusion sequence, - seq, to a list. + Semantics: Convert a fusion sequence, + seq, to a list.

- - Header + + Header
#include <boost/fusion/container/list/convert.hpp>
 #include <boost/fusion/include/as_list.hpp>
 
- - Example + + Example
-
as_list(make_vector('x', 123, "hello"))
+
as_list(make_vector('x', 123, "hello"))
 
diff --git a/doc/html/fusion/container/conversion/functions/as_map.html b/doc/html/fusion/container/conversion/functions/as_map.html index 8e5b0805..15fedca3 100644 --- a/doc/html/fusion/container/conversion/functions/as_map.html +++ b/doc/html/fusion/container/conversion/functions/as_map.html @@ -3,10 +3,10 @@ as_map - + - + @@ -22,20 +22,23 @@
PrevUpHomeNext
-
-
-as_map -
+
+
+
+as_map +
+
+
- - Description + + Description

- Convert a fusion sequence to a map. + Convert a fusion sequence to a map.

- - Synopsis + + Synopsis
template <typename Sequence>
 typename result_of::as_map<Sequence>::type
@@ -46,8 +49,8 @@
 as_map(Sequence const& seq);
 
- - Parameters + + Parameters
@@ -56,73 +59,61 @@ - - + - + +

- - + - + +

-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

+

+ seq +

An instance of Sequence -

-
-

+

The sequence to convert. -

-
- - Expression + + Expression Semantics
as_map(seq);
 

- Return type: result_of::as_map<Sequence>::type + Return type: result_of::as_map<Sequence>::type

- Semantics: Convert a fusion sequence, - seq, to a map. + Semantics: Convert a fusion sequence, + seq, to a map.

- Precondition: The elements of the sequence + Precondition: The elements of the sequence are assumed to be __fusionpair_s. - There may be no duplicate fusion::pair key types. + There may be no duplicate fusion::pair key types.

- - Header + + Header
#include <boost/fusion/container/map/convert.hpp>
 #include <boost/fusion/include/as_map.hpp>
 
- - Example + + Example
-
as_map(make_vector(
-    make_pair<int>('X')
-  , make_pair<double>("Men")))
+
as_map(make_vector(
+    make_pair<int>('X')
+  , make_pair<double>("Men")))
 
diff --git a/doc/html/fusion/container/conversion/functions/as_set.html b/doc/html/fusion/container/conversion/functions/as_set.html index fcfd963b..f4d7a457 100644 --- a/doc/html/fusion/container/conversion/functions/as_set.html +++ b/doc/html/fusion/container/conversion/functions/as_set.html @@ -3,10 +3,10 @@ as_set - + - + @@ -22,20 +22,23 @@
PrevUpHomeNext
-
-
-as_set -
+
+
+
+as_set +
+
+
- - Description + + Description

- Convert a fusion sequence to a set. + Convert a fusion sequence to a set.

- - Synopsis + + Synopsis
template <typename Sequence>
 typename result_of::as_set<Sequence>::type
@@ -46,8 +49,8 @@
 as_set(Sequence const& seq);
 
- - Parameters + + Parameters
@@ -56,70 +59,58 @@ - - + - + +

- - + - + +

-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

+

+ seq +

An instance of Sequence -

-
-

+

The sequence to convert. -

-
- - Expression + + Expression Semantics
as_set(seq);
 

- Return type: result_of::as_set<Sequence>::type + Return type: result_of::as_set<Sequence>::type

- Semantics: Convert a fusion sequence, - seq, to a set. + Semantics: Convert a fusion sequence, + seq, to a set.

- Precondition: There may be no duplicate + Precondition: There may be no duplicate key types.

- - Header + + Header
#include <boost/fusion/container/set/convert.hpp>
 #include <boost/fusion/include/as_set.hpp>
 
- - Example + + Example
-
as_set(make_vector('x', 123, "hello"))
+
as_set(make_vector('x', 123, "hello"))
 
diff --git a/doc/html/fusion/container/conversion/functions/as_vector.html b/doc/html/fusion/container/conversion/functions/as_vector.html index b59d43a1..a19aacdd 100644 --- a/doc/html/fusion/container/conversion/functions/as_vector.html +++ b/doc/html/fusion/container/conversion/functions/as_vector.html @@ -3,10 +3,10 @@ as_vector - + - + @@ -22,20 +22,23 @@
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- Convert a fusion sequence to a vector. + Convert a fusion sequence to a vector.

- - Synopsis + + Synopsis
template <typename Sequence>
 typename result_of::as_vector<Sequence>::type
@@ -46,8 +49,8 @@
 as_vector(Sequence const& seq);
 
- - Parameters + + Parameters
@@ -56,66 +59,54 @@ - - + - + +

- - + - + +

-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- seq -

-
-

+

+ seq +

An instance of Sequence -

-
-

+

The sequence to convert. -

-
- - Expression + + Expression Semantics
as_vector(seq);
 

- Return type: result_of::as_vector<Sequence>::type + Return type: result_of::as_vector<Sequence>::type

- Semantics: Convert a fusion sequence, - seq, to a vector. + Semantics: Convert a fusion sequence, + seq, to a vector.

- - Header + + Header
#include <boost/fusion/container/vector/convert.hpp>
 #include <boost/fusion/include/as_vector.hpp>
 
- - Example + + Example
-
as_vector(make_list('x', 123, "hello"))
+
as_vector(make_list('x', 123, "hello"))
 
diff --git a/doc/html/fusion/container/conversion/metafunctions.html b/doc/html/fusion/container/conversion/metafunctions.html index 40b36e35..6eaabfae 100644 --- a/doc/html/fusion/container/conversion/metafunctions.html +++ b/doc/html/fusion/container/conversion/metafunctions.html @@ -3,10 +3,10 @@ Metafunctions - + - + @@ -22,10 +22,13 @@
PrevUpHomeNext
-
- +
+
+ +
+
as_list
as_vector
diff --git a/doc/html/fusion/container/conversion/metafunctions/as_list.html b/doc/html/fusion/container/conversion/metafunctions/as_list.html index 8435de9c..2db0e8cb 100644 --- a/doc/html/fusion/container/conversion/metafunctions/as_list.html +++ b/doc/html/fusion/container/conversion/metafunctions/as_list.html @@ -3,10 +3,10 @@ as_list - + - + @@ -22,27 +22,30 @@
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- Returns the result type of as_list. + Returns the result type of as_list.

- - Synopsis + + Synopsis
template <typename Sequence>
 struct as_list;
 
- - Parameters + + Parameters
@@ -51,67 +54,55 @@ - - + - + +

- - - + + +

-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Sequence -

-
-

- A fusion Sequence -

-
-

+

+ Sequence +

+ A fusion Sequence +

The sequence type to convert. -

-
- - Expression + + Expression Semantics
result_of::as_list<Sequence>::type;
 

- Return type: A list with same elements as the - input sequence, Sequence. + Return type: A list with same elements as the + input sequence, Sequence.

- Semantics: Convert a fusion sequence, - Sequence, to a list. + Semantics: Convert a fusion sequence, + Sequence, to a list.

- - Header + + Header
#include <boost/fusion/container/list/convert.hpp>
 #include <boost/fusion/include/as_list.hpp>
 
- - Example + + Example
-
result_of::as_list<vector<char, int> >::type
+
result_of::as_list<vector<char, int> >::type
 
diff --git a/doc/html/fusion/container/conversion/metafunctions/as_map.html b/doc/html/fusion/container/conversion/metafunctions/as_map.html index e693b804..b168c366 100644 --- a/doc/html/fusion/container/conversion/metafunctions/as_map.html +++ b/doc/html/fusion/container/conversion/metafunctions/as_map.html @@ -3,10 +3,10 @@ as_map - + - + @@ -22,27 +22,30 @@
PrevUpHomeNext
-
-
-as_map -
+
+
+
+as_map +
+
+
- - Description + + Description

- Returns the result type of as_map. + Returns the result type of as_map.

- - Synopsis + + Synopsis
template <typename Sequence>
 struct as_map;
 
- - Parameters + + Parameters
@@ -51,74 +54,62 @@ - - + - + +

- - - + + +

-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Sequence -

-
-

- A fusion Sequence -

-
-

+

+ Sequence +

+ A fusion Sequence +

The sequence to convert. -

-
- - Expression + + Expression Semantics
result_of::as_map<Sequence>::type;
 

- Return type: A map with same elements as the - input sequence, Sequence. + Return type: A map with same elements as the + input sequence, Sequence.

- Semantics: Convert a fusion sequence, - Sequence, to a map. + Semantics: Convert a fusion sequence, + Sequence, to a map.

- Precondition: The elements of the sequence + Precondition: The elements of the sequence are assumed to be __fusionpair_s. - There may be no duplicate fusion::pair key types. + There may be no duplicate fusion::pair key types.

- - Header + + Header
#include <boost/fusion/container/map/convert.hpp>
 #include <boost/fusion/include/as_map.hpp>
 
- - Example + + Example
-
result_of::as_map<vector<
-    fusion::pair<int, char>
-  , fusion::pair<double, std::string> > >::type
+
result_of::as_map<vector<
+    fusion::pair<int, char>
+  , fusion::pair<double, std::string> > >::type
 
diff --git a/doc/html/fusion/container/conversion/metafunctions/as_set.html b/doc/html/fusion/container/conversion/metafunctions/as_set.html index fe34db89..d379dd06 100644 --- a/doc/html/fusion/container/conversion/metafunctions/as_set.html +++ b/doc/html/fusion/container/conversion/metafunctions/as_set.html @@ -3,10 +3,10 @@ as_set - + - + @@ -22,27 +22,30 @@
PrevUpHomeNext
-
-
-as_set -
+
+
+
+as_set +
+
+
- - Description + + Description

- Returns the result type of as_set. + Returns the result type of as_set.

- - Synopsis + + Synopsis
template <typename Sequence>
 struct as_set;
 
- - Parameters + + Parameters
@@ -51,71 +54,59 @@ - - + - + +

- - - + + +

-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Sequence -

-
-

- A fusion Sequence -

-
-

+

+ Sequence +

+ A fusion Sequence +

The sequence to convert. -

-
- - Expression + + Expression Semantics
result_of::as_set<Sequence>::type;
 

- Return type: A set with same elements as the - input sequence, Sequence. + Return type: A set with same elements as the + input sequence, Sequence.

- Semantics: Convert a fusion sequence, - Sequence, to a set. + Semantics: Convert a fusion sequence, + Sequence, to a set.

- Precondition: There may be no duplicate + Precondition: There may be no duplicate key types.

- - Header + + Header
#include <boost/fusion/container/set/convert.hpp>
 #include <boost/fusion/include/as_set.hpp>
 
- - Example + + Example
-
result_of::as_set<vector<char, int> >::type
+
result_of::as_set<vector<char, int> >::type
 
diff --git a/doc/html/fusion/container/conversion/metafunctions/as_vector.html b/doc/html/fusion/container/conversion/metafunctions/as_vector.html index 1ecb7790..44bba097 100644 --- a/doc/html/fusion/container/conversion/metafunctions/as_vector.html +++ b/doc/html/fusion/container/conversion/metafunctions/as_vector.html @@ -3,10 +3,10 @@ as_vector - + - + @@ -22,27 +22,30 @@
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- Returns the result type of as_vector. + Returns the result type of as_vector.

- - Synopsis + + Synopsis
template <typename Sequence>
 struct as_vector;
 
- - Parameters + + Parameters
@@ -51,67 +54,55 @@ - - + - + +

- - - + + +

-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Sequence -

-
-

- A fusion Sequence -

-
-

+

+ Sequence +

+ A fusion Sequence +

The sequence to convert. -

-
- - Expression + + Expression Semantics
result_of::as_vector<Sequence>::type;
 

- Return type: A vector with same elements as - the input sequence, Sequence. + Return type: A vector with same elements as + the input sequence, Sequence.

- Semantics: Convert a fusion sequence, - Sequence, to a vector. + Semantics: Convert a fusion sequence, + Sequence, to a vector.

- - Header + + Header
#include <boost/fusion/container/vector/convert.hpp>
 #include <boost/fusion/include/as_vector.hpp>
 
- - Example + + Example
-
result_of::as_vector<list<char, int> >::type
+
result_of::as_vector<list<char, int> >::type
 
diff --git a/doc/html/fusion/container/generation.html b/doc/html/fusion/container/generation.html index f58852ff..6fc3eb44 100644 --- a/doc/html/fusion/container/generation.html +++ b/doc/html/fusion/container/generation.html @@ -3,10 +3,10 @@ Generation - + - + @@ -22,21 +22,24 @@
PrevUpHomeNext
-
- +
+
+ +
+

- These are the functions that you can use to generate various forms of Container from elemental values. + These are the functions that you can use to generate various forms of Container from elemental values.

-
- - Header -
+

+ + Header +

#include <boost/fusion/container/generation.hpp>
 #include <boost/fusion/include/generation.hpp>
 
diff --git a/doc/html/fusion/container/generation/functions.html b/doc/html/fusion/container/generation/functions.html index 410e9b4a..4a7cabfa 100644 --- a/doc/html/fusion/container/generation/functions.html +++ b/doc/html/fusion/container/generation/functions.html @@ -3,10 +3,10 @@ Functions - + - + @@ -22,10 +22,13 @@
PrevUpHomeNext
-
- +
+
+ +
+
make_list
make_cons
diff --git a/doc/html/fusion/container/generation/functions/list_tie.html b/doc/html/fusion/container/generation/functions/list_tie.html index d180c4f1..0aa819b0 100644 --- a/doc/html/fusion/container/generation/functions/list_tie.html +++ b/doc/html/fusion/container/generation/functions/list_tie.html @@ -3,10 +3,10 @@ list_tie - + - + @@ -22,38 +22,41 @@
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- Constructs a tie using a list sequence. + Constructs a tie using a list sequence.

- - Synopsis + + Synopsis
template <typename T0, typename T1,... typename TN>
-list<T0&, T1&,... TN&>
+list<T0&, T1&,... TN&>
 list_tie(T0& x0, T1& x1... TN& xN);
 

- The variadic function accepts 0 - to FUSION_MAX_LIST_SIZE - elements, where FUSION_MAX_LIST_SIZE - is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant - FUSION_MAX_LIST_SIZE + The variadic function accepts 0 + to FUSION_MAX_LIST_SIZE + elements, where FUSION_MAX_LIST_SIZE + is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant + FUSION_MAX_LIST_SIZE before including any Fusion header to change the default. Example:

#define FUSION_MAX_LIST_SIZE 20
 
- - Parameters + + Parameters
@@ -62,66 +65,54 @@ - - + - + +

- - - + xN +

+ +
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- x0, +

+ x0, x1,... - xN -

-
-

- Instances of T0, T1,... TN -

-
-

- The arguments to list_tie -

-

+ Instances of T0, T1,... TN +

+ The arguments to list_tie +

- - Expression + + Expression Semantics
list_tie(x0, x1,... xN);
 

- Return type: list<T0&, T1&,... + Return type: list<T0&, T1&,... TN&>

- Semantics: Create a list of references from x0, x1,... xN. + Semantics: Create a list of references from x0, x1,... xN.

- - Header + + Header
#include <boost/fusion/container/generation/list_tie.hpp>
 #include <boost/fusion/include/list_tie.hpp>
 
- - Example + + Example
int i = 123;
 double d = 123.456;
diff --git a/doc/html/fusion/container/generation/functions/make_cons.html b/doc/html/fusion/container/generation/functions/make_cons.html
index cf5a3c38..ae74290b 100644
--- a/doc/html/fusion/container/generation/functions/make_cons.html
+++ b/doc/html/fusion/container/generation/functions/make_cons.html
@@ -3,10 +3,10 @@
 
 make_cons
 
-
+
 
 
-
+
 
 
 
@@ -22,34 +22,37 @@
 
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- Create a cons - from car (head) - and optional cdr (tail). + Create a cons + from car (head) + and optional cdr (tail).

- - Synopsis + + Synopsis
template <typename Car>
-typename result_of::make_cons<Car>::type
+typename result_of::make_cons<Car>::type
 make_cons(Car const& car);
 
 template <typename Car, typename Cdr>
-typename result_of::make_cons<Car, Cdr>::type
+typename result_of::make_cons<Car, Cdr>::type
 make_cons(Car const& car, Cdr const& cdr);
 
- - Parameters + + Parameters
@@ -58,94 +61,76 @@ - - + - + +

- - - + + +

- - - + + +

-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- car -

-
-

- Instance of Car -

-
-

+

+ car +

+ Instance of Car +

The list's head -

-
-

- cdr -

-
-

- Instance of Cdr -

-
-

+

+ cdr +

+ Instance of Cdr +

The list's tail (optional) -

-
- - Expression + + Expression Semantics
make_cons(car, cdr);
 

- Return type: result_of::make_cons<Car, Cdr>::type or result_of::make_cons<Car>::type + Return type: result_of::make_cons<Car, Cdr>::type or result_of::make_cons<Car>::type

- Semantics: Create a cons from car - (head) and optional cdr + Semantics: Create a cons from car + (head) and optional cdr (tail).

- - Header + + Header
#include <boost/fusion/container/generation/make_cons.hpp>
 #include <boost/fusion/include/make_cons.hpp>
 
- - Example + + Example
make_cons('x', make_cons(123))
 
- - See + + See also

- boost::ref + boost::ref

diff --git a/doc/html/fusion/container/generation/functions/make_list.html b/doc/html/fusion/container/generation/functions/make_list.html index 60aab3b8..789da723 100644 --- a/doc/html/fusion/container/generation/functions/make_list.html +++ b/doc/html/fusion/container/generation/functions/make_list.html @@ -3,10 +3,10 @@ make_list - + - + @@ -22,39 +22,42 @@
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- Create a list + Create a list from one or more values.

- - Synopsis + + Synopsis
template <typename T0, typename T1,... typename TN>
-typename result_of::make_list<T0, T1,... TN>::type
+typename result_of::make_list<T0, T1,... TN>::type
 make_list(T0 const& x0, T1 const& x1... TN const& xN);
 

- The variadic function accepts 0 - to FUSION_MAX_LIST_SIZE - elements, where FUSION_MAX_LIST_SIZE - is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant - FUSION_MAX_LIST_SIZE + The variadic function accepts 0 + to FUSION_MAX_LIST_SIZE + elements, where FUSION_MAX_LIST_SIZE + is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant + FUSION_MAX_LIST_SIZE before including any Fusion header to change the default. Example:

#define FUSION_MAX_LIST_SIZE 20
 
- - Parameters + + Parameters
@@ -63,75 +66,63 @@ - - + - + +

- - - + xN +

+ +
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- x0, +

+ x0, x1,... - xN -

-
-

- Instances of T0, T1,... TN -

-
-

- The arguments to make_list -

-

+ Instances of T0, T1,... TN +

+ The arguments to make_list +

- - Expression + + Expression Semantics
make_list(x0, x1,... xN);
 

- Return type: result_of::make_list<T0, T1,... TN>::type + Return type: result_of::make_list<T0, T1,... TN>::type

- Semantics: Create a list from x0, x1,... xN. + Semantics: Create a list from x0, x1,... xN.

- - Header + + Header
#include <boost/fusion/container/generation/make_list.hpp>
 #include <boost/fusion/include/make_list.hpp>
 
- - Example + + Example
make_list(123, "hello", 12.5)
 
- - See + + See also

- boost::ref + boost::ref

diff --git a/doc/html/fusion/container/generation/functions/make_map.html b/doc/html/fusion/container/generation/functions/make_map.html index 94213a43..22398ac3 100644 --- a/doc/html/fusion/container/generation/functions/make_map.html +++ b/doc/html/fusion/container/generation/functions/make_map.html @@ -3,10 +3,10 @@ make_map - + - + @@ -22,41 +22,44 @@
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- Create a map + Create a map from one or more key/data pairs.

- - Synopsis + + Synopsis
template <
     typename K0, typename K1,... typename KN
   , typename T0, typename T1,... typename TN>
-typename result_of::make_map<K0, K0,... KN, T0, T1,... TN>::type
+typename result_of::make_map<K0, K0,... KN, T0, T1,... TN>::type
 make_map(T0 const& x0, T1 const& x1... TN const& xN);
 

- The variadic function accepts 0 - to FUSION_MAX_MAP_SIZE - elements, where FUSION_MAX_MAP_SIZE - is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant - FUSION_MAX_MAP_SIZE before + The variadic function accepts 0 + to FUSION_MAX_MAP_SIZE + elements, where FUSION_MAX_MAP_SIZE + is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant + FUSION_MAX_MAP_SIZE before including any Fusion header to change the default. Example:

#define FUSION_MAX_MAP_SIZE 20
 
- - Parameters + + Parameters
@@ -65,106 +68,86 @@ - - + - + +

- - + - +

+ - - - + xN +

+ +
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- K0, +

+ K0, K1,... - KN -

-
-

+ KN +

The key types -

-
-

- Keys associated with x0, x1,... xN -

-

+ Keys associated with x0, x1,... xN +

-

- x0, +

+ x0, x1,... - xN -

-
-

- Instances of T0, T1,... TN -

-
-

- The arguments to make_map -

-

+ Instances of T0, T1,... TN +

+ The arguments to make_map +

- - Expression + + Expression Semantics
make_map<K0, K1,... KN>(x0, x1,... xN);
 

- Return type: result_of::make_map<K0, K0,... KN, T0, T1,... TN>::type + Return type: result_of::make_map<K0, K0,... KN, T0, T1,... TN>::type

- Semantics: Create a map from K0, K1,... KN - keys and x0, + Semantics: Create a map from K0, K1,... KN + keys and x0, x1,... - xN data. + xN data.

- Precondition: There may be no duplicate + Precondition: There may be no duplicate key types.

- - Header + + Header
#include <boost/fusion/container/generation/make_map.hpp>
 #include <boost/fusion/include/make_map.hpp>
 
- - Example + + Example
-
make_map(
-    make_pair<int>('X')
-  , make_pair<double>("Men"))
+
make_map<int, double>('X', "Men")
 
- - See + + See also

- boost::ref, - fusion::pair + boost::ref, + fusion::pair

diff --git a/doc/html/fusion/container/generation/functions/make_set.html b/doc/html/fusion/container/generation/functions/make_set.html index cd0c861b..8dbb429a 100644 --- a/doc/html/fusion/container/generation/functions/make_set.html +++ b/doc/html/fusion/container/generation/functions/make_set.html @@ -3,10 +3,10 @@ make_set - + - + @@ -22,39 +22,42 @@
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- Create a set + Create a set from one or more values.

- - Synopsis + + Synopsis
template <typename T0, typename T1,... typename TN>
-typename result_of::make_set<T0, T1,... TN>::type
+typename result_of::make_set<T0, T1,... TN>::type
 make_set(T0 const& x0, T1 const& x1... TN const& xN);
 

- The variadic function accepts 0 - to FUSION_MAX_SET_SIZE - elements, where FUSION_MAX_SET_SIZE - is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant - FUSION_MAX_SET_SIZE before + The variadic function accepts 0 + to FUSION_MAX_SET_SIZE + elements, where FUSION_MAX_SET_SIZE + is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant + FUSION_MAX_SET_SIZE before including any Fusion header to change the default. Example:

#define FUSION_MAX_SET_SIZE 20
 
- - Parameters + + Parameters
@@ -63,79 +66,67 @@ - - + - + +

- - - + xN +

+ +
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- x0, +

+ x0, x1,... - xN -

-
-

- Instances of T0, T1,... TN -

-
-

- The arguments to make_set -

-

+ Instances of T0, T1,... TN +

+ The arguments to make_set +

- - Expression + + Expression Semantics
make_set(x0, x1,... xN);
 

- Return type: result_of::make_set<T0, T1,... TN>::type + Return type: result_of::make_set<T0, T1,... TN>::type

- Semantics: Create a set from x0, x1,... xN. + Semantics: Create a set from x0, x1,... xN.

- Precondition: There may be no duplicate + Precondition: There may be no duplicate key types.

- - Header + + Header
#include <boost/fusion/container/generation/make_set.hpp>
 #include <boost/fusion/include/make_set.hpp>
 
- - Example + + Example
make_set(123, "hello", 12.5)
 
- - See + + See also

- boost::ref + boost::ref

diff --git a/doc/html/fusion/container/generation/functions/make_vector.html b/doc/html/fusion/container/generation/functions/make_vector.html index bd059113..f8940179 100644 --- a/doc/html/fusion/container/generation/functions/make_vector.html +++ b/doc/html/fusion/container/generation/functions/make_vector.html @@ -3,10 +3,10 @@ make_vector - + - + @@ -22,39 +22,42 @@
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- Create a vector + Create a vector from one or more values.

- - Synopsis + + Synopsis
template <typename T0, typename T1,... typename TN>
-typename result_of::make_vector<T0, T1,... TN>::type
+typename result_of::make_vector<T0, T1,... TN>::type
 make_vector(T0 const& x0, T1 const& x1... TN const& xN);
 

- The variadic function accepts 0 - to FUSION_MAX_VECTOR_SIZE - elements, where FUSION_MAX_VECTOR_SIZE - is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant - FUSION_MAX_VECTOR_SIZE + The variadic function accepts 0 + to FUSION_MAX_VECTOR_SIZE + elements, where FUSION_MAX_VECTOR_SIZE + is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant + FUSION_MAX_VECTOR_SIZE before including any Fusion header to change the default. Example:

#define FUSION_MAX_VECTOR_SIZE 20
 
- - Parameters + + Parameters
@@ -63,75 +66,63 @@ - - + - + +

- - - + xN +

+ +
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- x0, +

+ x0, x1,... - xN -

-
-

- Instances of T0, T1,... TN -

-
-

- The arguments to make_vector -

-

+ Instances of T0, T1,... TN +

+ The arguments to make_vector +

- - Expression + + Expression Semantics
make_vector(x0, x1,... xN);
 

- Return type: result_of::make_vector<T0, T1,... TN>::type + Return type: result_of::make_vector<T0, T1,... TN>::type

- Semantics: Create a vector from x0, x1,... xN. + Semantics: Create a vector from x0, x1,... xN.

- - Header + + Header
#include <boost/fusion/container/generation/make_vector.hpp>
 #include <boost/fusion/include/make_vector.hpp>
 
- - Example + + Example
make_vector(123, "hello", 12.5)
 
- - See + + See also

- boost::ref + boost::ref

diff --git a/doc/html/fusion/container/generation/functions/map_tie.html b/doc/html/fusion/container/generation/functions/map_tie.html index 9d749875..5fe8f65e 100644 --- a/doc/html/fusion/container/generation/functions/map_tie.html +++ b/doc/html/fusion/container/generation/functions/map_tie.html @@ -3,10 +3,10 @@ map_tie - + - + @@ -22,38 +22,41 @@
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- Constructs a tie using a map sequence. + Constructs a tie using a map sequence.

- - Synopsis + + Synopsis
template <typename K0, typename K1,... typename KN, typename D0, typename D1,... typename DN>
-map<pair<K0, D0&>, pair<K1, D1&>,... pair<KN, DN&> >
+map<pair<K0, D0&>, pair<K1, D1&>,... pair<KN, DN&> >
 map_tie(D0& d0, D1& d1... DN& dN);
 

- The variadic function accepts 0 - to FUSION_MAX_MAP_SIZE - elements, where FUSION_MAX_MAP_SIZE - is a user definable predefined maximum that defaults to 10, and a corresponding number of key types. - You may define the preprocessor constant FUSION_MAX_MAP_SIZE + The variadic function accepts 0 + to FUSION_MAX_MAP_SIZE + elements, where FUSION_MAX_MAP_SIZE + is a user definable predefined maximum that defaults to 10, and a corresponding number of key types. + You may define the preprocessor constant FUSION_MAX_MAP_SIZE before including any Fusion header to change the default. Example:

#define FUSION_MAX_MAP_SIZE 20
 
- - Parameters + + Parameters
@@ -62,89 +65,71 @@ - - + - + +

- - + - + +

- - - + xN +

+ +
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- K0, +

+ K0, K1,... - KN -

-
-

+ KN +

Any type -

-
-

- The key types associated with each of the x1,x2,...,xN +

+ The key types associated with each of the x1,x2,...,xN values -

-
-

- x0, +

+ x0, x1,... - xN -

-
-

- Instances of T0, T1,... TN -

-
-

- The arguments to map_tie -

-

+ Instances of T0, T1,... TN +

+ The arguments to map_tie +

- - Expression + + Expression Semantics
map_tie<K0, K1,... KN>(x0, x1,... xN);
 

- Return type: map<pair<K0, D0&>, pair<K1, - D1&>,... pair<KN, + Return type: map<pair<K0, D0&>, pair<K1, + D1&>,... pair<KN, DN&> >

- Semantics: Create a map of references from x0, x1,... xN with keys K0, K1,... KN + Semantics: Create a map of references from x0, x1,... xN with keys K0, K1,... KN

- - Header + + Header
#include <boost/fusion/container/generation/map_tie.hpp>
 #include <boost/fusion/include/map_tie.hpp>
 
- - Example + + Example
struct int_key;
 struct double_key;
diff --git a/doc/html/fusion/container/generation/functions/tiers.html b/doc/html/fusion/container/generation/functions/tiers.html
index 310ff959..510286fd 100644
--- a/doc/html/fusion/container/generation/functions/tiers.html
+++ b/doc/html/fusion/container/generation/functions/tiers.html
@@ -3,10 +3,10 @@
 
 Tiers
 
-
+
 
 
-
+
 
 
 
@@ -22,34 +22,37 @@
 
PrevUpHomeNext
-
-
-Tiers -
+
+
+
+Tiers +
+
+

Tiers are sequences, where all elements are non-const reference types. They are constructed with a call to a couple of tie function templates. The succeeding sections document the various tier flavors.

-
    -
  • list_tie
  • -
  • vector_tie
  • -
  • map_tie
  • +

    Example:

    int i; char c; double d;
       ...
    -vector_tie(i, c, a);
    +vector_tie(i, c, a);
     

    - The vector_tie function creates - a vector - of type vector<int&, char&, double&>. The same result could be achieved - with the call make_vector(ref(i), ref(c), ref(a)) - [9] + The vector_tie function creates + a vector + of type vector<int&, char&, double&>. The same result could be achieved + with the call make_vector(ref(i), ref(c), ref(a)) + [9] .

    @@ -57,7 +60,7 @@ variables. E.g.:

    int i; char c; double d;
    -vector_tie(i, c, d) = make_vector(1,'a', 5.5);
    +vector_tie(i, c, d) = make_vector(1,'a', 5.5);
     std::cout << i << " " <<  c << " " << d;
     

    @@ -66,8 +69,8 @@ when calling functions which return sequences.

    - - Ignore + + Ignore

    There is also an object called ignore which allows @@ -76,13 +79,13 @@ example:

    char c;
    -vector_tie(ignore, c) = make_vector(1, 'a');
    +vector_tie(ignore, c) = make_vector(1, 'a');
     


    -

    [9] +

    [9] see Boost.Ref - for details about ref + for details about ref

    diff --git a/doc/html/fusion/container/generation/functions/vector_tie.html b/doc/html/fusion/container/generation/functions/vector_tie.html index 7279e1e8..6b91066c 100644 --- a/doc/html/fusion/container/generation/functions/vector_tie.html +++ b/doc/html/fusion/container/generation/functions/vector_tie.html @@ -3,10 +3,10 @@ vector_tie - + - + @@ -22,38 +22,41 @@
    PrevUpHomeNext
    -
    - +
    +
    + +
    +
    - - Description + + Description

    - Constructs a tie using a vector sequence. + Constructs a tie using a vector sequence.

    - - Synopsis + + Synopsis
    template <typename T0, typename T1,... typename TN>
    -vector<T0&, T1&,... TN&>
    +vector<T0&, T1&,... TN&>
     vector_tie(T0& x0, T1& x1... TN& xN);
     

    - The variadic function accepts 0 - to FUSION_MAX_VECTOR_SIZE - elements, where FUSION_MAX_VECTOR_SIZE - is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant - FUSION_MAX_VECTOR_SIZE + The variadic function accepts 0 + to FUSION_MAX_VECTOR_SIZE + elements, where FUSION_MAX_VECTOR_SIZE + is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant + FUSION_MAX_VECTOR_SIZE before including any Fusion header to change the default. Example:

    #define FUSION_MAX_VECTOR_SIZE 20
     
    - - Parameters + + Parameters
    @@ -62,66 +65,54 @@ - - + - + +

    - - - + xN +

    + +
    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - x0, +

    + x0, x1,... - xN -

    -
    -

    - Instances of T0, T1,... TN -

    -
    -

    - The arguments to vector_tie -

    -

    + Instances of T0, T1,... TN +

    + The arguments to vector_tie +

    - - Expression + + Expression Semantics
    vector_tie(x0, x1,... xN);
     

    - Return type: vector<T0&, T1&,... + Return type: vector<T0&, T1&,... TN&>

    - Semantics: Create a vector of references from x0, x1,... xN. + Semantics: Create a vector of references from x0, x1,... xN.

    - - Header + + Header
    #include <boost/fusion/container/generation/vector_tie.hpp>
     #include <boost/fusion/include/vector_tie.hpp>
     
    - - Example + + Example
    int i = 123;
     double d = 123.456;
    diff --git a/doc/html/fusion/container/generation/metafunctions.html b/doc/html/fusion/container/generation/metafunctions.html
    index 7616cdfd..07cf1cd7 100644
    --- a/doc/html/fusion/container/generation/metafunctions.html
    +++ b/doc/html/fusion/container/generation/metafunctions.html
    @@ -3,10 +3,10 @@
     
     MetaFunctions
     
    -
    +
     
     
    -
    +
     
     
     
    @@ -22,10 +22,13 @@
     
    PrevUpHomeNext
    -
    - +
    +
    + +
    +
    make_list
    make_cons
    diff --git a/doc/html/fusion/container/generation/metafunctions/list_tie.html b/doc/html/fusion/container/generation/metafunctions/list_tie.html index c74fa1d9..6e66cc72 100644 --- a/doc/html/fusion/container/generation/metafunctions/list_tie.html +++ b/doc/html/fusion/container/generation/metafunctions/list_tie.html @@ -3,10 +3,10 @@ list_tie - + - + @@ -22,37 +22,40 @@
    PrevUpHomeNext
    -
    - +
    +
    + +
    +
    - - Description + + Description

    - Returns the result type of list_tie. + Returns the result type of list_tie.

    - - Synopsis + + Synopsis
    template <typename T0, typename T1,... typename TN>
     struct list_tie;
     

    - The variadic function accepts 0 - to FUSION_MAX_LIST_SIZE - elements, where FUSION_MAX_LIST_SIZE - is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant - FUSION_MAX_LIST_SIZE + The variadic function accepts 0 + to FUSION_MAX_LIST_SIZE + elements, where FUSION_MAX_LIST_SIZE + is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant + FUSION_MAX_LIST_SIZE before including any Fusion header to change the default. Example:

    #define FUSION_MAX_LIST_SIZE 20
     
    - - Parameters + + Parameters
    @@ -61,66 +64,54 @@ - - + - + +

    - - + - +

    +
    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - T0, +

    + T0, T1,... - TN -

    -
    -

    + TN +

    Any type -

    -
    -

    - The arguments to list_tie -

    -

    + The arguments to list_tie +

    - - Expression + + Expression Semantics
    result_of::list_tie<T0, T1,... TN>::type;
     

    - Return type: list<T0&, T1&,... + Return type: list<T0&, T1&,... TN&>

    - Semantics: Create a list of references from T0, T1,... TN. + Semantics: Create a list of references from T0, T1,... TN.

    - - Header + + Header
    #include <boost/fusion/container/generation/list_tie.hpp>
     #include <boost/fusion/include/list_tie.hpp>
     
    - - Example + + Example
    result_of::list_tie<int, double>::type
     
    diff --git a/doc/html/fusion/container/generation/metafunctions/make_cons.html b/doc/html/fusion/container/generation/metafunctions/make_cons.html index e68d831f..7bb6a9e4 100644 --- a/doc/html/fusion/container/generation/metafunctions/make_cons.html +++ b/doc/html/fusion/container/generation/metafunctions/make_cons.html @@ -3,10 +3,10 @@ make_cons - + - + @@ -22,27 +22,30 @@
    PrevUpHomeNext
    -
    - +
    +
    + +
    +
    - - Description + + Description

    - Returns the result type of make_cons. + Returns the result type of make_cons.

    - - Synopsis + + Synopsis
    template <typename Car, typename Cdr = nil>
     struct make_cons;
     
    - - Parameters + + Parameters
    @@ -51,86 +54,68 @@ - - + - + +

    - - + - + +

    - - - + + +

    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - Car -

    -
    -

    +

    + Car +

    Any type -

    -
    -

    +

    The list's head type -

    -
    -

    - Cdr -

    -
    -

    - A cons -

    -
    -

    +

    + Cdr +

    + A cons +

    The list's tail type (optional) -

    -
    - - Expression + + Expression Semantics
    result_of::make_cons<Car, Cdr>::type
     

    - Return type: A cons with head element, Car, of type converted following the - rules for element - conversion, and tail, Cdr. + Return type: A cons with head element, Car, of type converted following the + rules for element + conversion, and tail, Cdr.

    - Semantics: Create a cons from Car - (head) and optional Cdr + Semantics: Create a cons from Car + (head) and optional Cdr (tail).

    - - Header + + Header
    #include <boost/fusion/container/generation/make_cons.hpp>
     #include <boost/fusion/include/make_cons.hpp>
     
    - - Example + + Example
    result_of::make_cons<char, result_of::make_cons<int>::type>::type
     
    diff --git a/doc/html/fusion/container/generation/metafunctions/make_list.html b/doc/html/fusion/container/generation/metafunctions/make_list.html index ada2baea..76de4c11 100644 --- a/doc/html/fusion/container/generation/metafunctions/make_list.html +++ b/doc/html/fusion/container/generation/metafunctions/make_list.html @@ -3,10 +3,10 @@ make_list - + - + @@ -22,37 +22,40 @@
    PrevUpHomeNext
    -
    - +
    +
    + +
    +
    - - Description + + Description

    - Returns the result type of make_list. + Returns the result type of make_list.

    - - Synopsis + + Synopsis
    template <typename T0, typename T1,... typename TN>
     struct make_list;
     

    - The variadic function accepts 0 - to FUSION_MAX_LIST_SIZE - elements, where FUSION_MAX_LIST_SIZE - is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant - FUSION_MAX_LIST_SIZE + The variadic function accepts 0 + to FUSION_MAX_LIST_SIZE + elements, where FUSION_MAX_LIST_SIZE + is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant + FUSION_MAX_LIST_SIZE before including any Fusion header to change the default. Example:

    #define FUSION_MAX_LIST_SIZE 20
     
    - - Parameters + + Parameters
    @@ -61,67 +64,55 @@ - - + - + +

    - - + - +

    +
    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - T0, +

    + T0, T1,... - TN -

    -
    -

    + TN +

    Any type -

    -
    -

    - Template arguments to make_list -

    -

    + Template arguments to make_list +

    - - Expression + + Expression Semantics
    result_of::make_list<T0, T1,... TN>::type
     

    - Return type: A list with elements of types - converted following the rules for element + Return type: A list with elements of types + converted following the rules for element conversion.

    - Semantics: Create a list from T0, T1,... TN. + Semantics: Create a list from T0, T1,... TN.

    - - Header + + Header
    #include <boost/fusion/container/generation/make_list.hpp>
     #include <boost/fusion/include/make_list.hpp>
     
    - - Example + + Example
    result_of::make_list<int, const char(&)[7], double>::type
     
    diff --git a/doc/html/fusion/container/generation/metafunctions/make_map.html b/doc/html/fusion/container/generation/metafunctions/make_map.html index e5d15e30..6486dce0 100644 --- a/doc/html/fusion/container/generation/metafunctions/make_map.html +++ b/doc/html/fusion/container/generation/metafunctions/make_map.html @@ -3,10 +3,10 @@ make_map - + - + @@ -22,20 +22,23 @@
    PrevUpHomeNext
    -
    - +
    +
    + +
    +
    - - Description + + Description

    - Returns the result type of make_map. + Returns the result type of make_map.

    - - Synopsis + + Synopsis
    template <
         typename K0, typename K1,... typename KN
    @@ -43,18 +46,18 @@
     struct make_map;
     

    - The variadic function accepts 0 - to FUSION_MAX_MAP_SIZE - elements, where FUSION_MAX_MAP_SIZE - is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant - FUSION_MAX_MAP_SIZE before + The variadic function accepts 0 + to FUSION_MAX_MAP_SIZE + elements, where FUSION_MAX_MAP_SIZE + is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant + FUSION_MAX_MAP_SIZE before including any Fusion header to change the default. Example:

    #define FUSION_MAX_MAP_SIZE 20
     
    - - Parameters + + Parameters
    @@ -63,102 +66,84 @@ - - + - + +

    - - + - +

    + - - + - +

    +
    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - K0, +

    + K0, K1,... - KN -

    -
    -

    + KN +

    Any type -

    -
    -

    - Keys associated with T0, T1,... TN -

    -

    + Keys associated with T0, T1,... TN +

    -

    - T0, +

    + T0, T1,... - TN -

    -
    -

    + TN +

    Any type -

    -
    -

    - Data associated with keys K0, K1,... KN -

    -

    + Data associated with keys K0, K1,... KN +

    - - Expression + + Expression Semantics
    resulf_of::make_map<K0, K1,... KN, T0, T1,... TN>::type;
     

    - Return type: result_of::make_map<K0, K0,... KN, T0, T1,... TN>::type + Return type: result_of::make_map<K0, K0,... KN, T0, T1,... TN>::type

    - Semantics: A map with fusion::pair elements where the second_type is converted following - the rules for element + Semantics: A map with fusion::pair elements where the second_type is converted following + the rules for element conversion.

    - Precondition: There may be no duplicate + Precondition: There may be no duplicate key types.

    - - Header + + Header
    #include <boost/fusion/container/generation/make_map.hpp>
     #include <boost/fusion/include/make_map.hpp>
     
    - - Example + + Example
    result_of::make_map<int, double, char, double>::type
     
    - - See + + See also

    - fusion::pair + fusion::pair

    diff --git a/doc/html/fusion/container/generation/metafunctions/make_set.html b/doc/html/fusion/container/generation/metafunctions/make_set.html index de1c8492..14956495 100644 --- a/doc/html/fusion/container/generation/metafunctions/make_set.html +++ b/doc/html/fusion/container/generation/metafunctions/make_set.html @@ -3,10 +3,10 @@ make_set - + - + @@ -22,37 +22,40 @@
    PrevUpHomeNext
    -
    - +
    +
    + +
    +
    - - Description + + Description

    - Returns the result type of make_set. + Returns the result type of make_set.

    - - Synopsis + + Synopsis
    template <typename T0, typename T1,... typename TN>
     struct make_set;
     

    - The variadic function accepts 0 - to FUSION_MAX_SET_SIZE - elements, where FUSION_MAX_SET_SIZE - is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant - FUSION_MAX_SET_SIZE before + The variadic function accepts 0 + to FUSION_MAX_SET_SIZE + elements, where FUSION_MAX_SET_SIZE + is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant + FUSION_MAX_SET_SIZE before including any Fusion header to change the default. Example:

    #define FUSION_MAX_SET_SIZE 20
     
    - - Parameters + + Parameters
    @@ -61,71 +64,59 @@ - - + - + +

    - - + - +

    +
    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - T0, +

    + T0, T1,... - TN -

    -
    -

    + TN +

    Any type -

    -
    -

    - The arguments to make_set -

    -

    + The arguments to make_set +

    - - Expression + + Expression Semantics
    result_of::make_set<T0, T1,... TN>::type
     

    - Return type: A set with elements of types converted - following the rules for element + Return type: A set with elements of types converted + following the rules for element conversion.

    - Semantics: Create a set from T0, T1,... TN. + Semantics: Create a set from T0, T1,... TN.

    - Precondition: There may be no duplicate + Precondition: There may be no duplicate key types.

    - - Header + + Header
    #include <boost/fusion/container/generation/make_set.hpp>
     #include <boost/fusion/include/make_set.hpp>
     
    - - Example + + Example
    result_of::make_set<int, char, double>::type
     
    diff --git a/doc/html/fusion/container/generation/metafunctions/make_vector.html b/doc/html/fusion/container/generation/metafunctions/make_vector.html index 2ddce229..c2a4316e 100644 --- a/doc/html/fusion/container/generation/metafunctions/make_vector.html +++ b/doc/html/fusion/container/generation/metafunctions/make_vector.html @@ -3,10 +3,10 @@ make_vector - + - + @@ -22,37 +22,40 @@
    PrevUpHomeNext
    -
    - +
    +
    + +
    +
    - - Description + + Description

    - Returns the result type of make_vector. + Returns the result type of make_vector.

    - - Synopsis + + Synopsis
    template <typename T0, typename T1,... typename TN>
     struct make_vector;
     

    - The variadic function accepts 0 - to FUSION_MAX_VECTOR_SIZE - elements, where FUSION_MAX_VECTOR_SIZE - is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant - FUSION_MAX_VECTOR_SIZE + The variadic function accepts 0 + to FUSION_MAX_VECTOR_SIZE + elements, where FUSION_MAX_VECTOR_SIZE + is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant + FUSION_MAX_VECTOR_SIZE before including any Fusion header to change the default. Example:

    #define FUSION_MAX_VECTOR_SIZE 20
     
    - - Parameters + + Parameters
    @@ -61,67 +64,55 @@ - - + - + +

    - - + - +

    +
    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - T0, +

    + T0, T1,... - TN -

    -
    -

    + TN +

    Any type -

    -
    -

    - Template arguments to make_vector -

    -

    + Template arguments to make_vector +

    - - Expression + + Expression Semantics
    result_of::make_vector<T0, T1,... TN>::type
     

    - Return type: A vector with elements of types - converted following the rules for element + Return type: A vector with elements of types + converted following the rules for element conversion.

    - Semantics: Create a vector from T0, T1,... TN. + Semantics: Create a vector from T0, T1,... TN.

    - - Header + + Header
    #include <boost/fusion/container/generation/make_list.hpp>
     #include <boost/fusion/include/make_list.hpp>
     
    - - Example + + Example
    result_of::make_vector<int, const char(&)[7], double>::type
     
    diff --git a/doc/html/fusion/container/generation/metafunctions/map_tie.html b/doc/html/fusion/container/generation/metafunctions/map_tie.html index a1f4280b..e2ca97cc 100644 --- a/doc/html/fusion/container/generation/metafunctions/map_tie.html +++ b/doc/html/fusion/container/generation/metafunctions/map_tie.html @@ -3,10 +3,10 @@ map_tie - + - + @@ -22,37 +22,40 @@
    PrevUpHomeNext
    -
    - +
    +
    + +
    +
    - - Description + + Description

    - Returns the result type of map_tie. + Returns the result type of map_tie.

    - - Synopsis + + Synopsis
    template <typename K0, typename K1,... typename KN, typename D0, typename D1,... typename DN>
     struct map_tie;
     

    - The variadic function accepts 0 - to FUSION_MAX_MAP_SIZE - elements, where FUSION_MAX_MAP_SIZE - is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant - FUSION_MAX_MAP_SIZE before + The variadic function accepts 0 + to FUSION_MAX_MAP_SIZE + elements, where FUSION_MAX_MAP_SIZE + is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant + FUSION_MAX_MAP_SIZE before including any Fusion header to change the default. Example:

    #define FUSION_MAX_MAP_SIZE 20
     
    - - Parameters + + Parameters
    @@ -61,88 +64,70 @@ - - + - + +

    - - + - +

    + - - + - +

    +
    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - K0, +

    + K0, K1,... - KN -

    -
    -

    + KN +

    Any type -

    -
    -

    - The key types for map_tie -

    -

    + The key types for map_tie +

    -

    - D0, +

    + D0, D1,... - DN -

    -
    -

    + DN +

    Any type -

    -
    -

    - The arguments types for map_tie -

    -

    + The arguments types for map_tie +

    - - Expression + + Expression Semantics
    result_of::map_tie<K0, K1,... KN, D0, D1,... DN>::type;
     

    - Return type: map<pair<K0, D0&>, pair<K1, - D1&>,... pair<KN, + Return type: map<pair<K0, D0&>, pair<K1, + D1&>,... pair<KN, DN&> >

    - Semantics: Create a map of references from D0, D1,... DN with keys K0, K1,... KN + Semantics: Create a map of references from D0, D1,... DN with keys K0, K1,... KN

    - - Header + + Header
    #include <boost/fusion/container/generation/map_tie.hpp>
     #include <boost/fusion/include/map_tie.hpp>
     
    - - Example + + Example
    struct int_key;
     struct double_key;
    diff --git a/doc/html/fusion/container/generation/metafunctions/vector_tie.html b/doc/html/fusion/container/generation/metafunctions/vector_tie.html
    index 3c73cd32..30fa40f4 100644
    --- a/doc/html/fusion/container/generation/metafunctions/vector_tie.html
    +++ b/doc/html/fusion/container/generation/metafunctions/vector_tie.html
    @@ -3,10 +3,10 @@
     
     vector_tie
     
    -
    +
     
     
    -
    +
     
     
     
    @@ -22,37 +22,40 @@
     
    PrevUpHomeNext
    -
    - +
    +
    + +
    +
    - - Description + + Description

    - Returns the result type of vector_tie. + Returns the result type of vector_tie.

    - - Synopsis + + Synopsis
    template <typename T0, typename T1,... typename TN>
     struct vector_tie;
     

    - The variadic function accepts 0 - to FUSION_MAX_VECTOR_SIZE - elements, where FUSION_MAX_VECTOR_SIZE - is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant - FUSION_MAX_VECTOR_SIZE + The variadic function accepts 0 + to FUSION_MAX_VECTOR_SIZE + elements, where FUSION_MAX_VECTOR_SIZE + is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant + FUSION_MAX_VECTOR_SIZE before including any Fusion header to change the default. Example:

    #define FUSION_MAX_VECTOR_SIZE 20
     
    - - Parameters + + Parameters
    @@ -61,66 +64,54 @@ - - + - + +

    - - + - +

    +
    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - T0, +

    + T0, T1,... - TN -

    -
    -

    + TN +

    Any type -

    -
    -

    - The arguments to vector_tie -

    -

    + The arguments to vector_tie +

    - - Expression + + Expression Semantics
    result_of::vector_tie<T0, T1,... TN>::type;
     

    - Return type: vector<T0&, T1&,... + Return type: vector<T0&, T1&,... TN&>

    - Semantics: Create a vector of references from T0, T1,... TN. + Semantics: Create a vector of references from T0, T1,... TN.

    - - Header + + Header
    #include <boost/fusion/container/generation/vector_tie.hpp>
     #include <boost/fusion/include/vector_tie.hpp>
     
    - - Example + + Example
    result_of::vector_tie<int, double>::type
     
    diff --git a/doc/html/fusion/container/list.html b/doc/html/fusion/container/list.html index a3a58ac3..1d61443f 100644 --- a/doc/html/fusion/container/list.html +++ b/doc/html/fusion/container/list.html @@ -3,10 +3,10 @@ list - + - + @@ -22,34 +22,38 @@
    PrevUpHomeNext
    -
    -

    -list -

    -
    - - Description -
    +
    +
    +

    +list +

    +
    +
    +

    + + Description +

    - list is a Forward - Sequence of heterogenous typed data built on top of cons. It is more efficient than - vector + list is a Forward + Sequence of heterogenous typed data built on top of cons. It is more efficient than + vector when the target sequence is constructed piecemeal (a data at a time). The - runtime cost of access to each element is peculiarly constant (see Recursive Inlined Functions). + runtime cost of access to each element is peculiarly constant (see Recursive Inlined Functions).

    -
    - - Header -
    +

    + + Header +

    #include <boost/fusion/container/list.hpp>
     #include <boost/fusion/include/list.hpp>
     #include <boost/fusion/container/list/list_fwd.hpp>
     #include <boost/fusion/include/list_fwd.hpp>
     
    -
    - - Synopsis -
    +

    + + Synopsis +

    template <
         typename T0 = unspecified
       , typename T1 = unspecified
    @@ -60,24 +64,24 @@
     struct list;
     

    - The variadic class interface accepts 0 - to FUSION_MAX_LIST_SIZE elements, - where FUSION_MAX_LIST_SIZE - is a user definable predefined maximum that defaults to 10. + The variadic class interface accepts 0 + to FUSION_MAX_LIST_SIZE elements, + where FUSION_MAX_LIST_SIZE + is a user definable predefined maximum that defaults to 10. Example:

    list<int, char, double>
     

    - You may define the preprocessor constant FUSION_MAX_LIST_SIZE + You may define the preprocessor constant FUSION_MAX_LIST_SIZE before including any Fusion header to change the default. Example:

    #define FUSION_MAX_LIST_SIZE 20
     
    -
    - - Template parameters -
    +

    + + Template parameters +

    @@ -85,78 +89,69 @@ - - + - + +

    - - + - + +

    -

    +

    Parameter -

    -
    -

    +

    Description -

    -
    -

    +

    Default -

    -
    -

    - T0...TN -

    -
    -

    +

    + T0...TN +

    Element types -

    -
    -

    +

    unspecified-type -

    -
    -
    - - Model of -
    - -
    +

    + + Model of +

    + +

    Notation

    -
    L
    +
    L

    - A list type + A list type

    -
    l
    +
    l

    - An instance of list + An instance of list

    -
    e0...en
    +
    e0...en

    Heterogeneous values

    -
    s
    +
    s

    - A Forward Sequence + A Forward Sequence

    -
    N
    +
    N

    An MPL Integral Constant

    -
    - - Expression Semantics -
    +

    + + Expression Semantics +

    Semantics of an expression is defined only where it differs from, or is not - defined in Forward + defined in Forward Sequence.

    @@ -165,104 +160,81 @@ - - + +

    - - + +

    - - + + - - + + - - + + - - + +
    -

    +

    Expression -

    -
    -

    +

    Semantics -

    -
    -

    - L() -

    -
    -

    +

    + L() +

    Creates a list with default constructed elements. -

    -
    -

    - L(e0, e1,... - en) -

    -
    -

    - Creates a list with elements e0...en. -

    -

    + L(e0, e1,... + en) +

    + Creates a list with elements e0...en. +

    -

    - L(s) -

    -
    -

    - Copy constructs a list from a Forward - Sequence, s. -

    -

    + L(s) +

    + Copy constructs a list from a Forward + Sequence, s. +

    -

    - l = - s -

    -
    -

    - Assigns to a list, l, - from a Forward - Sequence, s. -

    -

    + l = + s +

    + Assigns to a list, l, + from a Forward + Sequence, s. +

    -

    - at<N>(l) -

    -
    -

    - The Nth element from the beginning of the sequence; see at. -

    -

    + at<N>(l) +

    + The Nth element from the beginning of the sequence; see at. +

    - +

    + + Example +

    list<int, float> l(12, 5.5f);
    -std::cout << at_c<0>(l) << std::endl;
    -std::cout << at_c<1>(l) << std::endl;
    +std::cout << at_c<0>(l) << std::endl;
    +std::cout << at_c<1>(l) << std::endl;
     
    diff --git a/doc/html/fusion/container/map.html b/doc/html/fusion/container/map.html index c1450034..e10e1901 100644 --- a/doc/html/fusion/container/map.html +++ b/doc/html/fusion/container/map.html @@ -3,10 +3,10 @@ map - + - + @@ -22,36 +22,40 @@
    PrevUpHomeNext
    -
    -

    -map -

    -
    - - Description -
    +
    +
    +

    +map +

    +
    +
    +

    + + Description +

    - map is an Associative + map is an Associative Sequence of heteregenous typed data elements. Each element is a key/data - pair (see fusion::pair) + pair (see fusion::pair) where the key has no data (type only). Type identity is used to impose an equivalence relation on keys. A map may contain at most one element for each key. Membership testing and element key lookup has constant runtime complexity - (see Overloaded Functions). + (see Overloaded Functions).

    -
    - - Header -
    +

    + + Header +

    #include <boost/fusion/container/map.hpp>
     #include <boost/fusion/include/map.hpp>
     #include <boost/fusion/container/map_fwd.hpp>
     #include <boost/fusion/include/map_fwd.hpp>
     
    -
    - - Synopsis -
    +

    + + Synopsis +

    template <
         typename T0 = unspecified
       , typename T1 = unspecified
    @@ -62,24 +66,24 @@
     struct map;
     

    - The variadic class interface accepts 0 - to FUSION_MAX_MAP_SIZE elements, - where FUSION_MAX_MAP_SIZE - is a user definable predefined maximum that defaults to 10. + The variadic class interface accepts 0 + to FUSION_MAX_MAP_SIZE elements, + where FUSION_MAX_MAP_SIZE + is a user definable predefined maximum that defaults to 10. Example:

    -
    map<pair<int, char>, pair<char, char>, pair<double, char> >
    +
    map<pair<int, char>, pair<char, char>, pair<double, char> >
     

    - You may define the preprocessor constant FUSION_MAX_MAP_SIZE + You may define the preprocessor constant FUSION_MAX_MAP_SIZE before including any Fusion header to change the default. Example:

    #define FUSION_MAX_MAP_SIZE 20
     
    -
    - - Template parameters -
    +

    + + Template parameters +

    @@ -87,78 +91,71 @@ - - + - + +

    - - + - + +

    -

    +

    Parameter -

    -
    -

    +

    Description -

    -
    -

    +

    Default -

    -
    -

    - T0...TN -

    -
    -

    +

    + T0...TN +

    Element types -

    -
    -

    +

    unspecified-type -

    -
    -
    - - Model of -
    -
      -
    • Associative +

      + + Model of +

      + -
      +

      Notation

      -
      M
      +
      M

      - A map type + A map type

      -
      m
      +
      m

      - An instance of map + An instance of map

      -
      e0...en
      +
      e0...en

      - Heterogeneous key/value pairs (see fusion::pair) + Heterogeneous key/value pairs (see fusion::pair)

      -
      s
      +
      s

      - A Forward Sequence + A Forward Sequence

      -
      - - Expression Semantics -
      +

      + + Expression Semantics +

      Semantics of an expression is defined only where it differs from, or is not - defined in Random - Access Sequence and Associative + defined in Random + Access Sequence and Associative Sequence.

      @@ -167,88 +164,70 @@ - - + +

      - - + +

      - - + + - - + + - - + +
      -

      +

      Expression -

      -
      -

      +

      Semantics -

      -
      -

      - M() -

      -
      -

      +

      + M() +

      Creates a map with default constructed elements. -

      -
      -

      - M(e0, e1,... - en) -

      -
      -

      - Creates a map with element pairs e0...en. -

      -

      + M(e0, e1,... + en) +

      + Creates a map with element pairs e0...en. +

      -

      - M(s) -

      -
      -

      - Copy constructs a map from a Forward - Sequence s. -

      -

      + M(s) +

      + Copy constructs a map from a Forward + Sequence s. +

      -

      - m = - s -

      -
      -

      - Assigns to a map, m, - from a Forward - Sequence s. -

      -

      + m = + s +

      + Assigns to a map, m, + from a Forward + Sequence s. +

      -
      - - Example -
      +

      + + Example +

      typedef map<
      -    pair<int, char>
      -  , pair<double, std::string> >
      +    pair<int, char>
      +  , pair<double, std::string> >
       map_type;
       
       map_type m(
      -    make_pair<int>('X')
      -  , make_pair<double>("Men"));
      +    make_pair<int>('X')
      +  , make_pair<double>("Men"));
       
      -std::cout << at_key<int>(m) << std::endl;
      -std::cout << at_key<double>(m) << std::endl;
      +std::cout << at_key<int>(m) << std::endl;
      +std::cout << at_key<double>(m) << std::endl;
       
      diff --git a/doc/html/fusion/container/set.html b/doc/html/fusion/container/set.html index 3fa2d7df..d01e5f59 100644 --- a/doc/html/fusion/container/set.html +++ b/doc/html/fusion/container/set.html @@ -3,10 +3,10 @@ set - + - + @@ -22,35 +22,39 @@
      PrevUpHomeNext
      -
      -

      -set -

      -
      - - Description -
      +
      +
      +

      +set +

      +
      +
      +

      + + Description +

      - set is an Associative + set is an Associative Sequence of heteregenous typed data elements. Type identity is used to impose an equivalence relation on keys. The element's type is its key. A set may contain at most one element for each key. Membership testing and - element key lookup has constant runtime complexity (see Overloaded + element key lookup has constant runtime complexity (see Overloaded Functions).

      -
      - - Header -
      +

      + + Header +

      #include <boost/fusion/container/set.hpp>
       #include <boost/fusion/include/set.hpp>
       #include <boost/fusion/container/set_fwd.hpp>
       #include <boost/fusion/include/set_fwd.hpp>
       
      -
      - - Synopsis -
      +

      + + Synopsis +

      template <
           typename T0 = unspecified
         , typename T1 = unspecified
      @@ -61,24 +65,24 @@
       struct set;
       

      - The variadic class interface accepts 0 - to FUSION_MAX_SET_SIZE elements, - where FUSION_MAX_SET_SIZE - is a user definable predefined maximum that defaults to 10. + The variadic class interface accepts 0 + to FUSION_MAX_SET_SIZE elements, + where FUSION_MAX_SET_SIZE + is a user definable predefined maximum that defaults to 10. Example:

      set<int, char, double>
       

      - You may define the preprocessor constant FUSION_MAX_SET_SIZE + You may define the preprocessor constant FUSION_MAX_SET_SIZE before including any Fusion header to change the default. Example:

      #define FUSION_MAX_SET_SIZE 20
       
      -
      - - Template parameters -
      +

      + + Template parameters +

      @@ -86,78 +90,71 @@ - - + - + +

      - - + - + +

      -

      +

      Parameter -

      -
      -

      +

      Description -

      -
      -

      +

      Default -

      -
      -

      - T0...TN -

      -
      -

      +

      + T0...TN +

      Element types -

      -
      -

      +

      unspecified-type -

      -
    -
    - - Model of -
    -
      -
    • Associative +

      + + Model of +

      + -
      +

      Notation

      -
      S
      +
      S

      - A set type + A set type

      -
      s
      +
      s

      - An instance of set + An instance of set

      -
      e0...en
      +
      e0...en

      Heterogeneous values

      -
      fs
      +
      fs

      - A Forward Sequence + A Forward Sequence

      -
      - - Expression Semantics -
      +

      + + Expression Semantics +

      Semantics of an expression is defined only where it differs from, or is not - defined in Random - Access Sequence and Associative + defined in Random + Access Sequence and Associative Sequence.

      @@ -166,82 +163,64 @@ - - + +

      - - + +

      - - + + - - + + - - + +
      -

      +

      Expression -

      -
      -

      +

      Semantics -

      -
      -

      - S() -

      -
      -

      +

      + S() +

      Creates a set with default constructed elements. -

      -
      -

      - S(e0, e1,... - en) -

      -
      -

      - Creates a set with elements e0...en. -

      -

      + S(e0, e1,... + en) +

      + Creates a set with elements e0...en. +

      -

      - S(fs) -

      -
      -

      - Copy constructs a set from a Forward - Sequence fs. -

      -

      + S(fs) +

      + Copy constructs a set from a Forward + Sequence fs. +

      -

      - s = - fs -

      -
      -

      - Assigns to a set, s, - from a Forward - Sequence fs. -

      -

      + s = + fs +

      + Assigns to a set, s, + from a Forward + Sequence fs. +

      -
      - - Example -
      +

      + + Example +

      typedef set<int, float> S;
       S s(12, 5.5f);
      -std::cout << at_key<int>(s) << std::endl;
      -std::cout << at_key<float>(s) << std::endl;
      -std::cout << result_of::has_key<S, double>::value << std::endl;
      +std::cout << at_key<int>(s) << std::endl;
      +std::cout << at_key<float>(s) << std::endl;
      +std::cout << result_of::has_key<S, double>::value << std::endl;
       
      diff --git a/doc/html/fusion/container/vector.html b/doc/html/fusion/container/vector.html index 23ddcf24..a8fbc671 100644 --- a/doc/html/fusion/container/vector.html +++ b/doc/html/fusion/container/vector.html @@ -3,10 +3,10 @@ vector - + - + @@ -22,26 +22,30 @@
      PrevUpHomeNext
      -
      -

      -vector -

      -
      - - Description -
      +
      +
      +

      +vector +

      +
      +
      +

      + + Description +

      - vector is a Random + vector is a Random Access Sequence of heterogenous typed data structured as a simple - struct where each element is - held as a member variable. vector + struct where each element is + held as a member variable. vector is the simplest of the Fusion sequence container, and in many cases the most efficient.

      -
      - - Header -
      +

      + + Header +

      #include <boost/fusion/container/vector.hpp>
       #include <boost/fusion/include/vector.hpp>
       #include <boost/fusion/container/vector/vector_fwd.hpp>
      @@ -59,12 +63,12 @@
       #include <boost/fusion/container/vector/vector50.hpp>
       #include <boost/fusion/include/vector50.hpp>
       
      -
      - - Synopsis -
      +

      + + Synopsis +

      - Numbered forms + Numbered forms

      struct vector0;
       
      @@ -83,7 +87,7 @@
       struct vectorN;
       

      - Variadic form + Variadic form

      template <
           typename T0 = unspecified
      @@ -100,24 +104,24 @@
       
      vector3<int, char, double>
       

      - The variadic form accepts 0 to - FUSION_MAX_VECTOR_SIZE elements, - where FUSION_MAX_VECTOR_SIZE - is a user definable predefined maximum that defaults to 10. + The variadic form accepts 0 to + FUSION_MAX_VECTOR_SIZE elements, + where FUSION_MAX_VECTOR_SIZE + is a user definable predefined maximum that defaults to 10. Example:

      vector<int, char, double>
       

      - You may define the preprocessor constant FUSION_MAX_VECTOR_SIZE + You may define the preprocessor constant FUSION_MAX_VECTOR_SIZE before including any Fusion header to change the default. Example:

      #define FUSION_MAX_VECTOR_SIZE 20
       
      -
      - - Template parameters -
      +

      + + Template parameters +

      @@ -125,74 +129,65 @@ - - + - + +

      - - + - + +

      -

      +

      Parameter -

      -
      -

      +

      Description -

      -
      -

      +

      Default -

      -
      -

      - T0...TN -

      -
      -

      +

      + T0...TN +

      Element types -

      -
      -

      +

      unspecified -

      -
    -
    - - Model of -
    -
    • Random +

      + + Model of +

      + -
      +

      Notation

      -
      v
      +
      v

      - Instance of vector + Instance of vector

      -
      V
      +
      V

      - A vector type + A vector type

      -
      e0...en
      +
      e0...en

      Heterogeneous values

      -
      s
      +
      s

      - A Forward Sequence + A Forward Sequence

      -
      - - Expression Semantics -
      +

      + + Expression Semantics +

      Semantics of an expression is defined only where it differs from, or is not - defined in Random + defined in Random Access Sequence.

      @@ -201,80 +196,62 @@ - - + +

      - - + +

      - - + + - - + + - - + +
      -

      +

      Expression -

      -
      -

      +

      Semantics -

      -
      -

      - V() -

      -
      -

      +

      + V() +

      Creates a vector with default constructed elements. -

      -
      -

      - V(e0, e1,... - en) -

      -
      -

      - Creates a vector with elements e0...en. -

      -

      + V(e0, e1,... + en) +

      + Creates a vector with elements e0...en. +

      -

      - V(s) -

      -
      -

      - Copy constructs a vector from a Forward - Sequence, s. -

      -

      + V(s) +

      + Copy constructs a vector from a Forward + Sequence, s. +

      -

      - v = - s -

      -
      -

      - Assigns to a vector, v, - from a Forward - Sequence, s. -

      -

      + v = + s +

      + Assigns to a vector, v, + from a Forward + Sequence, s. +

      -
      - - Example -
      +

      + + Example +

      vector<int, float> v(12, 5.5f);
      -std::cout << at_c<0>(v) << std::endl;
      -std::cout << at_c<1>(v) << std::endl;
      +std::cout << at_c<0>(v) << std::endl;
      +std::cout << at_c<1>(v) << std::endl;
       
      diff --git a/doc/html/fusion/extension.html b/doc/html/fusion/extension.html index 61fcf378..d8b91114 100644 --- a/doc/html/fusion/extension.html +++ b/doc/html/fusion/extension.html @@ -3,11 +3,11 @@ Extension - + - - + +
      @@ -22,10 +22,13 @@
      PrevUpHomeNext
      -
      - +
      +
      + +
      +
      The Full Extension Mechanism
      Sequence Facade
      diff --git a/doc/html/fusion/extension/ext_full.html b/doc/html/fusion/extension/ext_full.html index 347f5d04..4b2cf8f1 100644 --- a/doc/html/fusion/extension/ext_full.html +++ b/doc/html/fusion/extension/ext_full.html @@ -1,12 +1,12 @@ -The Full Extension Mechanism + The Full Extension Mechanism - + - + @@ -22,36 +22,39 @@
      PrevUpHomeNext
      -
      - +
      +

      The Fusion library is designed to be extensible, new sequences types can - easily be added. In fact, the library support for std::pair, - boost::array and MPL + easily be added. In fact, the library support for std::pair, + boost::array and MPL sequences is entirely provided using the extension mechanism.

      The process for adding a new sequence type to Fusion is:

      -
        -
      1. - Enable the tag dispatching +
          +
        1. + Enable the tag dispatching mechanism used by Fusion for your sequence type
        2. -
        3. +
        4. Design an iterator type for the sequence
        5. -
        6. +
        7. Provide specialized behaviour for the intrinsic operations of the new Fusion sequence
        -
        - - Our example -
        +

        + + Our example +

        In order to illustrate enabling a new sequence type for use with Fusion, we are going to use the type: @@ -73,18 +76,19 @@

        We are going to pretend that this type has been provided by a 3rd party library, and therefore cannot be modified. We shall work through all the necessary - steps to enable example_struct - to serve as an Associative - Sequence as described in the Quick + steps to enable example_struct + to serve as an Associative + Sequence as described in the Quick Start guide.

        -
        - - Enabling +

        + + Enabling Tag Dispatching -

        +

        - The Fusion extensibility mechanism uses tag + The Fusion extensibility mechanism uses tag dispatching to call the correct code for a given sequence type. In order to exploit the tag dispatching mechanism we must first declare a new tag type for the mechanism to use. For example: @@ -94,9 +98,9 @@ }

        - Next we need to enable the traits::tag_of + Next we need to enable the traits::tag_of metafunction to return our newly chosen tag type for operations involving - our sequence. This is done by specializing traits::tag_of + our sequence. This is done by specializing traits::tag_of for our sequence type.

        #include <boost/fusion/support/tag_of_fwd.hpp>
        @@ -111,28 +115,28 @@
         }}}
         

        - traits::tag_of also has a second template argument, - that can be used in conjuction with boost::enable_if + traits::tag_of also has a second template argument, + that can be used in conjuction with boost::enable_if to provide tag support for groups of related types. This feature is not necessary for our sequence, but for an example see the code in:

        #include <boost/fusion/adapted/array/tag_of.hpp>
         #include <boost/fusion/include/tag_of.hpp>
         
        -
        - - Designing +

        + + Designing a suitable iterator -

        +

        We need an iterator to describe positions, and provide access to the data within our sequence. As it is straightforward to do, we are going to provide a random access iterator in our example.

        - We will use a simple design, in which the 2 members of example_struct - are given numbered indices, 0 for name - and 1 for age respectively. + We will use a simple design, in which the 2 members of example_struct + are given numbered indices, 0 for name + and 1 for age respectively.

        template<typename Struct, int Pos>
         struct example_struct_iterator
        @@ -152,43 +156,43 @@
         

        A quick summary of the details of our iterator:

        -
          -
        1. +
            +
          1. The iterator is parameterized by the type it is iterating over, and the index of the current element.
          2. -
          3. - The typedefs struct_type - and index provide convenient +
          4. + The typedefs struct_type + and index provide convenient access to information we will need later in the implementation.
          5. -
          6. - The typedef category allows - the traits::category_of +
          7. + The typedef category allows + the traits::category_of metafunction to establish the traversal category of the iterator.
          8. -
          9. - The constructor stores a reference to the example_struct +
          10. + The constructor stores a reference to the example_struct being iterated over.

          - We also need to enable tag + We also need to enable tag dispatching for our iterator type, with another specialization - of traits::tag_of. + of traits::tag_of.

          In isolation, the iterator implementation is pretty dry. Things should become clearer as we add features to our implementation.

          -
          - - A +

          + + A first couple of instructive features -

          +

          - To start with, we will get the result_of::value_of metafunction working. To - do this, we provide a specialization of the boost::fusion::extension::value_of_impl + To start with, we will get the result_of::value_of metafunction working. To + do this, we provide a specialization of the boost::fusion::extension::value_of_impl template for our iterator's tag type.

          template<>
          @@ -212,29 +216,29 @@
           

          The implementation itself is pretty simple, it just uses 2 partial specializations - to provide the type of the 2 different members of example_struct, + to provide the type of the 2 different members of example_struct, based on the index of the iterator.

          - To understand how value_of_impl - is used by the library we will look at the implementation of value_of: + To understand how value_of_impl + is used by the library we will look at the implementation of value_of:

          template <typename Iterator>
          -struct value_of
          +struct value_of
               : extension::value_of_impl<typename detail::tag_of<Iterator>::type>::
                   template apply<Iterator>
           {};
           

          - So value_of - uses tag dispatching + So value_of + uses tag dispatching to select an MPL Metafunction Class to provide its functionality. You will notice this pattern throughout the implementation of Fusion.

          Ok, lets enable dereferencing of our iterator. In this case we must provide - a suitable specialization of deref_impl. + a suitable specialization of deref_impl.

          template<>
           struct deref_impl<example::example_struct_iterator_tag>
          @@ -271,16 +275,16 @@
           }
           

          - The use of deref_impl is - very similar to that of value_of_impl, - but it also provides some runtime functionality this time via the call static member function. To see how - deref_impl is used, lets - have a look at the implementation of deref: + The use of deref_impl is + very similar to that of value_of_impl, + but it also provides some runtime functionality this time via the call static member function. To see how + deref_impl is used, lets + have a look at the implementation of deref:

          namespace result_of
           {
               template <typename Iterator>
          -    struct deref
          +    struct deref
                   : extension::deref_impl<typename detail::tag_of<Iterator>::type>::
                       template apply<Iterator>
               {};
          @@ -288,48 +292,48 @@
           
           template <typename Iterator>
           typename result_of::deref<Iterator>::type
          -deref(Iterator const& i)
          +deref(Iterator const& i)
           {
               typedef result_of::deref<Iterator> deref_meta;
               return deref_meta::call(i);
           }
           

          - So again result_of::deref uses tag - dispatching in exactly the same way as the value_of implementation. The runtime - functionality used by deref is provided by the call static function of the selected MPL + So again result_of::deref uses tag + dispatching in exactly the same way as the value_of implementation. The runtime + functionality used by deref is provided by the call static function of the selected MPL Metafunction Class.

          - The actual implementation of deref_impl - is slightly more complex than that of value_of_impl. - We also need to implement the call + The actual implementation of deref_impl + is slightly more complex than that of value_of_impl. + We also need to implement the call function, which returns a reference to the appropriate member of the underlying - sequence. We also require a little bit of metaprogramming to return const references if the underlying sequence + sequence. We also require a little bit of metaprogramming to return const references if the underlying sequence is const.

          -
      +
      -
      [Note] Note

      +

      Although there is a fair amount of left to do to produce a fully fledged - Fusion sequence, value_of and deref illustrate all the signficant + Fusion sequence, value_of and deref illustrate all the signficant concepts required. The remainder of the process is very repetitive, simply - requiring implementation of a suitable xxxx_impl - for each feature xxxx. + requiring implementation of a suitable xxxx_impl + for each feature xxxx.

    -
    - - Implementing +

    + + Implementing the remaining iterator functionality -

    +

    - Ok, now we have seen the way value_of and deref work, everything else will + Ok, now we have seen the way value_of and deref work, everything else will work in pretty much the same way. Lets start with forward iteration, by providing - a next_impl: + a next_impl:

    template<>
     struct next_impl<example::example_struct_iterator_tag>
    @@ -350,37 +354,40 @@
     };
     

    - This should be very familiar from our deref_impl + This should be very familiar from our deref_impl implementation, we will be using this approach again and again now. Our design - is simply to increment the index + is simply to increment the index counter to move on to the next element. The various other iterator manipulations - we need to perform will all just involve simple calculations with the index variables. + we need to perform will all just involve simple calculations with the index variables.

    - We also need to provide a suitable equal_to_impl - so that iterators can be correctly compared. A Bidirectional - Iterator will also need an implementation of prior_impl. - For a Random - Access Iterator distance_impl - and advance_impl also need + We also need to provide a suitable equal_to_impl + so that iterators can be correctly compared. A Bidirectional + Iterator will also need an implementation of prior_impl. + For a Random + Access Iterator distance_impl + and advance_impl also need to be provided in order to satisfy the necessary complexity guarantees. As - our iterator is a Random + our iterator is a Random Access Iterator we will have to implement all of these functions.

    - Full implementations of prior_impl, - advance_impl, distance_impl and equal_to_impl + Full implementations of prior_impl, + advance_impl, distance_impl and equal_to_impl are provided in the example code.

    -
    - - Implementing +

    + + Implementing the intrinsic functions of the sequence -

    +

    In order that Fusion can correctly identify our sequence as a Fusion sequence, - we need to enable is_sequence - for our sequence type. As usual we just create an impl + we need to enable is_sequence + for our sequence type. As usual we just create an impl type specialized for our sequence tag:

    template<>
    @@ -391,14 +398,14 @@
     };
     

    - We've some similar formalities to complete, providing category_of_impl - so Fusion can correctly identify our sequence type, and is_view_impl - so Fusion can correctly identify our sequence as not being a View + We've some similar formalities to complete, providing category_of_impl + so Fusion can correctly identify our sequence type, and is_view_impl + so Fusion can correctly identify our sequence as not being a View type. Implementations are provide in the example code.

    Now we've completed some formalities, on to more interesting features. Lets - get begin working so that we can get + get begin working so that we can get an iterator to start accessing the data in our sequence.

    template<>
    @@ -420,32 +427,33 @@
     

    The implementation uses the same ideas we have applied throughout, in this case we are just creating one of the iterators we developed earlier, pointing - to the first element in the sequence. The implementation of end is very similar, and is provided + to the first element in the sequence. The implementation of end is very similar, and is provided in the example code.

    - For our Random - Access Sequence we will also need to implement size_impl, - value_at_impl and at_impl. + For our Random + Access Sequence we will also need to implement size_impl, + value_at_impl and at_impl.

    -
    - - Enabling +

    + + Enabling our type as an associative container -

    +

    - In order for example_struct + In order for example_struct to serve as an associative container, we need to enable 3 lookup features, - at_key, value_at_key and has_key. We also need to provide - an implementation of the is_associative + at_key, value_at_key and has_key. We also need to provide + an implementation of the is_associative trait so that our sequence can be correctly identified as an associative container.

    - To implement at_key_impl - we need to associate the fields::age and - fields::age types described in the Quick - Start guide with the appropriate members of example_struct. + To implement at_key_impl + we need to associate the fields::age and + fields::age types described in the Quick + Start guide with the appropriate members of example_struct. Our implementation is as follows:

    template<>
    @@ -487,18 +495,18 @@
     

    Its all very similar to the implementations we've seen previously, such as - deref_impl and value_of_impl. Instead of identifying the + deref_impl and value_of_impl. Instead of identifying the members by index or position, we are now selecting them using the types - fields::name and fields::age. - The implementations of value_at_key_impl - and has_key_impl are equally + fields::name and fields::age. + The implementations of value_at_key_impl + and has_key_impl are equally straightforward, and are provided in the example code, along with an implementation - of is_associative_impl. + of is_associative_impl.

    -
    - - Summary -
    +

    + + Summary +

    We've now worked through the entire process for adding a new random access sequence and we've also enabled our type to serve as an associative container. @@ -506,8 +514,8 @@ pattern.

    - The support for std::pair, MPL - sequences, and boost::array all use the same approach, and provide + The support for std::pair, MPL + sequences, and boost::array all use the same approach, and provide additional examples of the approach for a variety of types.

    diff --git a/doc/html/fusion/extension/iterator_facade.html b/doc/html/fusion/extension/iterator_facade.html index 4b4c8051..10320142 100644 --- a/doc/html/fusion/extension/iterator_facade.html +++ b/doc/html/fusion/extension/iterator_facade.html @@ -3,10 +3,10 @@ Iterator Facade - + - + @@ -22,30 +22,33 @@
    PrevUpHomeNext
    -
    - -
    - - Description -
    +
    +
    + +
    +
    +

    + + Description +

    - The iterator_facade + The iterator_facade template provides an intrusive mechanism for producing a conforming Fusion iterator.

    -
    - - Synopsis -
    +

    + + Synopsis +

    template<typename Derived, typename TravesalTag>
     struct iterator_facade;
     
    -
    - - Usage -
    +

    + + Usage +

    The user of iterator_facade derives his iterator type from a specialization of iterator_facade and passes the derived iterator type as the first template @@ -57,326 +60,230 @@ type.

    -

    Table 1.93. Parameters

    -
    +

    Table 1.93. Parameters

    +
    - - + +

    - - + + - - + +

    -
    -

    +

    Name -

    -
    -

    +

    Description -

    -
    -

    - iterator, It, It1, - It2 -

    -
    -

    - A type derived from iterator_facade -

    -

    + iterator, It, It1, + It2 +

    + A type derived from iterator_facade +

    -

    - N -

    -
    -

    +

    + N +

    An MPL Integral Constant -

    -
    +
    -
    -

    Table 1.94. Key Expressions

    -
    +
    +

    Table 1.94. Key Expressions

    +
    - - + - + +

    - - - + + +

    - - - + + +

    - - - + + +

    - - - + + +

    - - - + + +

    - - - + + +

    - - - + + +

    - - - + + + - - - + + + - - + - + +

    - - - + + +

    - - - + + + - - - + + + -
    -

    +

    Expression -

    -
    -

    +

    Result -

    -
    -

    +

    Default -

    -
    -

    - iterator::template value_of<It>::type -

    -
    -

    - The element stored at iterator position It -

    -
    -

    +

    + iterator::template value_of<It>::type +

    + The element stored at iterator position It +

    None -

    -
    -

    - iterator::template deref<It>::type -

    -
    -

    - The type returned when dereferencing an iterator of type It -

    -
    -

    +

    + iterator::template deref<It>::type +

    + The type returned when dereferencing an iterator of type It +

    None -

    -
    -

    - iterator::template deref<It>::call(it) -

    -
    -

    - Dereferences iterator it -

    -
    -

    +

    + iterator::template deref<It>::call(it) +

    + Dereferences iterator it +

    None -

    -
    -

    - iterator::template next<It>::type -

    -
    -

    - The type of the next element from It -

    -
    -

    +

    + iterator::template next<It>::type +

    + The type of the next element from It +

    None -

    -
    -

    - iterator::template next<It>::call(it) -

    -
    -

    - The next iterator after it -

    -
    -

    +

    + iterator::template next<It>::call(it) +

    + The next iterator after it +

    None -

    -
    -

    - iterator::template prior<It>::type -

    -
    -

    - The type of the next element from It -

    -
    -

    +

    + iterator::template prior<It>::type +

    + The type of the next element from It +

    None -

    -
    -

    - iterator::template prior<It>::call(it) -

    -
    -

    - The next iterator after it -

    -
    -

    +

    + iterator::template prior<It>::call(it) +

    + The next iterator after it +

    None -

    -
    -

    - iterator::template advance<It, N>::type -

    -
    -

    - The type of an iterator advanced N - elements from It -

    -
    -

    - Implemented in terms of next - and prior -

    -

    + iterator::template advance<It, N>::type +

    + The type of an iterator advanced N + elements from It +

    + Implemented in terms of next + and prior +

    -

    - iterator::template advance<It, N>::call(it) -

    -
    -

    - An iterator advanced N - elements from it -

    -
    -

    - Implemented in terms of next - and prior -

    -

    + iterator::template advance<It, N>::call(it) +

    + An iterator advanced N + elements from it +

    + Implemented in terms of next + and prior +

    -

    - iterator::template distance<It1, It2>::type -

    -
    -

    - The distance between iterators of type It1 - and It2 as an MPL +

    + iterator::template distance<It1, It2>::type +

    + The distance between iterators of type It1 + and It2 as an MPL Integral Constant -

    -
    -

    +

    None -

    -
    -

    - iterator::template distance<It1, It2>::call(it1, it2) -

    -
    -

    - The distance between iterator it1 - and it2 -

    -
    -

    +

    + iterator::template distance<It1, It2>::call(it1, it2) +

    + The distance between iterator it1 + and it2 +

    None -

    -
    -

    - iterator::template equal_to<It1, It2>::type -

    -
    -

    - The distance between iterators of type It1 - and It2 -

    -
    -

    - boost::same_type<It1, It2>::type -

    -

    + iterator::template equal_to<It1, It2>::type +

    + The distance between iterators of type It1 + and It2 +

    + boost::same_type<It1, It2>::type +

    -

    - iterator::template equal_to<It1, It2>::call(it1, it2) -

    -
    -

    - The distance between iterators it1 - and it2 -

    -
    -

    - boost::same_type<It1, It2>::type() -

    -

    + iterator::template equal_to<It1, It2>::call(it1, it2) +

    + The distance between iterators it1 + and it2 +

    + boost::same_type<It1, It2>::type() +

    +
    -
    - - Header -
    +

    + + Header +

    #include <boost/fusion/iterator/iterator_facade.hpp>
     #include <boost/fusion/include/iterator_facade.hpp>
     
    -
    - - Example -
    +

    + + Example +

    - A full working example using iterator_facade is provided in triple.cpp + A full working example using iterator_facade is provided in triple.cpp in the extension examples.

    diff --git a/doc/html/fusion/extension/sequence_facade.html b/doc/html/fusion/extension/sequence_facade.html index f10ccd8a..753df321 100644 --- a/doc/html/fusion/extension/sequence_facade.html +++ b/doc/html/fusion/extension/sequence_facade.html @@ -3,10 +3,10 @@ Sequence Facade - + - + @@ -22,36 +22,39 @@
    PrevUpHomeNext
    -
    - -
    - - Description -
    +
    +
    + +
    +
    +

    + + Description +

    - The sequence_facade + The sequence_facade template provides an intrusive mechanism for producing a conforming Fusion iterator.

    -
    - - Synopsis -
    +

    + + Synopsis +

    template<typename Derived, typename TravesalTag, typename IsView = mpl::false_>
     struct sequence_facade;
     
    -
    - - Usage -
    +

    + + Usage +

    - The user of sequence_facade derives his sequence - type from a specialization of sequence_facade and passes the derived + The user of sequence_facade derives his sequence + type from a specialization of sequence_facade and passes the derived sequence type as the first template parameter. The second template parameter should be the traversal category of the sequence being implemented. The 3rd - parameter should be set to mpl::true_ + parameter should be set to mpl::true_ if the sequence is a view.

    @@ -59,202 +62,150 @@ type.

    -

    Table 1.91. Parameters

    -
    +

    Table 1.91. Parameters

    +
    - - + +

    - - + + - - + +

    -
    -

    +

    Name -

    -
    -

    +

    Description -

    -
    -

    - sequence, Seq -

    -
    -

    - A type derived from sequence_facade -

    -

    + sequence, Seq +

    + A type derived from sequence_facade +

    -

    - N -

    -
    -

    +

    + N +

    An MPL Integral Constant -

    -
    +
    -
    -

    Table 1.92. Key Expressions

    -
    +
    +

    Table 1.92. Key Expressions

    +
    - - + +

    - - + + - - + + - - + + - - + + - - + +

    - - + + - - + + - - + + - - + + -
    -

    +

    Expression -

    -
    -

    +

    Result -

    -
    -

    - sequence::template begin<Seq>::type -

    -
    -

    - The type of an iterator to the beginning of a sequence of type Seq -

    -

    + sequence::template begin<Seq>::type +

    + The type of an iterator to the beginning of a sequence of type Seq +

    -

    - sequence::template begin<Seq>::call(seq) -

    -
    -

    - An iterator to the beginning of sequence seq -

    -

    + sequence::template begin<Seq>::call(seq) +

    + An iterator to the beginning of sequence seq +

    -

    - sequence::template end<Seq>::type -

    -
    -

    - The type of an iterator to the end of a sequence of type Seq -

    -

    + sequence::template end<Seq>::type +

    + The type of an iterator to the end of a sequence of type Seq +

    -

    - sequence::template end<Seq>::call(seq) -

    -
    -

    - An iterator to the end of sequence seq -

    -

    + sequence::template end<Seq>::call(seq) +

    + An iterator to the end of sequence seq +

    -

    - sequence::template size<Seq>::type -

    -
    -

    - The size of a sequence of type Seq +

    + sequence::template size<Seq>::type +

    + The size of a sequence of type Seq as an MPL Integral Constant -

    -
    -

    - sequence::template size<Seq>::call(seq) -

    -
    -

    - The size of sequence seq -

    -

    + sequence::template size<Seq>::call(seq) +

    + The size of sequence seq +

    -

    - sequence::template at<Seq, N>::type -

    -
    -

    - The type of element N - in a sequence of type Seq -

    -

    + sequence::template at<Seq, N>::type +

    + The type of element N + in a sequence of type Seq +

    -

    - sequence::template at<Seq, N>::call(seq) -

    -
    -

    - Element N in sequence - seq -

    -

    + sequence::template at<Seq, N>::call(seq) +

    + Element N in sequence + seq +

    -

    - sequence::template value_at<Sequence, N>::type -

    -
    -

    - The type of the Nth - element in a sequence of type Seq -

    -

    + sequence::template value_at<Sequence, N>::type +

    + The type of the Nth + element in a sequence of type Seq +

    +
    -
    - - Include -
    +

    + + Include +

    #include <boost/fusion/sequence/sequence_facade.hpp>
     #include <boost/fusion/include/sequence_facade.hpp>
     
    -
    - - Example -
    +

    + + Example +

    - A full working example using sequence_facade is provided in triple.cpp + A full working example using sequence_facade is provided in triple.cpp in the extension examples.

    diff --git a/doc/html/fusion/functional.html b/doc/html/fusion/functional.html index b5aa1a98..2ed0930b 100644 --- a/doc/html/fusion/functional.html +++ b/doc/html/fusion/functional.html @@ -3,10 +3,10 @@ Functional - + - + @@ -22,10 +22,13 @@
    PrevUpHomeNext
    -
    - +
    +
    + +
    +
    Concepts
    @@ -62,17 +65,17 @@ Components to call functions and function objects and to make Fusion code callable through a function object interface.

    -

    - - Header -

    +

    + + Header +

    #include <boost/fusion/functional.hpp>
     
    -

    - - Fused and unfused +

    + + Fused and unfused forms -

    +

    What is a function call?

    @@ -82,31 +85,31 @@ It is a name and a tuple written next to each other, left-to-right.

    - Although the C++ syntax does not allow to replace (a,b,c) - with some Fusion Sequence, introducing + Although the C++ syntax does not allow to replace (a,b,c) + with some Fusion Sequence, introducing yet another function provides a solution:

    invoke(f,my_sequence)
     

    - Alternatively it is possible to apply a simple transformation to f + Alternatively it is possible to apply a simple transformation to f in order to achieve the same effect:

    f tuple <=> f' (tuple)
     

    - Now, f' is an unary function that takes the arguments to - f as a tuple; f' - is the fused form of f. + Now, f' is an unary function that takes the arguments to + f as a tuple; f' + is the fused form of f. Reading the above equivalence right-to-left to get the inverse transformation, - f is the unfused - form of f'. + f is the unfused + form of f'.

    -

    - - Calling +

    + + Calling functions and function objects -

    +

    Having generic C++ code call back arbitrary functions provided by the client used to be a heavily repetitive task, as different functions can differ in @@ -119,8 +122,9 @@

    Transforming an unfused function into its fused counterpart allows n-ary calls - from an algorithm that invokes an unary Polymorphic - Function Object with Sequence + from an algorithm that invokes an unary Polymorphic + Function Object with Sequence arguments.

    @@ -132,11 +136,11 @@

    Constructors can be called applying Boost.Functional/Factory.

    -

    - - Making +

    + + Making Fusion code callable through a function object interface -

    +

    Transforming a fused function into its unfused counterpart allows to create function objects to accept arbitrary calls. In other words, an unary function diff --git a/doc/html/fusion/functional/adapters.html b/doc/html/fusion/functional/adapters.html index 967cf3e2..c6fb7deb 100644 --- a/doc/html/fusion/functional/adapters.html +++ b/doc/html/fusion/functional/adapters.html @@ -1,12 +1,12 @@ -Adapters + Adapters - + - + @@ -22,10 +22,13 @@

    PrevUpHomeNext
    -
    - +
    +
    + +
    +
    fused
    fused_procedure
    diff --git a/doc/html/fusion/functional/adapters/fused.html b/doc/html/fusion/functional/adapters/fused.html index e89cd756..2f968aae 100644 --- a/doc/html/fusion/functional/adapters/fused.html +++ b/doc/html/fusion/functional/adapters/fused.html @@ -3,10 +3,10 @@ fused - + - - + + @@ -22,55 +22,61 @@
    PrevUpHomeNext
    -
    -

    -fused -

    -
    - - Description -
    +
    +
    +

    +fused +

    +
    +
    +
    + + Description +

    - An unary Polymorphic Function - Object adapter template for Deferred - Callable Object target functions. It takes a Forward + An unary Polymorphic Function + Object adapter template for Deferred + Callable Object target functions. It takes a Forward Sequence that contains the arguments for the target function.

    The type of the target function is allowed to be const qualified or a reference. Const qualification is preserved and propagated appropriately (in other - words, only const versions of operator() can be used + words, only const versions of operator() can be used for a target function object that is const or, if the target function object is held by value, the adapter is const - these semantics have nothing to do with the const qualification of a member function, which is referring - to the type of object pointed to by this which is specified + to the type of object pointed to by this which is specified with the first element in the sequence passed to the adapter).

    If the target function is a pointer to a class members, the corresponding object can be specified as a reference, pointer, or smart pointer. In case - of the latter, a freestanding get_pointer function must - be defined (Boost provides this function for std::auto_ptr - and boost::shared_ptr). + of the latter, a freestanding get_pointer function must + be defined (Boost provides this function for std::auto_ptr + and boost::shared_ptr).

    -
    - - Header -
    +
    + + Header +
    #include <boost/fusion/functional/adapter/fused.hpp>
     
    -
    - - Synopsis -
    +
    + + Synopsis +
    template <typename Function>
     class fused;
     
    -
    - - Template +
    + + Template parameters -
    +
    @@ -78,154 +84,131 @@ - - + - + +

    - - + - +

    +
    -

    +

    Parameter -

    -
    -

    +

    Description -

    -
    -

    +

    Default -

    -
    -

    - Function -

    -
    -

    - A Deferred +

    + Function +

    + A Deferred Callable Object -

    -
    -

    -

    -

    +

    -
    - - Model of -
    -
    - - Expression + + Expression Semantics
    make_fused_procedure(f);
     

    - Return type: A specialization of fused_procedure. + Return type: A specialization of fused_procedure.

    - Semantics: Returns a fused_procedure adapter for - f. + Semantics: Returns a fused_procedure adapter for + f.

    - - Header + + Header
    #include <boost/fusion/functional/generation/make_fused_procedure.hpp>
     #include <boost/fusion/include/make_fused_procedure.hpp>
     
    - - Example + + Example
    -
    vector<int,int,int> v(1,2,3);
    +
    vector<int,int,int> v(1,2,3);
     using namespace boost::lambda;
     make_fused_procedure(_1 += _2 - _3)(v);
    -assert(front(v) == 0);
    +assert(front(v) == 0);
     
    - - See + + See also
    - diff --git a/doc/html/fusion/functional/generation/functions/mk_unfused.html b/doc/html/fusion/functional/generation/functions/mk_unfused.html index a048845a..ee7de825 100644 --- a/doc/html/fusion/functional/generation/functions/mk_unfused.html +++ b/doc/html/fusion/functional/generation/functions/mk_unfused.html @@ -1,12 +1,14 @@ -make_unfused + + make_unfused - + - + @@ -22,32 +24,38 @@
    PrevUpHomeNext
    -
    -
    - - Description + + Description

    - Creates a unfused adapter for a given, - unary Polymorphic Function - Object. The usual element + Creates a unfused adapter for a given, + unary Polymorphic Function + Object. The usual element conversion is applied to the target function.

    - - Synopsis + + Synopsis
    template <typename F>
    -inline typename make_unfused<F>::type
    +inline typename make_unfused<F>::type
     make_unfused(F const & f);
     
    - - Parameters + + Parameters
    @@ -56,64 +64,53 @@ - - + - + +

    - - + - + +

    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - f -

    -
    -

    - Model of Polymorphic +

    + f +

    + Model of Polymorphic Function Object -

    -
    -

    +

    The function to transform. -

    -
    - - Expression + + Expression Semantics
    make_unfused(f);
     

    - Return type: A specialization of unfused. + Return type: A specialization of unfused.

    - Semantics: Returns a unfused adapter for f. + Semantics: Returns a unfused adapter for f.

    - - Header + + Header
    #include <boost/fusion/functional/generation/make_unfused.hpp>
     #include <boost/fusion/include/make_unfused.hpp>
     
    - - Example + + Example
    struct fused_incrementer
     {
    @@ -126,7 +123,7 @@
         template <class Seq>
         void operator()(Seq const & s) const
         {
    -        for_each(s,++boost::lambda::_1);
    +        for_each(s,++boost::lambda::_1);
         }
     };
     
    @@ -138,14 +135,15 @@
     }
     
    - - See + + See also
    - diff --git a/doc/html/fusion/functional/generation/metafunctions.html b/doc/html/fusion/functional/generation/metafunctions.html index 8c20672d..5e91f690 100644 --- a/doc/html/fusion/functional/generation/metafunctions.html +++ b/doc/html/fusion/functional/generation/metafunctions.html @@ -3,11 +3,13 @@ Metafunctions - + - - + +
    @@ -22,10 +24,13 @@
    PrevUpHomeNext
    -
    - +
    +
    + +
    +
    make_fused
    diff --git a/doc/html/fusion/functional/generation/metafunctions/mk_fused.html b/doc/html/fusion/functional/generation/metafunctions/mk_fused.html index e0b4125d..990f1691 100644 --- a/doc/html/fusion/functional/generation/metafunctions/mk_fused.html +++ b/doc/html/fusion/functional/generation/metafunctions/mk_fused.html @@ -1,13 +1,15 @@ -make_fused + + make_fused - + - - + +
    @@ -22,28 +24,33 @@
    PrevUpHomeNext
    -
    -
    - - Description + + Description

    - Returns the result type of make_fused. + Returns the result type of make_fused.

    - - Header + + Header
    #include <boost/fusion/functional/generation/make_fused.hpp>
     #include <boost/fusion/include/make_fused.hpp>
     
    - - Synopsis + + Synopsis
    namespace result_of
     {
    @@ -55,11 +62,12 @@
     }
     
    - - See + + See also
    - +
    diff --git a/doc/html/fusion/functional/generation/metafunctions/mk_fused_fobj.html b/doc/html/fusion/functional/generation/metafunctions/mk_fused_fobj.html index 94c70f83..0e7413bd 100644 --- a/doc/html/fusion/functional/generation/metafunctions/mk_fused_fobj.html +++ b/doc/html/fusion/functional/generation/metafunctions/mk_fused_fobj.html @@ -1,13 +1,16 @@ -make_fused_function_object + + make_fused_function_object - + - - + +
    @@ -22,28 +25,33 @@
    PrevUpHomeNext
    -
    -
    - - Description + + Description

    - Returns the result type of make_fused_function_object. + Returns the result type of make_fused_function_object.

    - - Header + + Header
    #include <boost/fusion/functional/generation/make_fused_function_object.hpp>
     #include <boost/fusion/include/make_fused_function_object.hpp>
     
    - - Synopsis + + Synopsis
    namespace result_of
     {
    @@ -55,11 +63,12 @@
     }
     
    - - See + + See also
    - +
    diff --git a/doc/html/fusion/functional/generation/metafunctions/mk_fused_proc.html b/doc/html/fusion/functional/generation/metafunctions/mk_fused_proc.html index 3d1e02bb..3b31682a 100644 --- a/doc/html/fusion/functional/generation/metafunctions/mk_fused_proc.html +++ b/doc/html/fusion/functional/generation/metafunctions/mk_fused_proc.html @@ -1,13 +1,16 @@ -make_fused_procedure + + make_fused_procedure - + - - + +
    @@ -22,28 +25,33 @@
    PrevUpHomeNext
    -
    -
    - - Description + + Description

    - Returns the result type of make_fused_procedure. + Returns the result type of make_fused_procedure.

    - - Header + + Header
    #include <boost/fusion/functional/generation/make_fused_procedure.hpp>
     #include <boost/fusion/include/make_fused_procedure.hpp>
     
    - - Synopsis + + Synopsis
    namespace result_of
     {
    @@ -55,11 +63,12 @@
     }
     
    - - See + + See also
    - +
    diff --git a/doc/html/fusion/functional/generation/metafunctions/mk_unfused.html b/doc/html/fusion/functional/generation/metafunctions/mk_unfused.html index d35c2ddc..f005d8ab 100644 --- a/doc/html/fusion/functional/generation/metafunctions/mk_unfused.html +++ b/doc/html/fusion/functional/generation/metafunctions/mk_unfused.html @@ -1,12 +1,14 @@ -make_unfused + + make_unfused - + - + @@ -22,28 +24,33 @@
    PrevUpHomeNext
    -
    -
    - - Description + + Description

    - Returns the result type of make_unfused. + Returns the result type of make_unfused.

    - - Header + + Header
    #include <boost/fusion/functional/generation/make_unfused.hpp>
     #include <boost/fusion/include/make_unfused.hpp>
     
    - - Synopsis + + Synopsis
    namespace result_of
     {
    @@ -55,11 +62,12 @@
     }
     
    - - See + + See also
    - +
    diff --git a/doc/html/fusion/functional/invocation.html b/doc/html/fusion/functional/invocation.html index 6a2c639e..57b36bfe 100644 --- a/doc/html/fusion/functional/invocation.html +++ b/doc/html/fusion/functional/invocation.html @@ -3,10 +3,11 @@ Invocation - + - + @@ -22,10 +23,13 @@
    PrevUpHomeNext
    -
    - +
    +
    + +
    +
    Functions
    Metafunctions
    diff --git a/doc/html/fusion/functional/invocation/functions.html b/doc/html/fusion/functional/invocation/functions.html index b67a0d39..de44d69e 100644 --- a/doc/html/fusion/functional/invocation/functions.html +++ b/doc/html/fusion/functional/invocation/functions.html @@ -3,10 +3,10 @@ Functions - + - + @@ -22,10 +22,13 @@
    PrevUpHomeNext
    -
    @@ -22,17 +23,21 @@ -
    -
    -invoke -
    +
    +
    +
    +invoke +
    +
    +
    - - Description + + Description

    - Calls a Deferred - Callable Object with the arguments from a Sequence. + Calls a Deferred + Callable Object with the arguments from a Sequence.

    The first template parameter can be specialized explicitly to avoid copying @@ -41,34 +46,34 @@

    If the target function is a pointer to a class members, the corresponding object can be specified as a reference, pointer, or smart pointer. In - case of the latter, a freestanding get_pointer function - must be defined (Boost provides this function for std::auto_ptr - and boost::shared_ptr). + case of the latter, a freestanding get_pointer function + must be defined (Boost provides this function for std::auto_ptr + and boost::shared_ptr).

    Constructors can be called applying Boost.Functional/Factory.

    - - Synopsis + + Synopsis
    template<
         typename Function,
         class Sequence
         >
    -typename result_of::invoke<Function, Sequence>::type
    +typename result_of::invoke<Function, Sequence>::type
     invoke(Function f, Sequence & s);
     
     template<
         typename Function,
         class Sequence
         >
    -typename result_of::invoke<Function, Sequence const>::type
    +typename result_of::invoke<Function, Sequence const>::type
     invoke(Function f, Sequence const & s);
     
    - - Parameters + + Parameters
    @@ -77,101 +82,88 @@ - - + - + +

    - - + - + +

    - - + - + +

    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - f -

    -
    -

    - A Deferred +

    + f +

    + A Deferred Callable Object -

    -
    -

    +

    The function to call. -

    -
    -

    - s -

    -
    -

    - A Forward +

    + s +

    + A Forward Sequence -

    -
    -

    +

    The arguments. -

    -
    - - Expression + + Expression Semantics
    invoke(f,s);
     

    - Return type: Return type of f when invoked with the elements in - s as its arguments. + Return type: Return type of f when invoked with the elements in + s as its arguments.

    - Semantics: Invokes f - with the elements in s + Semantics: Invokes f + with the elements in s as arguments and returns the result of the call expression.

    - - Header + + Header
    #include <boost/fusion/functional/invocation/invoke.hpp>
     
    - - Example + + Example
    -
    std::plus<int> add;
    -assert(invoke(add,make_vector(1,1)) == 2);
    +
    std::plus<int> add;
    +assert(invoke(add,make_vector(1,1)) == 2);
     
    - - See + + See also
    - diff --git a/doc/html/fusion/functional/invocation/functions/invoke_fobj.html b/doc/html/fusion/functional/invocation/functions/invoke_fobj.html index ff2e8ed6..2ef57612 100644 --- a/doc/html/fusion/functional/invocation/functions/invoke_fobj.html +++ b/doc/html/fusion/functional/invocation/functions/invoke_fobj.html @@ -1,12 +1,14 @@ -invoke_function_object + + invoke_function_object - + - + @@ -22,18 +24,23 @@
    PrevUpHomeNext
    -
    -
    - - Description + + Description

    - Calls a Polymorphic Function - Object with the arguments from a Sequence. + Calls a Polymorphic Function + Object with the arguments from a Sequence.

    The first template parameter can be specialized explicitly to avoid copying @@ -43,26 +50,28 @@ Constructors can be called applying Boost.Functional/Factory.

    - - Synopsis + + Synopsis
    template<
         typename Function,
         class Sequence
         >
    -typename result_of::invoke_function_object<Function, Sequence>::type
    +typename result_of::invoke_function_object<Function, Sequence>::type
     invoke_function_object(Function f, Sequence & s);
     
     template<
         typename Function,
         class Sequence
         >
    -typename result_of::invoke_function_object<Function, Sequence const>::type
    +typename result_of::invoke_function_object<Function, Sequence const>::type
     invoke_function_object(Function f, Sequence const & s);
     
    - - Parameters + + Parameters
    @@ -71,86 +80,70 @@ - - + - + +

    - - + - + +

    - - + - + +

    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - f -

    -
    -

    - Model of Polymorphic +

    + f +

    + Model of Polymorphic Function Object -

    -
    -

    +

    The function object to call. -

    -
    -

    - s -

    -
    -

    - Model of Forward +

    + s +

    + Model of Forward Sequence -

    -
    -

    +

    The arguments. -

    -
    - - Expression + + Expression Semantics
    invoke_function_object(f,s);
     

    - Return type: Return type of f when invoked with the elements in - s as its arguments. + Return type: Return type of f when invoked with the elements in + s as its arguments.

    - Semantics: Invokes f - with the elements in s + Semantics: Invokes f + with the elements in s as arguments and returns the result of the call expression.

    - - Header + + Header
    #include <boost/fusion/functional/invocation/invoke_function_object.hpp>
     
    - - Example + + Example
    struct sub
     {
    @@ -171,20 +164,23 @@
     void try_it()
     {
         sub f;
    -    assert(f(2,1) == invoke_function_object(f,make_vector(2,1)));
    +    assert(f(2,1) == invoke_function_object(f,make_vector(2,1)));
     }
     
    - - See + + See also
    - diff --git a/doc/html/fusion/functional/invocation/functions/invoke_proc.html b/doc/html/fusion/functional/invocation/functions/invoke_proc.html index 22821053..a76d070e 100644 --- a/doc/html/fusion/functional/invocation/functions/invoke_proc.html +++ b/doc/html/fusion/functional/invocation/functions/invoke_proc.html @@ -1,13 +1,15 @@ -invoke_procedure + + invoke_procedure - + - - + +
    @@ -22,18 +24,22 @@
    PrevUpHomeNext
    -
    -
    - - Description + + Description

    - Calls a Callable - Object with the arguments from a Sequence. + Calls a Callable + Object with the arguments from a Sequence. The result of the call is ignored.

    @@ -43,8 +49,8 @@

    For pointers to class members corresponding object can be specified as a reference, pointer, or smart pointer. In case of the latter, a freestanding - get_pointer function must be defined (Boost provides - this function for std::auto_ptr and boost::shared_ptr). + get_pointer function must be defined (Boost provides + this function for std::auto_ptr and boost::shared_ptr).

    The target function must not be a pointer to a member object (dereferencing @@ -52,26 +58,28 @@ isn't implemented).

    - - Synopsis + + Synopsis
    template<
         typename Function,
         class Sequence
         >
    -typename result_of::invoke_procedure<Function, Sequence>::type
    +typename result_of::invoke_procedure<Function, Sequence>::type
     invoke_procedure(Function f, Sequence & s);
     
     template<
         typename Function,
         class Sequence
         >
    -typename result_of::invoke_procedure<Function, Sequence const>::type
    +typename result_of::invoke_procedure<Function, Sequence const>::type
     invoke_procedure(Function f, Sequence const & s);
     
    - - Parameters + + Parameters
    @@ -80,102 +88,88 @@ - - + - + +

    - - + - + +

    - - + - + +

    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - f -

    -
    -

    - Model of Callable +

    + f +

    + Model of Callable Object -

    -
    -

    +

    The function to call. -

    -
    -

    - s -

    -
    -

    - Model of Forward +

    + s +

    + Model of Forward Sequence -

    -
    -

    +

    The arguments. -

    -
    - - Expression + + Expression Semantics
    invoke_procedure(f,s);
     

    - Return type: void + Return type: void

    - Semantics: Invokes f - with the elements in s + Semantics: Invokes f + with the elements in s as arguments.

    - - Header + + Header
    #include <booost/fusion/functional/invocation/invoke_procedure.hpp>
     
    - - Example + + Example
    -
    vector<int,int> v(1,2);
    +
    vector<int,int> v(1,2);
     using namespace boost::lambda;
     invoke_procedure(_1 += _2, v);
    -assert(front(v) == 3);
    +assert(front(v) == 3);
     
    - - See + + See also
    - diff --git a/doc/html/fusion/functional/invocation/limits.html b/doc/html/fusion/functional/invocation/limits.html index 35c77925..e7acd676 100644 --- a/doc/html/fusion/functional/invocation/limits.html +++ b/doc/html/fusion/functional/invocation/limits.html @@ -3,11 +3,12 @@ Limits - + - - + +
    @@ -22,32 +23,35 @@
    PrevUpHomeNext
    -
    -

    -Limits -

    -
    - - Header -
    +
    +
    +

    +Limits +

    +
    +
    +
    + + Header +
    #include <boost/fusion/functional/invocation/limits.hpp>
     
    -
    - - Macros -
    +
    + + Macros +

    The following macros can be defined to change the maximum arity. The default is 6.

    -
    @@ -22,20 +23,23 @@ -
    -
    -invoke -
    +
    +
    +
    +invoke +
    +
    +
    - - Description + + Description

    - Returns the result type of invoke. + Returns the result type of invoke.

    - - Synopsis + + Synopsis
    namespace result_of
     {
    @@ -50,13 +54,13 @@
     }
     
    - - See + + See also
    -
    diff --git a/doc/html/fusion/functional/invocation/metafunctions/invoke_fobj.html b/doc/html/fusion/functional/invocation/metafunctions/invoke_fobj.html index 2ea6cdfb..dd615fe4 100644 --- a/doc/html/fusion/functional/invocation/metafunctions/invoke_fobj.html +++ b/doc/html/fusion/functional/invocation/metafunctions/invoke_fobj.html @@ -1,12 +1,14 @@ -invoke_function_object + + invoke_function_object - + - + @@ -22,21 +24,26 @@
    PrevUpHomeNext
    -
    -
    - - Description + + Description

    - Returns the result type of invoke_function_object. + Returns the result type of invoke_function_object.

    - - Synopsis + + Synopsis
    namespace result_of
     {
    @@ -51,13 +58,14 @@
     }
     
    - - See + + See also
    -
    diff --git a/doc/html/fusion/functional/invocation/metafunctions/invoke_proc.html b/doc/html/fusion/functional/invocation/metafunctions/invoke_proc.html index b8db4987..e4d7a6e6 100644 --- a/doc/html/fusion/functional/invocation/metafunctions/invoke_proc.html +++ b/doc/html/fusion/functional/invocation/metafunctions/invoke_proc.html @@ -1,13 +1,15 @@ -invoke_procedure + + invoke_procedure - + - - + +
    @@ -22,21 +24,26 @@
    PrevUpHomeNext
    -
    -
    - - Description + + Description

    - Returns the result type of invoke_procedure. + Returns the result type of invoke_procedure.

    - - Synopsis + + Synopsis
    namespace result_of
     {
    @@ -51,13 +58,14 @@
     }
     
    - - See + + See also
    -
    diff --git a/doc/html/fusion/introduction.html b/doc/html/fusion/introduction.html index 8913f34b..6ddd26c0 100644 --- a/doc/html/fusion/introduction.html +++ b/doc/html/fusion/introduction.html @@ -3,10 +3,10 @@ Introduction - + - + @@ -22,17 +22,20 @@
    PrevUpHomeNext
    -
    - +
    +
    + +
    +

    An advantage other languages such as Python and Lisp/ Scheme, ML and Haskell, etc., over C++ is the ability to have heterogeneous containers that can hold arbitrary element types. All the containers in the standard library can only - hold a specific type. A vector<int> - can only hold ints. A list<X> can - only hold elements of type X, + hold a specific type. A vector<int> + can only hold ints. A list<X> can + only hold elements of type X, and so on.

    @@ -42,8 +45,8 @@ on virtual functions to provide polymorphic behavior since the actual type is erased as soon as you store a pointer to a derived class to a pointer to its base. The held objects must be related: you cannot hold objects of unrelated - types such as char, int, class - X, float, + types such as char, int, class + X, float, etc. Oh sure you can use something like Boost.Any to hold arbitrary types, but then you pay more in terms of runtime costs and due to the fact that you practically erased all type information, you'll have @@ -52,7 +55,7 @@

    The Boost.Tuple library written by Jaakko - Jarvi provides heterogeneous containers in C++. The tuple + Jarvi provides heterogeneous containers in C++. The tuple is a basic data structure that can hold heterogeneous types. It's a good first step, but it's not complete. What's missing are the algorithms. It's nice that we can store and retrieve data to and from tuples, pass them around as arguments @@ -90,23 +93,23 @@ fusion algorithms are functional in nature such that algorithms are non mutating (no side effects). However, due to the high cost of returning full sequences such as vectors and lists, Views are returned from Fusion - algorithms instead. For example, the transform algorithm does not actually - return a transformed version of the original sequence. transform returns a transform_view. This view holds a + algorithms instead. For example, the transform algorithm does not actually + return a transformed version of the original sequence. transform returns a transform_view. This view holds a reference to the original sequence plus the transform function. Iteration over - the transform_view + the transform_view will apply the transform function over the sequence elements on demand. This lazy evaluation scheme allows us to chain as many algorithms as we want without incurring a high runtime penalty.

    The lazy evaluation scheme where algorithms return views - allows operations such as push_back to be totally generic. In - Fusion, push_back is actually a generic algorithm - that works on all sequences. Given an input sequence s - and a value x, Fusion's push_back algorithm simply returns - a joint_view: - a view that holds a reference to the original sequence s - and the value x. Functions + allows operations such as push_back to be totally generic. In + Fusion, push_back is actually a generic algorithm + that works on all sequences. Given an input sequence s + and a value x, Fusion's push_back algorithm simply returns + a joint_view: + a view that holds a reference to the original sequence s + and the value x. Functions that were once sequence specific and need to be implemented N times over N different sequences are now implemented only once.

    @@ -117,7 +120,7 @@ sequences are fully compatible with Fusion. You can work with Fusion sequences on MPL if you wish to work solely on types - [1] + [1] . In MPL, Fusion sequences follow MPL's sequence-type preserving semantics (i.e. algorithms preserve the original sequence @@ -132,10 +135,10 @@



    -

    [1] +

    [1] Choose MPL over fusion when doing pure type calculations. Once the static type calculation - is finished, you can instantiate a fusion sequence (see Conversion) + is finished, you can instantiate a fusion sequence (see Conversion) for the runtime part.

    diff --git a/doc/html/fusion/iterator.html b/doc/html/fusion/iterator.html index edbf22b2..c1fe41d3 100644 --- a/doc/html/fusion/iterator.html +++ b/doc/html/fusion/iterator.html @@ -3,10 +3,10 @@ Iterator - + - + @@ -22,10 +22,13 @@
    PrevUpHomeNext
    -
    - +
    +
    + +
    +
    Concepts
    @@ -72,12 +75,12 @@ iterators are a fundamental concept in Fusion. As with MPL and STL iterators describe positions, and provide access to data within an underlying - Sequence. + Sequence.

    -

    - - Header -

    +

    + + Header +

    #include <boost/fusion/iterator.hpp>
     #include <boost/fusion/include/iterator.hpp>
     
    diff --git a/doc/html/fusion/iterator/concepts.html b/doc/html/fusion/iterator/concepts.html index 6f521bd5..f128002f 100644 --- a/doc/html/fusion/iterator/concepts.html +++ b/doc/html/fusion/iterator/concepts.html @@ -3,11 +3,12 @@ Concepts - + - - + +
    @@ -22,10 +23,13 @@
    PrevUpHomeNext
    -
    - +
    +
    + +
    +
    Forward Iterator
    @@ -35,11 +39,16 @@ Access Iterator

    - Fusion iterators are divided into different traversal categories. Forward - Iterator is the most basic concept. Bidirectional - Iterator is a refinement of Forward - Iterator. Random - Access Iterator is a refinement of Bidirectional + Fusion iterators are divided into different traversal categories. Forward + Iterator is the most basic concept. Bidirectional + Iterator is a refinement of Forward + Iterator. Random + Access Iterator is a refinement of Bidirectional Iterator.

    diff --git a/doc/html/fusion/iterator/concepts/bidirectional_iterator.html b/doc/html/fusion/iterator/concepts/bidirectional_iterator.html index 981795fb..ec43505a 100644 --- a/doc/html/fusion/iterator/concepts/bidirectional_iterator.html +++ b/doc/html/fusion/iterator/concepts/bidirectional_iterator.html @@ -1,13 +1,16 @@ -Bidirectional Iterator +Bidirectional + Iterator - + - - + +
    @@ -22,56 +25,62 @@
    PrevUpHomeNext
    -
    - +
    + + Description +

    - A Bidirectional Iterator traverses a Sequence + A Bidirectional Iterator traverses a Sequence allowing movement in either direction one element at a time.

    -
    +

    Notation

    -
    i
    +
    i

    A Bidirectional Iterator

    -
    I
    +
    I

    A Bidirectional Iterator type

    -
    M
    +
    M

    An MPL integral constant

    -
    N
    +
    N

    An integral constant

    -
    - - Refinement +
    + + Refinement of -
    +

    - Forward Iterator + Forward Iterator

    -
    - - Expression +
    + + Expression requirements -
    +

    - In addition to the requirements defined in Forward + In addition to the requirements defined in Forward Iterator, the following expressions must be valid:

    @@ -81,140 +90,107 @@ - - + - + +

    - - + - + +

    - - + - + +

    - - + - + +

    - - + - + +

    -

    +

    Expression -

    -
    -

    +

    Return type -

    -
    -

    +

    Runtime Complexity -

    -
    -

    - next(i) -

    -
    -

    - Bidirectional +

    + next(i) +

    + Bidirectional Iterator -

    -
    -

    +

    Constant -

    -
    -

    - prior(i) -

    -
    -

    - Bidirectional +

    + prior(i) +

    + Bidirectional Iterator -

    -
    -

    +

    Constant -

    -
    -

    - advance_c<N>(i) -

    -
    -

    - Bidirectional +

    + advance_c<N>(i) +

    + Bidirectional Iterator -

    -
    -

    +

    Constant -

    -
    -

    - advance<M>(i) -

    -
    -

    - Bidirectional +

    + advance<M>(i) +

    + Bidirectional Iterator -

    -
    -

    +

    Constant -

    -
    -
    - - Meta +
    + + Meta Expressions -
    +
    - - + +

    - - + +

    -

    +

    Expression -

    -
    -

    +

    Compile Time Complexity -

    -
    -

    - result_of::prior<I>::type -

    -
    -

    +

    + result_of::prior<I>::type +

    Amortized constant time -

    -
    -
    - - Expression +
    + + Expression Semantics -
    +

    The semantics of an expression are defined only where they differ from, - or are not defined in Forward + or are not defined in Forward Iterator

    @@ -223,74 +199,69 @@ - - + +

    - - + +
    -

    +

    Expression -

    -
    -

    +

    Semantics -

    -
    -

    - prior(i) -

    -
    -

    - An iterator to the element preceding i -

    -

    + prior(i) +

    + An iterator to the element preceding i +

    -
    - - Invariants -
    +
    + + Invariants +

    - In addition to the invariants of Forward + In addition to the invariants of Forward Iterator, the following invariants always hold:

    -
    -
    - - Meta +
    + + Meta Expressions -
    +
    - - + +

    - - + +

    - - + +

    - - + +

    - - + +

    - - + +

    - - + +

    - - + +

    -

    +

    Expression -

    -
    -

    +

    Compile Time Complexity -

    -
    -

    - result_of::next<I>::type -

    -
    -

    +

    + result_of::next<I>::type +

    Amortized constant time -

    -
    -

    - result_of::equal_to<I, - J>::type -

    -
    -

    +

    + result_of::equal_to<I, + J>::type +

    Amortized constant time -

    -
    -

    - result_of::advance_c<I, - N>::type -

    -
    -

    +

    + result_of::advance_c<I, + N>::type +

    Linear -

    -
    -

    - result_of::advance<I ,M>::type -

    -
    -

    +

    + result_of::advance<I ,M>::type +

    Linear -

    -
    -

    - result_of::distance<I ,J>::type -

    -
    -

    +

    + result_of::distance<I ,J>::type +

    Linear -

    -
    -

    - result_of::deref<I>::type -

    -
    -

    +

    + result_of::deref<I>::type +

    Amortized constant time -

    -
    -

    - result_of::value_of<I>::type -

    -
    -

    +

    + result_of::value_of<I>::type +

    Amortized constant time -

    -
    -
    - - Expression +
    + + Expression Semantics -
    +
    - - + +

    - - + + - - + +

    - - + +

    - - + +

    - - + + - - + + - - + + - - + +
    -

    +

    Expression -

    -
    -

    +

    Semantics -

    -
    -

    - next(i) -

    -
    -

    - An iterator to the element following i -

    -

    + next(i) +

    + An iterator to the element following i +

    -

    - i == - j -

    -
    -

    +

    + i == + j +

    Iterator equality comparison -

    -
    -

    - i != - j -

    -
    -

    +

    + i != + j +

    Iterator inequality comparison -

    -
    -

    - advance_c<N>(i) -

    -
    -

    - An iterator n elements after i +

    + advance_c<N>(i) +

    + An iterator n elements after i in the sequence -

    -
    -

    - advance<M>(i) -

    -
    -

    - Equivalent to advance_c<M::value>(i) -

    -

    + advance<M>(i) +

    + Equivalent to advance_c<M::value>(i) +

    -

    - distance(i, - j) -

    -
    -

    - The number of elements between i - and j -

    -

    + distance(i, + j) +

    + The number of elements between i + and j +

    -

    - deref(i) -

    -
    -

    - The element at positioni -

    -

    + deref(i) +

    + The element at positioni +

    -

    - *i -

    -
    -

    - Equivalent to deref(i) -

    -

    + *i +

    + Equivalent to deref(i) +

    -
    - - Invariants -
    +
    + + Invariants +

    The following invariants always hold:

    -
    diff --git a/doc/html/fusion/iterator/functions/next.html b/doc/html/fusion/iterator/functions/next.html index a6c19e9d..cbae5a92 100644 --- a/doc/html/fusion/iterator/functions/next.html +++ b/doc/html/fusion/iterator/functions/next.html @@ -3,10 +3,10 @@ next - + - + @@ -22,103 +22,95 @@
    PrevUpHomeNext
    -
    -

    -next -

    -
    - - Description -
    +
    +
    +

    +next +

    +
    +
    +
    + + Description +

    Moves an iterator 1 position forwards.

    -
    - - Synopsis -
    +
    + + Synopsis +
    template<
         typename I
         >
    -typename result_of::next<I>::type next(I const& i);
    +typename result_of::next<I>::type next(I const& i);
     
    -

    Table 1.3. Parameters

    -
    +

    Table 1.3. Parameters

    +
    - - + - + +

    - - + - + +

    -
    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - i -

    -
    -

    - Model of Forward +

    + i +

    + Model of Forward Iterator -

    -
    -

    +

    Operation's argument -

    -
    +
    -
    - - Expression +
    + + Expression Semantics -
    +
    next(i);
     

    - Return type: A model of the same iterator - concept as i. + Return type: A model of the same iterator + concept as i.

    - Semantics: Returns an iterator to the - next element after i. + Semantics: Returns an iterator to the + next element after i.

    -
    - - Header -
    +
    + + Header +
    #include <boost/fusion/iterator/next.hpp>
     #include <boost/fusion/include/next.hpp>
     
    -
    - - Example -
    -
    typedef vector<int,int,int> vec;
    +
    + + Example +
    +
    typedef vector<int,int,int> vec;
     
     vec v(1,2,3);
    -assert(deref(begin(v)) == 1);
    -assert(deref(next(begin(v))) == 2);
    -assert(deref(next(next(begin(v)))) == 3);
    +assert(deref(begin(v)) == 1);
    +assert(deref(next(begin(v))) == 2);
    +assert(deref(next(next(begin(v)))) == 3);
     
    diff --git a/doc/html/fusion/iterator/functions/prior.html b/doc/html/fusion/iterator/functions/prior.html index a1794c6b..82538126 100644 --- a/doc/html/fusion/iterator/functions/prior.html +++ b/doc/html/fusion/iterator/functions/prior.html @@ -3,10 +3,10 @@ prior - + - + @@ -22,102 +22,94 @@
    PrevUpHomeNext
    -
    -

    -prior -

    -
    - - Description -
    +
    +
    +

    +prior +

    +
    +
    +
    + + Description +

    Moves an iterator 1 position backwards.

    -
    - - Synopsis -
    +
    + + Synopsis +
    template<
         typename I
         >
    -typename result_of::prior<I>::type prior(I const& i);
    +typename result_of::prior<I>::type prior(I const& i);
     
    -

    Table 1.4. Parameters

    -
    +

    Table 1.4. Parameters

    +
    - - + - + +

    - - + - + +

    -
    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - i -

    -
    -

    - Model of Bidirectional +

    + i +

    + Model of Bidirectional Iterator -

    -
    -

    +

    Operation's argument -

    -
    +
    -
    - - Expression +
    + + Expression Semantics -
    -
    prior(i);
    +        
    +
    prior(i);
     

    - Return type: A model of the same iterator - concept as i. + Return type: A model of the same iterator + concept as i.

    - Semantics: Returns an iterator to the - element prior to i. + Semantics: Returns an iterator to the + element prior to i.

    -
    - - Header -
    +
    + + Header +
    #include <boost/fusion/iterator/prior.hpp>
     #include <boost/fusion/include/prior.hpp>
     
    -
    - - Example -
    -
    typedef vector<int,int> vec;
    +
    + + Example +
    +
    typedef vector<int,int> vec;
     
     vec v(1,2);
    -assert(deref(next(begin(v))) == 2);
    -assert(deref(prior(next(begin(v)))) == 1);
    +assert(deref(next(begin(v))) == 2);
    +assert(deref(prior(next(begin(v)))) == 1);
     
    diff --git a/doc/html/fusion/iterator/metafunctions.html b/doc/html/fusion/iterator/metafunctions.html index be481821..8d1fb1fd 100644 --- a/doc/html/fusion/iterator/metafunctions.html +++ b/doc/html/fusion/iterator/metafunctions.html @@ -3,10 +3,11 @@ Metafunctions - + - + @@ -22,10 +23,13 @@
    PrevUpHomeNext
    -
    - +
    +
    + +
    +
    value_of
    deref
    diff --git a/doc/html/fusion/iterator/metafunctions/advance.html b/doc/html/fusion/iterator/metafunctions/advance.html index 83f9fcdc..1ba7988b 100644 --- a/doc/html/fusion/iterator/metafunctions/advance.html +++ b/doc/html/fusion/iterator/metafunctions/advance.html @@ -3,10 +3,10 @@ advance - + - + @@ -22,21 +22,24 @@
    PrevUpHomeNext
    -
    - -
    - - Description -
    +
    +
    + +
    +
    +
    + + Description +

    Moves an iterator a specified distance.

    -
    - - Synopsis -
    +
    + + Synopsis +
    template<
         typename I,
         typename M
    @@ -47,105 +50,89 @@
     };
     
    -

    Table 1.17. Parameters

    -
    +

    Table 1.17. Parameters

    +
    - - + - + +

    - - + - + +

    - - + - + +

    -
    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - I -

    -
    -

    - Model of Forward +

    + I +

    + Model of Forward Iterator -

    -
    -

    +

    Iterator to move relative to -

    -
    -

    - M -

    -
    -

    +

    + M +

    Model of MPL Integral Constant -

    -
    -

    +

    Number of positions to move -

    -
    +
    -
    - - Expression +
    + + Expression Semantics -
    -
    result_of::advance<I,M>::type
    +        
    +
    result_of::advance<I,M>::type
     

    - Return type: A model of the same iterator - concept as I. + Return type: A model of the same iterator + concept as I.

    - Semantics: Returns an iterator a distance - M from I. - If I is a Bidirectional - Iterator then M + Semantics: Returns an iterator a distance + M from I. + If I is a Bidirectional + Iterator then M may be negative.

    -
    - - Header -
    +
    + + Header +
    #include <boost/fusion/iterator/advance.hpp>
     #include <boost/fusion/include/advance.hpp>
     
    -
    - - Example -
    -
    typedef vector<int,double,char> vec;
    -typedef result_of::begin<vec>::type first;
    -typedef result_of::next<first>::type second;
    -typedef result_of::next<second>::type third;
    +
    + + Example +
    +
    typedef vector<int,double,char> vec;
    +typedef result_of::begin<vec>::type first;
    +typedef result_of::next<first>::type second;
    +typedef result_of::next<second>::type third;
     
    -BOOST_MPL_ASSERT((result_of::equal_to<result_of::advance<first, boost::mpl::int_<2> >::type, third>));
    +BOOST_MPL_ASSERT((result_of::equal_to<result_of::advance<first, boost::mpl::int_<2> >::type, third>));
     
    diff --git a/doc/html/fusion/iterator/metafunctions/advance_c.html b/doc/html/fusion/iterator/metafunctions/advance_c.html index f2c47ebc..b2812187 100644 --- a/doc/html/fusion/iterator/metafunctions/advance_c.html +++ b/doc/html/fusion/iterator/metafunctions/advance_c.html @@ -3,10 +3,10 @@ advance_c - + - + @@ -22,21 +22,24 @@
    PrevUpHomeNext
    -
    - -
    - - Description -
    +
    +
    + +
    +
    +
    + + Description +

    Moves an iterator by a specified distance.

    -
    - - Synopsis -
    +
    + + Synopsis +
    template<
         typename I,
         int N
    @@ -47,104 +50,88 @@
     };
     
    -

    Table 1.18. Parameters

    -
    +

    Table 1.18. Parameters

    +
    - - + - + +

    - - + - + +

    - - + - + +

    -
    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - I -

    -
    -

    - Model of Forward +

    + I +

    + Model of Forward Iterator -

    -
    -

    +

    Iterator to move relative to -

    -
    -

    - N -

    -
    -

    +

    + N +

    Integer constant -

    -
    -

    +

    Number of positions to move -

    -
    +
    -
    - - Expression +
    + + Expression Semantics -
    -
    result_of::advance_c<I, N>::type
    +        
    +
    result_of::advance_c<I, N>::type
     

    - Return type: A model of the same iterator - concept as I. + Return type: A model of the same iterator + concept as I.

    - Semantics: Returns an iterator a distance - N from I. - If I is a Bidirectional - Iterator then N - may be negative. Equivalent to result_of::advance<I, boost::mpl::int_<N> >::type. + Semantics: Returns an iterator a distance + N from I. + If I is a Bidirectional + Iterator then N + may be negative. Equivalent to result_of::advance<I, boost::mpl::int_<N> >::type.

    -
    - - Header -
    +
    + + Header +
    #include <boost/fusion/iterator/advance.hpp>
     #include <boost/fusion/include/advance.hpp>
     
    -
    - - Example -
    -
    typedef vector<int,double,char> vec;
    -typedef result_of::begin<vec>::type first;
    -typedef result_of::next<first>::type second;
    -typedef result_of::next<second>::type third;
    +
    + + Example +
    +
    typedef vector<int,double,char> vec;
    +typedef result_of::begin<vec>::type first;
    +typedef result_of::next<first>::type second;
    +typedef result_of::next<second>::type third;
     
    -BOOST_MPL_ASSERT((result_of::equal_to<result_of::advance_c<first, 2>::type, third>));
    +BOOST_MPL_ASSERT((result_of::equal_to<result_of::advance_c<first, 2>::type, third>));
     
    diff --git a/doc/html/fusion/iterator/metafunctions/deref.html b/doc/html/fusion/iterator/metafunctions/deref.html index 00b759df..51c2b998 100644 --- a/doc/html/fusion/iterator/metafunctions/deref.html +++ b/doc/html/fusion/iterator/metafunctions/deref.html @@ -3,10 +3,10 @@ deref - + - + @@ -22,21 +22,24 @@
    PrevUpHomeNext
    -
    -

    -deref -

    -
    - - Description -
    +
    +
    +

    +deref +

    +
    +
    +
    + + Description +

    Returns the type that will be returned by dereferencing an iterator.

    -
    - - Synposis -
    +
    + + Synposis +
    template<
         typename I
         >
    @@ -46,85 +49,74 @@
     };
     
    -

    Table 1.12. Parameters

    -
    +

    Table 1.12. Parameters

    +
    - - + - + +

    - - + - + +

    -
    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - I -

    -
    -

    - Model of Forward +

    + I +

    + Model of Forward Iterator -

    -
    -

    +

    Operation's argument -

    -
    +
    -
    - - Expression +
    + + Expression Semantics -
    -
    result_of::deref<I>::type
    +        
    +
    result_of::deref<I>::type
     

    - Return type: Any type + Return type: Any type

    - Semantics: Returns the result of dereferencing - an iterator of type I. + Semantics: Returns the result of dereferencing + an iterator of type I.

    -
    - - Header -
    +
    + + Header +
    #include <boost/fusion/iterator/deref.hpp>
     #include <boost/fusion/include/deref.hpp>
     
    -
    - - Example -
    -
    typedef vector<int,int&> vec;
    +
    + + Example +
    +
    typedef vector<int,int&> vec;
     typedef const vec const_vec;
    -typedef result_of::begin<vec>::type first;
    -typedef result_of::next<first>::type second;
    +typedef result_of::begin<vec>::type first;
    +typedef result_of::next<first>::type second;
     
    -typedef result_of::begin<const_vec>::type const_first;
    -typedef result_of::next<const_first>::type const_second;
    +typedef result_of::begin<const_vec>::type const_first;
    +typedef result_of::next<const_first>::type const_second;
     
    -BOOST_MPL_ASSERT((boost::is_same<result_of::deref<first>::type, int&>));
    -BOOST_MPL_ASSERT((boost::is_same<result_of::deref<second>::type, int&>));
    +BOOST_MPL_ASSERT((boost::is_same<result_of::deref<first>::type, int&>));
    +BOOST_MPL_ASSERT((boost::is_same<result_of::deref<second>::type, int&>));
     
    diff --git a/doc/html/fusion/iterator/metafunctions/distance.html b/doc/html/fusion/iterator/metafunctions/distance.html index 31b11479..6d070176 100644 --- a/doc/html/fusion/iterator/metafunctions/distance.html +++ b/doc/html/fusion/iterator/metafunctions/distance.html @@ -3,10 +3,10 @@ distance - + - + @@ -22,21 +22,24 @@
    PrevUpHomeNext
    -
    - -
    - - Description -
    +
    +
    + +
    +
    +
    + + Description +

    Returns the distance between two iterators.

    -
    - - Synopsis -
    +
    + + Synopsis +
    template<
         typename I,
         typename J
    @@ -47,82 +50,71 @@
     };
     
    -

    Table 1.16. Parameters

    -
    +

    Table 1.16. Parameters

    +
    - - + - + +

    - - + - + +

    -
    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - I, J -

    -
    -

    - Models of Forward +

    + I, J +

    + Models of Forward Iterator into the same sequence -

    -
    -

    +

    The start and end points of the distance to be measured -

    -
    +
    -
    - - Expression +
    + + Expression Semantics -
    -
    result_of::distance<I, J>::type
    +        
    +
    result_of::distance<I, J>::type
     

    - Return type: A model of MPL + Return type: A model of MPL Integral Constant.

    - Semantics: Returns the distance between - iterators of types I and - J. + Semantics: Returns the distance between + iterators of types I and + J.

    -
    - - Header -
    +
    + + Header +
    #include <boost/fusion/iterator/distance.hpp>
     #include <boost/fusion/include/distance.hpp>
     
    -
    - - Example -
    -
    typedef vector<int,double,char> vec;
    -typedef result_of::begin<vec>::type first;
    -typedef result_of::next<first>::type second;
    -typedef result_of::next<second>::type third;
    -typedef result_of::distance<first,third>::type dist;
    +
    + + Example +
    +
    typedef vector<int,double,char> vec;
    +typedef result_of::begin<vec>::type first;
    +typedef result_of::next<first>::type second;
    +typedef result_of::next<second>::type third;
    +typedef result_of::distance<first,third>::type dist;
     
     BOOST_MPL_ASSERT_RELATION(dist::value, ==, 2);
     
    diff --git a/doc/html/fusion/iterator/metafunctions/equal_to.html b/doc/html/fusion/iterator/metafunctions/equal_to.html index bf8a178a..419c5abc 100644 --- a/doc/html/fusion/iterator/metafunctions/equal_to.html +++ b/doc/html/fusion/iterator/metafunctions/equal_to.html @@ -3,10 +3,10 @@ equal_to - + - + @@ -22,23 +22,26 @@
    PrevUpHomeNext
    -
    - -
    - - Description -
    +
    +
    + +
    +
    +
    + + Description +

    Returns a true-valued MPL - Integral Constant if I - and J are equal. + Integral Constant if I + and J are equal.

    -
    - - Synopsis -
    +
    + + Synopsis +
    template<
         typename I,
         typename J
    @@ -49,81 +52,69 @@
     };
     
    -

    Table 1.15. Parameters

    -
    +

    Table 1.15. Parameters

    +
    - - + - + +

    - - + - + +

    -
    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - I, J -

    -
    -

    +

    + I, J +

    Any fusion iterators -

    -
    -

    +

    Operation's arguments -

    -
    +
    -
    - - Expression +
    + + Expression Semantics -
    -
    result_of::equal_to<I, J>::type
    +        
    +
    result_of::equal_to<I, J>::type
     

    - Return type: A model of MPL + Return type: A model of MPL Integral Constant.

    - Semantics: Returns boost::mpl::true_ - if I and J are iterators to the same position. - Returns boost::mpl::false_ otherwise. + Semantics: Returns boost::mpl::true_ + if I and J are iterators to the same position. + Returns boost::mpl::false_ otherwise.

    -
    - - Header -
    +
    + + Header +
    #include <boost/fusion/iterator/equal_to.hpp>
     #include <boost/fusion/include/equal_to.hpp>
     
    -
    - - Example -
    -
    typedef vector<int,double> vec;
    -typedef result_of::begin<vec>::type first;
    -typedef result_of::end<vec>::type last;
    -BOOST_MPL_ASSERT((result_of::equal_to<first, first>));
    -BOOST_MPL_ASSERT_NOT((result_of::equal_to<first,last>));
    +
    + + Example +
    +
    typedef vector<int,double> vec;
    +typedef result_of::begin<vec>::type first;
    +typedef result_of::end<vec>::type last;
    +BOOST_MPL_ASSERT((result_of::equal_to<first, first>));
    +BOOST_MPL_ASSERT_NOT((result_of::equal_to<first,last>));
     
    diff --git a/doc/html/fusion/iterator/metafunctions/next.html b/doc/html/fusion/iterator/metafunctions/next.html index 56e9d907..c5d8abf4 100644 --- a/doc/html/fusion/iterator/metafunctions/next.html +++ b/doc/html/fusion/iterator/metafunctions/next.html @@ -3,10 +3,10 @@ next - + - + @@ -22,21 +22,24 @@
    PrevUpHomeNext
    -
    -

    -next -

    -
    - - Description -
    +
    +
    +

    +next +

    +
    +
    +
    + + Description +

    Returns the type of the next iterator in a sequence.

    -
    - - Synposis -
    +
    + + Synposis +
    template<
         typename I
         >
    @@ -46,80 +49,69 @@
     };
     
    -

    Table 1.13. Parameters

    -
    +

    Table 1.13. Parameters

    +
    - - + - + +

    - - + - + +

    -
    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - I -

    -
    -

    - Model of Forward +

    + I +

    + Model of Forward Iterator -

    -
    -

    +

    Operation's argument -

    -
    +
    -
    - - Expression +
    + + Expression Semantics -
    -
    result_of::next<I>::type
    +        
    +
    result_of::next<I>::type
     

    - Return type: A model of the same iterator - concept as I. + Return type: A model of the same iterator + concept as I.

    - Semantics: Returns an iterator to the - next element in the sequence after I. + Semantics: Returns an iterator to the + next element in the sequence after I.

    -
    - - Header -
    +
    + + Header +
    #include <boost/fusion/iterator/next.hpp>
     #include <boost/fusion/include/next.hpp>
     
    -
    - - Example -
    -
    typedef vector<int,double> vec;
    -typedef result_of::next<result_of::begin<vec>::type>::type second;
    +
    + + Example +
    +
    typedef vector<int,double> vec;
    +typedef result_of::next<result_of::begin<vec>::type>::type second;
     
    -BOOST_MPL_ASSERT((boost::is_same<result_of::value_of<second>::type, double>));
    +BOOST_MPL_ASSERT((boost::is_same<result_of::value_of<second>::type, double>));
     
    diff --git a/doc/html/fusion/iterator/metafunctions/prior.html b/doc/html/fusion/iterator/metafunctions/prior.html index 1ad91922..23b46481 100644 --- a/doc/html/fusion/iterator/metafunctions/prior.html +++ b/doc/html/fusion/iterator/metafunctions/prior.html @@ -3,10 +3,10 @@ prior - + - + @@ -22,21 +22,24 @@
    PrevUpHomeNext
    -
    -

    -prior -

    -
    - - Description -
    +
    +
    +

    +prior +

    +
    +
    +
    + + Description +

    Returns the type of the previous iterator in a sequence.

    -
    - - Synopsis -
    +
    + + Synopsis +
    template<
         typename I
         >
    @@ -46,83 +49,72 @@
     };
     
    -

    Table 1.14. Parameters

    -
    +

    Table 1.14. Parameters

    +
    - - + - + +

    - - + - + +

    -
    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - I -

    -
    -

    - Model of Bidirectional +

    + I +

    + Model of Bidirectional Iterator -

    -
    -

    +

    Operation's argument -

    -
    +
    -
    - - Expression +
    + + Expression Semantics -
    -
    result_of::prior<I>::type
    +        
    +
    result_of::prior<I>::type
     

    - Return type: A model of the same iterator - concept as I. + Return type: A model of the same iterator + concept as I.

    - Semantics: Returns an iterator to the - previous element in the sequence before I. + Semantics: Returns an iterator to the + previous element in the sequence before I.

    -
    - - Header -
    +
    + + Header +
    #include <boost/fusion/iterator/prior.hpp>
     #include <boost/fusion/include/prior.hpp>
     
    -
    - - Example -
    -
    typedef vector<int,double> vec;
    -typedef result_of::next<result_of::begin<vec>::type>::type second;
    +
    + + Example +
    +
    typedef vector<int,double> vec;
    +typedef result_of::next<result_of::begin<vec>::type>::type second;
     
    -BOOST_MPL_ASSERT((boost::is_same<result_of::value_of<second>::type, double>));
    +BOOST_MPL_ASSERT((boost::is_same<result_of::value_of<second>::type, double>));
     
    -typedef result_of::prior<second>::type first;
    -BOOST_MPL_ASSERT((boost::is_same<result_of::value_of<first>::type, int>));
    +typedef result_of::prior<second>::type first;
    +BOOST_MPL_ASSERT((boost::is_same<result_of::value_of<first>::type, int>));
     
    diff --git a/doc/html/fusion/iterator/metafunctions/value_of.html b/doc/html/fusion/iterator/metafunctions/value_of.html index a9611130..18d8d8a1 100644 --- a/doc/html/fusion/iterator/metafunctions/value_of.html +++ b/doc/html/fusion/iterator/metafunctions/value_of.html @@ -3,10 +3,10 @@ value_of - + - + @@ -22,21 +22,24 @@
    PrevUpHomeNext
    -
    - -
    - - Description -
    +
    +
    + +
    +
    +
    + + Description +

    Returns the type stored at the position of an iterator.

    -
    - - Synopsis -
    +
    + + Synopsis +
    template<
         typename I
         >
    @@ -46,83 +49,72 @@
     };
     
    -

    Table 1.11. Parameters

    -
    +

    Table 1.11. Parameters

    +
    - - + - + +

    - - + - + +

    -
    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - I -

    -
    -

    - Model of Forward +

    + I +

    + Model of Forward Iterator -

    -
    -

    +

    Operation's argument -

    -
+
-
- - Expression +
+ + Expression Semantics -
-
result_of::value_of<I>::type
+        
+
result_of::value_of<I>::type
 

- Return type: Any type + Return type: Any type

- Semantics: Returns the type stored in - a sequence at iterator position I. + Semantics: Returns the type stored in + a sequence at iterator position I.

-
- - Header -
+
+ + Header +
#include <boost/fusion/iterator/value_of.hpp>
 #include <boost/fusion/include/value_of.hpp>
 
-
- - Example -
-
typedef vector<int,int&,const int&> vec;
-typedef result_of::begin<vec>::type first;
-typedef result_of::next<first>::type second;
-typedef result_of::next<second>::type third;
+
+ + Example +
+
typedef vector<int,int&,const int&> vec;
+typedef result_of::begin<vec>::type first;
+typedef result_of::next<first>::type second;
+typedef result_of::next<second>::type third;
 
-BOOST_MPL_ASSERT((boost::is_same<result_of::value_of<first>::type, int>));
-BOOST_MPL_ASSERT((boost::is_same<result_of::value_of<second>::type, int&>));
-BOOST_MPL_ASSERT((boost::is_same<result_of::value_of<third>::type, const int&>));
+BOOST_MPL_ASSERT((boost::is_same<result_of::value_of<first>::type, int>));
+BOOST_MPL_ASSERT((boost::is_same<result_of::value_of<second>::type, int&>));
+BOOST_MPL_ASSERT((boost::is_same<result_of::value_of<third>::type, const int&>));
 
diff --git a/doc/html/fusion/iterator/operator.html b/doc/html/fusion/iterator/operator.html index 8094cc2a..ebc0f2c0 100644 --- a/doc/html/fusion/iterator/operator.html +++ b/doc/html/fusion/iterator/operator.html @@ -3,11 +3,12 @@ Operator - + - - + +
@@ -22,10 +23,13 @@
PrevUpHomeNext
-
- +
+
+ +
+
Operator *
diff --git a/doc/html/fusion/iterator/operator/operator_equality.html b/doc/html/fusion/iterator/operator/operator_equality.html index 08f0ccc3..e58e17d5 100644 --- a/doc/html/fusion/iterator/operator/operator_equality.html +++ b/doc/html/fusion/iterator/operator/operator_equality.html @@ -1,13 +1,16 @@ -Operator == + Operator + == - + - - + +
@@ -22,22 +25,26 @@
PrevUpHomeNext
-
- +
+ + Description +

Compares 2 iterators for equality.

-
- - Synopsis -
+
+ + Synopsis +
template<
     typename I,
     typename J
@@ -45,68 +52,56 @@
 unspecified operator==(I const& i, J const& i);
 
-

Table 1.9. Parameters

-
+

Table 1.9. Parameters

+
- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- i, j -

-
-

+

+ i, j +

Any fusion iterators -

-
-

+

Operation's arguments -

-
+
-
- - Expression +
+ + Expression Semantics -
+
i == j
 

- Return type: Convertible to bool. + Return type: Convertible to bool.

- Semantics: Equivalent to result_of::equal_to<I,J>::value - where I and J are the types of i - and j respectively. + Semantics: Equivalent to result_of::equal_to<I,J>::value + where I and J are the types of i + and j respectively.

-
- - Header -
+
+ + Header +
#include <boost/fusion/iterator/equal_to.hpp>
 #include <boost/fusion/include/equal_to.hpp>
 
diff --git a/doc/html/fusion/iterator/operator/operator_inequality.html b/doc/html/fusion/iterator/operator/operator_inequality.html index 3c35818e..83600171 100644 --- a/doc/html/fusion/iterator/operator/operator_inequality.html +++ b/doc/html/fusion/iterator/operator/operator_inequality.html @@ -1,12 +1,14 @@ -Operator != + Operator + != - + - + @@ -22,22 +24,26 @@
PrevUpHomeNext
-
- +
+ + Description +

Compares 2 iterators for inequality.

-
- - Synopsis -
+
+ + Synopsis +
template<
     typename I,
     typename J
@@ -45,66 +51,54 @@
 unspecified operator==(I const& i, J const& i);
 
-

Table 1.10. Parameters

-
+

Table 1.10. Parameters

+
- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- i, j -

-
-

+

+ i, j +

Any fusion iterators -

-
-

+

Operation's arguments -

-
+
-
- - Expression +
+ + Expression Semantics -
+

- Return type: Convertible to bool. + Return type: Convertible to bool.

- Semantics: Equivalent to !result_of::equal_to<I,J>::value - where I and J are the types of i - and j respectively. + Semantics: Equivalent to !result_of::equal_to<I,J>::value + where I and J are the types of i + and j respectively.

-
- - Header -
+
+ + Header +
#include <boost/fusion/iterator/equal_to.hpp>
 #include <boost/fusion/include/equal_to.hpp>
 
diff --git a/doc/html/fusion/iterator/operator/operator_unary_star.html b/doc/html/fusion/iterator/operator/operator_unary_star.html index 36299dca..bcbb00d1 100644 --- a/doc/html/fusion/iterator/operator/operator_unary_star.html +++ b/doc/html/fusion/iterator/operator/operator_unary_star.html @@ -1,13 +1,15 @@ -Operator * + Operator + * - + - - + + @@ -22,104 +24,97 @@
PrevUpHomeNext
-
- +
+ + Description +

Dereferences an iterator.

-
- - Synopsis -
+
+ + Synopsis +
template<
     typename I
     >
-typename result_of::deref<I>::type operator*(unspecified<I> const& i);
+typename result_of::deref<I>::type operator*(unspecified<I> const& i);
 
-

Table 1.8. Parameters

-
+

Table 1.8. Parameters

+
- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- i -

-
-

- Model of Forward +

+ i +

+ Model of Forward Iterator -

-
-

+

Operation's argument -

-
+
-
- - Expression +
+ + Expression Semantics -
+
*i
 

- Return type: Equivalent to the return - type of deref(i). + Return type: Equivalent to the return + type of deref(i).

- Semantics: Equivalent to deref(i). + Semantics: Equivalent to deref(i).

-
- - Header -
+
+ + Header +
#include <boost/fusion/iterator/deref.hpp>
 #include <boost/fusion/include/deref.hpp>
 
-
- - Example -
-
typedef vector<int,int&> vec;
+
+ + Example +
+
typedef vector<int,int&> vec;
 
 int i(0);
 vec v(1,i);
-assert(*begin(v) == 1);
-assert(*next(begin(v)) == 0);
-assert(&(*next(begin(v))) == &i);
+assert(*begin(v) == 1);
+assert(*next(begin(v)) == 0);
+assert(&(*next(begin(v))) == &i);
 
diff --git a/doc/html/fusion/notes.html b/doc/html/fusion/notes.html index 522e3fc6..a713a936 100644 --- a/doc/html/fusion/notes.html +++ b/doc/html/fusion/notes.html @@ -3,10 +3,11 @@ Notes - + - + @@ -22,54 +23,58 @@
PrevUpHomeNext
-
-

-Notes -

-

- - Recursive Inlined +

- An interesting peculiarity of functions like at when applied to a Forward - Sequence like list + An interesting peculiarity of functions like at when applied to a Forward + Sequence like list is that what could have been linear runtime complexity effectively becomes constant O(1) due to compiler optimization of C++ inlined functions, however deeply recursive (up to a certain compiler limit of course). Compile time complexity remains linear.

-

- - Overloaded Functions -

+

+ + Overloaded Functions +

Associative sequences use function overloading to implement membership testing and type associated key lookup. This amounts to constant runtime and amortized - constant compile time complexities. There is an overloaded function, f(k), for each key type k. The compiler chooses the appropriate function - given a key, k. + constant compile time complexities. There is an overloaded function, f(k), for each key type k. The compiler chooses the appropriate function + given a key, k.

-

- - Tag Dispatching -

+

+ + Tag Dispatching +

Tag dispatching is a generic programming technique for selecting template specializations. There are typically 3 components involved in the tag dispatching mechanism:

-
    -
  1. +
      +
    1. A type for which an appropriate template specialization is required
    2. -
    3. +
    4. A metafunction that associates the type with a tag type
    5. -
    6. +
    7. A template that is specialized for the tag type

    - For example, the fusion result_of::begin metafunction + For example, the fusion result_of::begin metafunction is implemented as follows:

    template <typename Sequence>
    @@ -84,26 +89,26 @@
     

    In the case:

    -
      -
    1. -Sequence is the type for - which a suitable implementation of result_of::begin_impl +
        +
      1. +Sequence is the type for + which a suitable implementation of result_of::begin_impl is required
      2. -
      3. -traits::tag_of is the metafunction that associates - Sequence with an appropriate +
      4. +traits::tag_of is the metafunction that associates + Sequence with an appropriate tag
      5. -
      6. -result_of::begin_impl is the template which is specialized +
      7. +result_of::begin_impl is the template which is specialized to provide an implementation for each tag type
      -

      - - Extensibility -

      +

      + + Extensibility +

      Unlike MPL, there is no extensibe sequence concept in fusion. This does not mean that Fusion @@ -111,66 +116,66 @@ extensible. It is just that the manner of sequence extension in Fusion is diferent from both STL and MPL on account - of the lazy nature of fusion Algorithms. + of the lazy nature of fusion Algorithms. STL - containers extend themselves in place though member functions such as push_back and insert. MPL + containers extend themselves in place though member functions such as push_back and insert. MPL sequences, on the other hand, are extended through "intrinsic" functions that actually return whole sequences. MPL is purely functional and can not have side effects. For example, MPL's - push_back does not actually - mutate an mpl::vector. It can't do that. Instead, it returns - an extended mpl::vector. + push_back does not actually + mutate an mpl::vector. It can't do that. Instead, it returns + an extended mpl::vector.

      Like MPL, Fusion too is purely functional and can not have side effects. With runtime efficiency in mind, Fusion sequences are extended through generic functions that return - Views. Views + Views. Views are sequences that do not actually contain data, but instead impart an alternative - presentation over the data from one or more underlying sequences. Views + presentation over the data from one or more underlying sequences. Views are proxies. They provide an efficient yet purely functional way to work on - potentially expensive sequence operations. For example, given a vector, Fusion's push_back returns a joint_view, instead of an actual extended - vector. - A joint_view + potentially expensive sequence operations. For example, given a vector, Fusion's push_back returns a joint_view, instead of an actual extended + vector. + A joint_view holds a reference to the original sequence plus the appended data --making it very cheap to pass around.

      -

      - - Element Conversion -

      +

      + + Element Conversion +

      - Functions that take in elemental values to form sequences (e.g. make_list) convert their arguments + Functions that take in elemental values to form sequences (e.g. make_list) convert their arguments to something suitable to be stored as a sequence element. In general, the element types are stored as plain values. Example:

      -
      make_list(1, 'x')
      +
      make_list(1, 'x')
       

      - returns a list<int, - char>. + returns a list<int, + char>.

      There are a few exceptions, however.

      - Arrays: + Arrays:

      Array arguments are deduced to reference to const types. For example - [10] + [10] :

      -
      make_list("Donald", "Daisy")
      +
      make_list("Donald", "Daisy")
       

      - creates a list + creates a list of type

      -
      list<const char (&)[7], const char (&)[6]>
      +
      list<const char (&)[7], const char (&)[6]>
       

      - Function pointers: + Function pointers:

      Function pointers are deduced to the plain non-reference type (i.e. to plain @@ -178,35 +183,35 @@

      void f(int i);
         ...
      -make_list(&f);
      +make_list(&f);
       

      - creates a list + creates a list of type

      -
      list<void (*)(int)>
      +
      list<void (*)(int)>
       
      -

      - - boost::ref -

      +

      + + boost::ref +

      - Fusion's generation functions (e.g. make_list) by default stores the element + Fusion's generation functions (e.g. make_list) by default stores the element types as plain non-reference types. Example:

      void foo(const A& a, B& b) {
           ...
      -    make_list(a, b)
      +    make_list(a, b)
       

      - creates a list + creates a list of type

      -
      list<A, B>
      +
      list<A, B>
       

      - Sometimes the plain non-reference type is not desired. You can use boost::ref - and boost::cref to store references or const references + Sometimes the plain non-reference type is not desired. You can use boost::ref + and boost::cref to store references or const references (respectively) instead. The mechanism does not compromise const correctness since a const object wrapped with ref results in a tuple element with const reference type (see the fifth code line below). Examples: @@ -215,11 +220,11 @@ For example:

      A a; B b; const A ca = a;
      -make_list(cref(a), b);          // creates list<const A&, B>
      -make_list(ref(a), b);           // creates list<A&, B>
      -make_list(ref(a), cref(b));     // creates list<A&, const B&>
      -make_list(cref(ca));            // creates list<const A&>
      -make_list(ref(ca));             // creates list<const A&>
      +make_list(cref(a), b);          // creates list<const A&, B>
      +make_list(ref(a), b);           // creates list<A&, B>
      +make_list(ref(a), cref(b));     // creates list<A&, const B&>
      +make_list(cref(ca));            // creates list<const A&>
      +make_list(ref(ca));             // creates list<const A&>
       

      See Boost.Ref for @@ -227,11 +232,11 @@



      -

      [10] +

      [10] Note that the type of a string literal is an array of const characters, - not const char*. To get make_list to create a list with an element of a non-const - array type one must use the ref - wrapper (see boost::ref). + not const char*. To get make_list to create a list with an element of a non-const + array type one must use the ref + wrapper (see boost::ref).

      diff --git a/doc/html/fusion/organization.html b/doc/html/fusion/organization.html index 8177d5c5..ea3a451d 100644 --- a/doc/html/fusion/organization.html +++ b/doc/html/fusion/organization.html @@ -3,10 +3,10 @@ Organization - + - + @@ -22,10 +22,13 @@
      PrevUpHomeNext
      -
      - +
      +
      + +
      +

      The library is organized into layers of modules, with each module addressing a particular area of responsibility. A module may not depend on modules in @@ -34,29 +37,29 @@

      The library is organized in three layers:

      -

      - - Layers -

      +

      + + Layers +

      - fusion_org + fusion_org

      - The entire library is found in the "boost/fusion" + The entire library is found in the "boost/fusion" directory. Modules are organized in directories. Each module has its own header file placed in the same directory with the actual module-directory. For example, - there exists "boost/fusion/support.hpp" + there exists "boost/fusion/support.hpp" in the same directory as "boost/fusion/support". Everything, except those found inside "detail" directories, is public.

      - There is also a "boost/fusion/include/" + There is also a "boost/fusion/include/" directory that contains all the headers to all the components and modules. If you are unsure where to find a specific component or module, or don't want to fuss with hierarchy and nesting, use this. @@ -65,133 +68,133 @@ The library is header-only. There is no need to build object files to link against.

      -

      - - Directory -

      -
        -
      • +

        + + Directory +

        +
          +
        • tuple
        • -
        • +
        • algorithm -
            -
          • +
              +
            • iteration
            • -
            • +
            • query
            • -
            • +
            • transformation
          • -
          • +
          • adapted -
              -
            • +
                +
              • array
              • -
              • +
              • mpl
              • -
              • +
              • boost::tuple
              • -
              • +
              • std_pair
              • -
              • +
              • struct
              • -
              • +
              • variant
            • -
            • +
            • view -
                -
              • +
                  +
                • filter_view
                • -
                • +
                • iterator_range
                • -
                • +
                • joint_view
                • -
                • +
                • reverse_view
                • -
                • +
                • single_view
                • -
                • +
                • transform_view
                • -
                • +
                • zip_view
              • -
              • +
              • container -
                  -
                • +
                    +
                  • deque
                  • -
                  • +
                  • list
                  • -
                  • +
                  • map
                  • -
                  • +
                  • set
                  • -
                  • +
                  • vector
                  • -
                  • +
                  • generation
                • -
                • +
                • mpl
                • -
                • +
                • functional
                • -
                • +
                • sequence -
                    -
                  • +
                      +
                    • comparison
                    • -
                    • +
                    • intrinsic
                    • -
                    • +
                    • io
                  • -
                  • +
                  • iterator
                  • -
                  • +
                  • support
                  -

                  - - Example -

                  +

                  + + Example +

                  - If, for example, you want to use list, + If, for example, you want to use list, depending on the granularity that you desire, you may do so by including one of

                  @@ -201,13 +204,13 @@ #include <boost/fusion/include/list.hpp>

      - The first includes all containers The second includes only list - [4] + The first includes all containers The second includes only list + [4] .



      -

      [4] +

      [4] Modules may contain smaller components. Header file information for each component will be provided as part of the component's documentation.

      diff --git a/doc/html/fusion/preface.html b/doc/html/fusion/preface.html index d7b5dbe8..077f198e 100644 --- a/doc/html/fusion/preface.html +++ b/doc/html/fusion/preface.html @@ -3,10 +3,10 @@ Preface - + - + @@ -22,15 +22,18 @@
      PrevUpHomeNext
      -
      - +
      +
      + +
      +

      - Algorithms + Data Structures = Programs. + Algorithms + Data Structures = Programs.

      @@ -39,15 +42,15 @@

      - --Niklaus Wirth + --Niklaus Wirth

      -

      - - Description -

      +

      + + Description +

      Fusion is a library for working with heterogenous collections of data, commonly referred to as tuples. A set of containers (vector, list, set and map) is provided, @@ -62,10 +65,10 @@ It is named "fusion" because the library is a "fusion" of compile time metaprogramming with runtime programming.

      -

      - - Motivation -

      +

      + + Motivation +

      Tuples are powerful beasts. After having developed two significant projects (Spirit and Phoenix) @@ -88,121 +91,91 @@ had an adhoc collection of tuple manipulation and traversal routines. It was an instant AHA! moment.

      -

      - - How to use this manual -

      +

      + + How to use this manual +

      Some icons are used to mark certain topics indicative of their relevance. These icons precede some text to indicate:

      -

      Table 1.1. Icons

      -
+

Table 1.1. Icons

+
- - + - + +

- - + - + +

- - + - + +

- - + - + +

- - + - + +

-
-

+

Icon -

-
-

+

Name -

-
-

+

Meaning -

-
-

- note -

-
-

+

+ note +

Note -

-
-

+

Information provided is auxiliary but will give the reader a deeper insight into a specific topic. May be skipped. -

-
-

- alert -

-
-

+

+ alert +

Alert -

-
-

+

Information provided is of utmost importance. -

-
-

- caution -

-
-

+

+ caution +

Caution -

-
-

+

A mild warning. -

-
-

- tip -

-
-

+

+ tip +

Tip -

-
-

+

A potentially useful and helpful piece of information. -

-
+
-

+

This documentation is automatically generated by Boost QuickBook documentation tool. QuickBook can be found in the Boost Tools.

-

- - Support -

+

+ + Support +

Please direct all questions to Spirit's mailing list. You can subscribe to the Spirit diff --git a/doc/html/fusion/quick_start.html b/doc/html/fusion/quick_start.html index 9f72ccdb..61c148ec 100644 --- a/doc/html/fusion/quick_start.html +++ b/doc/html/fusion/quick_start.html @@ -3,10 +3,10 @@ Quick Start - + - + @@ -22,47 +22,50 @@

-
- +
+
+ +
+

I assume the reader is already familiar with tuples (Boost.Tuple) - and its ancestor std::pair. The tuple is a generalization of std::pair + and its ancestor std::pair. The tuple is a generalization of std::pair for multiple heterogeneous elements (triples, quadruples, etc.). The tuple - is more or less a synonym for fusion's vector. + is more or less a synonym for fusion's vector.

- For starters, we shall include all of Fusion's Sequence(s) - [2] + For starters, we shall include all of Fusion's Sequence(s) + [2] :

#include <boost/fusion/sequence.hpp>
 #include <boost/fusion/include/sequence.hpp>
 

- Let's begin with a vector - [3] + Let's begin with a vector + [3] :

-
vector<int, char, std::string> stuff(1, 'x', "howdy");
-int i = at_c<0>(stuff);
-char ch = at_c<1>(stuff);
-std::string s = at_c<2>(stuff);
+
vector<int, char, std::string> stuff(1, 'x', "howdy");
+int i = at_c<0>(stuff);
+char ch = at_c<1>(stuff);
+std::string s = at_c<2>(stuff);
 

- Just replace tuple for vector - and get for at_c and this is exactly like + Just replace tuple for vector + and get for at_c and this is exactly like Boost.Tuple. Actually, either names can be used interchangeably. Yet, the similarity ends - there. You can do a lot more with Fusion vector or tuple. + there. You can do a lot more with Fusion vector or tuple. Let's see some examples.

-

- - Print the vector +

+ + Print the vector as XML -

+

First, let's include the algorithms:

@@ -89,38 +92,38 @@

Now, finally:

-
for_each(stuff, print_xml());
+
for_each(stuff, print_xml());
 

- That's it! for_each is a fusion algorithm. + That's it! for_each is a fusion algorithm. It is a generic algorithm similar to STL's. It iterates over the sequence and calls a user supplied function. In our case, - it calls print_xml's operator() for - each element in stuff. + it calls print_xml's operator() for + each element in stuff.

-
+
-
[Caution] Caution

- The result of typeid(x).name() is platform specific. The code here is +

+ The result of typeid(x).name() is platform specific. The code here is just for exposition. Of course you already know that :-)

- for_each is generic. With - print_xml, you can use it to - print just about any Fusion Sequence. + for_each is generic. With + print_xml, you can use it to + print just about any Fusion Sequence.

-

- - Print only pointers -

+

+ + Print only pointers +

Let's get a little cleverer. Say we wish to write a generic function that takes in an arbitrary sequence and XML prints only those elements - which are pointers. Ah, easy. First, let's include the is_pointer + which are pointers. Ah, easy. First, let's include the is_pointer boost type trait:

#include <boost/type_traits/is_pointer.hpp>
@@ -131,37 +134,37 @@
 
template <typename Sequence>
 void xml_print_pointers(Sequence const& seq)
 {
-    for_each(filter_if<boost::is_pointer<_> >(seq), print_xml());
+    for_each(filter_if<boost::is_pointer<_> >(seq), print_xml());
 }
 

- filter_if is another Fusion - algorithm. It returns a filter_view, a conforming Fusion sequence. + filter_if is another Fusion + algorithm. It returns a filter_view, a conforming Fusion sequence. This view reflects only those elements that pass the given predicate. In this - case, the predicate is boost::is_pointer<_>. - This "filtered view" is then passed to the for_each algorithm, which then prints + case, the predicate is boost::is_pointer<_>. + This "filtered view" is then passed to the for_each algorithm, which then prints the "filtered view" as XML.

Easy, right?

-

- - Associative tuples -

+

+ + Associative tuples +

Ok, moving on...

- Apart from vector, + Apart from vector, fusion has a couple of other sequence types to choose from. Each sequence has - its own characteristics. We have list, set, map, plus a multitude of views that provide various ways to present + its own characteristics. We have list, set, map, plus a multitude of views that provide various ways to present the sequences.

- Fusion's map + Fusion's map associate types with elements. It can be used as a cleverer replacement of - the struct. Example: + the struct. Example:

namespace fields
 {
@@ -169,31 +172,31 @@
     struct age;
 }
 
-typedef map<
-    fusion::pair<fields::name, std::string>
-  , fusion::pair<fields::age, int> >
+typedef map<
+    fusion::pair<fields::name, std::string>
+  , fusion::pair<fields::age, int> >
 person;
 

- map + map is an associative sequence. Its elements are Fusion pairs which differ somewhat - from std::pair. Fusion pairs only contain one member, + from std::pair. Fusion pairs only contain one member, with the type of their second template parameter. The first type parameter of the pair is used as an index to the associated element in the sequence. - For example, given a a_person - of type, person, you can do: + For example, given a a_person + of type, person, you can do:

using namespace fields;
-std::string person_name = at_key<name>(a_person);
-int person_age = at_key<age>(a_person);
+std::string person_name = at_key<name>(a_person);
+int person_age = at_key<age>(a_person);
 

- Why go through all this trouble, you say? Well, for one, unlike the struct, we are dealing with a generic data structure. + Why go through all this trouble, you say? Well, for one, unlike the struct, we are dealing with a generic data structure. There are a multitude of facilities available at your disposal provided out of the box with fusion or written by others. With these facilities, introspection comes for free, for example. We can write one serialization function (well, two, if you consider loading and saving) that will work for all your fusion - maps. + maps. Example:

struct saver
@@ -208,19 +211,19 @@
 template <typename Stuff>
 void save(Stuff const& stuff)
 {
-    for_each(stuff, saver());
+    for_each(stuff, saver());
 }
 

- The save function is generic - and will work for all types of stuff - regardless if it is a person, - a dog or a whole alternate_universe. + The save function is generic + and will work for all types of stuff + regardless if it is a person, + a dog or a whole alternate_universe.

-

- - Tip of the Iceberg -

+

+ + Tip of the Iceberg +

And... we've barely scratched the surface! You can compose and expand the data structures, remove elements from the structures, find specific data types, @@ -229,14 +232,14 @@



-

[2] +

[2] There are finer grained header files available if you wish to have more - control over which components to include (see section Orgainization + control over which components to include (see section Orgainization for details).

-

[3] - Unless otherwise noted, components are in namespace boost::fusion. - For the sake of simplicity, code in this quick start implies using directives for the fusion components +

[3] + Unless otherwise noted, components are in namespace boost::fusion. + For the sake of simplicity, code in this quick start implies using directives for the fusion components we will be using.

diff --git a/doc/html/fusion/references.html b/doc/html/fusion/references.html index 301b3513..f2ae59a4 100644 --- a/doc/html/fusion/references.html +++ b/doc/html/fusion/references.html @@ -3,10 +3,10 @@ References - + - + @@ -21,36 +21,39 @@
PrevUpHome
-
- -
    -
  1. +
    +
    + +
    +
    +
      +
    1. New Iterator Concepts, David Abrahams, Jeremy Siek, Thomas Witt, 2004-11-01.
    2. -
    3. +
    4. The Boost Tuple Library, Jaakko Jarvi, 2001.
    5. -
    6. +
    7. Spirit Parser Library, Joel de Guzman, 2001-2006.
    8. -
    9. +
    10. The Boost MPL Library, Aleksey Gurtovoy and David Abrahams, 2002-2004.
    11. -
    12. +
    13. Boost Array, Nicolai Josuttis, 2002-2004.
    14. -
    15. +
    16. Standard Template Library Programmer's Guide, Hewlett-Packard Company, 1994.
    17. -
    18. +
    19. Boost.Ref, Jaakko Jarvi, Peter Dimov, Douglas Gregor, Dave Abrahams, 1999-2002.
    20. diff --git a/doc/html/fusion/sequence.html b/doc/html/fusion/sequence.html index c4122959..ecd22443 100644 --- a/doc/html/fusion/sequence.html +++ b/doc/html/fusion/sequence.html @@ -3,10 +3,10 @@ Sequence - + - + @@ -22,10 +22,13 @@
      PrevUpHomeNext
      -
      - +
      +
      + +
      +
      Concepts
      @@ -52,17 +55,17 @@

      Like MPL, the Sequence is a fundamental concept in Fusion. A Sequence may or may not actually - store or contain data. Container are - sequences that hold data. Views, on the + store or contain data. Container are + sequences that hold data. Views, on the other hand, are sequences that do not store any data. Instead, they are proxies that impart an alternative presentation over another sequence. All models of - Sequence have an associated Iterator + Sequence have an associated Iterator type that can be used to iterate through the Sequence's elements.

      -

      - - Header -

      +

      + + Header +

      #include <boost/fusion/sequence.hpp>
       #include <boost/fusion/include/sequence.hpp>
       
      diff --git a/doc/html/fusion/sequence/concepts.html b/doc/html/fusion/sequence/concepts.html index 6e0609e5..7cff49ef 100644 --- a/doc/html/fusion/sequence/concepts.html +++ b/doc/html/fusion/sequence/concepts.html @@ -3,11 +3,12 @@ Concepts - + - - + +
@@ -22,10 +23,13 @@
PrevUpHomeNext
-
- +
+
+ +
+
Forward Sequence
@@ -39,25 +43,31 @@

Fusion Sequences are organized into a hierarchy of concepts.

-
- - Traversal -
+

+ + Traversal +

- Fusion's sequence traversal related concepts parallel Fusion's Iterator - Concepts. Forward - Sequence is the most basic concept. Bidirectional - Sequence is a refinement of Forward - Sequence. Random - Access Sequence is a refinement of Bidirectional + Fusion's sequence traversal related concepts parallel Fusion's Iterator + Concepts. Forward + Sequence is the most basic concept. Bidirectional + Sequence is a refinement of Forward + Sequence. Random + Access Sequence is a refinement of Bidirectional Sequence. These concepts pertain to sequence traversal.

-
- - Associativity -
+

+ + Associativity +

- The Associative + The Associative Sequence concept is orthogonal to traversal. An Associative Sequence allows efficient retrieval of elements based on keys.

diff --git a/doc/html/fusion/sequence/concepts/associative_sequence.html b/doc/html/fusion/sequence/concepts/associative_sequence.html index 32cfa958..1c4f7d02 100644 --- a/doc/html/fusion/sequence/concepts/associative_sequence.html +++ b/doc/html/fusion/sequence/concepts/associative_sequence.html @@ -1,12 +1,14 @@ -Associative Sequence +Associative + Sequence - + - + @@ -22,15 +24,19 @@
PrevUpHomeNext
-
- +
+ + Description +

An Associative Sequence allows efficient retrieval of elements based on keys. Like associative sequences in MPL, @@ -43,36 +49,36 @@ there is no associated ordering relation and the runtime value of the keys themselves do not have any effect on the associativity of the sequence.

-
+

Notation

-
s
+
s

An Associative Sequence

-
S
+
S

An Associative Sequence type

-
K
+
K

An arbitrary key type

-
o
+
o

An arbitrary object

-
e
+
e

A Sequence element

-
- - Valid +
+ + Valid Expressions -
+

For any Associative Sequence the following expressions must be valid:

@@ -84,236 +90,173 @@
- - + - + - + +

- - + - - + + +

- - + - - + + +

- - + - + - + +

-

+

Expression -

-
-

+

Return type -

-
-

+

Type Requirements -

-
-

+

Runtime Complexity -

-
-

- has_key<K>(s) -

-
-

+

+ has_key<K>(s) +

MPL Boolean Constant. Convertible to bool. -

-
-

-

-
-

+

+

Constant -

-
-

- at_key<K>(s) -

-
-

+

+ at_key<K>(s) +

Any type -

-
-

-

-
-

+

+

Constant -

-
-

- at_key<K>(s) - = o -

-
-

+

+ at_key<K>(s) + = o +

Any type -

-
-

- s is mutable and - e = - o, where e is the first element in the +

+ s is mutable and + e = + o, where e is the first element in the sequence, is a valid expression. -

-
-

+

Constant -

-
-
- - Result +
+ + Result Type Expressions -
+
- - + +

- - + +

- - + +

- - + +

-

+

Expression -

-
-

+

Compile Time Complexity -

-
-

- result_of::has_key<S, - K>::type -

-
-

+

+ result_of::has_key<S, + K>::type +

Amortized constant time -

-
-

- result_of::at_key<S, - K>::type -

-
-

+

+ result_of::at_key<S, + K>::type +

Amortized constant time -

-
-

- result_of::value_at_key<S, - K>::type -

-
-

+

+ result_of::value_at_key<S, + K>::type +

Amortized constant time -

-
- +
+ + Expression Semantics -
+
- - + +

- - + + - - + +
-

+

Expression -

-
-

+

Semantics -

-
-

- has_key<K>(s) -

-
-

- A boolean Integral Constant c - such that c::value == - true if and only if there - is one or more elements with the key k - in s; see has_key. -

-

+ has_key<K>(s) +

+ A boolean Integral Constant c + such that c::value == + true if and only if there + is one or more elements with the key k + in s; see has_key. +

-

- at_key<K>(s) -

-
-

- The element associated with the key K - in the sequence s; - see at. -

-

+ at_key<K>(s) +

+ The element associated with the key K + in the sequence s; + see at. +

-
- - Models -
-
diff --git a/doc/html/fusion/sequence/concepts/bidirectional_sequence.html b/doc/html/fusion/sequence/concepts/bidirectional_sequence.html index 244e27e3..7df699ee 100644 --- a/doc/html/fusion/sequence/concepts/bidirectional_sequence.html +++ b/doc/html/fusion/sequence/concepts/bidirectional_sequence.html @@ -1,13 +1,16 @@ -Bidirectional Sequence +Bidirectional + Sequence - + - - + +
@@ -22,56 +25,64 @@
PrevUpHomeNext
-
- +
+ + Description +

- A Bidirectional Sequence is a Forward - Sequence whose iterators model Bidirectional + A Bidirectional Sequence is a Forward + Sequence whose iterators model Bidirectional Iterator.

-
- - Refinement +
+ + Refinement of -
+

- Forward Sequence + Forward Sequence

-
+

Notation

-
s
+
s

A Forward Sequence

-
S
+
S

A Forward Sequence type

-
o
+
o

An arbitrary object

-
e
+
e

A Sequence element

-
- - Valid +
+ + Valid Expressions -
+

- In addition to the requirements defined in Forward + In addition to the requirements defined in Forward Sequence, for any Bidirectional Sequence the following must be met:

@@ -82,190 +93,137 @@ - - + - + - + +

- - + - - + + +

- - + - - + + +

- - + - - + + +

- - + - + - + +

-

+

Expression -

-
-

+

Return type -

-
-

+

Type Requirements -

-
-

+

Runtime Complexity -

-
-

- begin(s) -

-
-

- Bidirectional +

+ begin(s) +

+ Bidirectional Iterator -

-
-

-

-
-

+

+

Constant -

-
-

- end(s) -

-
-

- Bidirectional +

+ end(s) +

+ Bidirectional Iterator -

-
-

-

-
-

+

+

Constant -

-
-

- back(s) -

-
-

+

+ back(s) +

Any type -

-
-

-

-
-

+

+

Constant -

-
-

- back(s) - = o -

-
-

+

+ back(s) + = o +

Any type -

-
-

- s is mutable and - e = - o, where e is the first element in the +

+ s is mutable and + e = + o, where e is the first element in the sequence, is a valid expression. -

-
-

+

Constant -

-
-
- - Result +
+ + Result Type Expressions -
+
- - + +

- - + +

- - + +

- - + +

-

+

Expression -

-
-

+

Compile Time Complexity -

-
-

- result_of::begin<S>::type -

-
-

+

+ result_of::begin<S>::type +

Amortized constant time -

-
-

- result_of::end<S>::type -

-
-

+

+ result_of::end<S>::type +

Amortized constant time -

-
-

- result_of::back<S>::type -

-
-

+

+ result_of::back<S>::type +

Amortized constant time -

-
-
- - Expression +
+ + Expression Semantics -
+

The semantics of an expression are defined only where they differ from, - or are not defined in Forward + or are not defined in Forward Sequence.

@@ -274,49 +232,41 @@ - - + +

- - + +
-

+

Expression -

-
-

+

Semantics -

-
-

- back(s) -

-
-

- The last element in the sequence; see back. -

-

+ back(s) +

+ The last element in the sequence; see back. +

-
- - Models -
-
    -
  • std::pair
  • -
  • boost::array
  • -
  • vector
  • -
  • reverse_view
  • -
  • -iterator_range +
    + + Models +
    +
    diff --git a/doc/html/fusion/sequence/concepts/forward_sequence.html b/doc/html/fusion/sequence/concepts/forward_sequence.html index 7eae6fa9..75785533 100644 --- a/doc/html/fusion/sequence/concepts/forward_sequence.html +++ b/doc/html/fusion/sequence/concepts/forward_sequence.html @@ -1,13 +1,15 @@ -Forward Sequence +Forward + Sequence - + - - + + @@ -22,15 +24,19 @@
    PrevUpHomeNext
    -
    - +
    + + Description +

    A Forward Sequence is a Sequence whose elements are arranged in a definite order. The ordering is guaranteed not to change from iteration to iteration. @@ -38,32 +44,32 @@ equality (if the container's element type is Equality Comparable) and of lexicographical ordering (if the container's element type is LessThan Comparable).

    -
    +

    Notation

    -
    s
    +
    s

    A Forward Sequence

    -
    S
    +
    S

    A Forward Sequence type

    -
    o
    +
    o

    An arbitrary object

    -
    e
    +
    e

    A Sequence element

    -
    - - Valid +
    + + Valid Expressions -
    +

    For any Forward Sequence the following expressions must be valid:

    @@ -75,383 +81,281 @@
    - - + - + - + +

    - - + - - + + +

    - - + - - + + +

    - - + - - + + +

    - - + - - + + +

    - - + - - + + +

    - - + - + - + +

    -

    +

    Expression -

    -
    -

    +

    Return type -

    -
    -

    +

    Type Requirements -

    -
    -

    +

    Runtime Complexity -

    -
    -

    - begin(s) -

    -
    -

    - Forward +

    + begin(s) +

    + Forward Iterator -

    -
    -

    -

    -
    -

    +

    +

    Constant -

    -
    -

    - end(s) -

    -
    -

    - Forward +

    + end(s) +

    + Forward Iterator -

    -
    -

    -

    -
    -

    +

    +

    Constant -

    -
    -

    - size(s) -

    -
    -

    +

    + size(s) +

    MPL Integral Constant. Convertible to int. -

    -
    -

    -

    -
    -

    +

    +

    Constant -

    -
    -

    - empty(s) -

    -
    -

    +

    + empty(s) +

    MPL Boolean Constant. Convertible to bool. -

    -
    -

    -

    -
    -

    +

    +

    Constant -

    -
    -

    - front(s) -

    -
    -

    +

    + front(s) +

    Any type -

    -
    -

    -

    -
    -

    +

    +

    Constant -

    -
    -

    - front(s) - = o -

    -
    -

    +

    + front(s) + = o +

    Any type -

    -
    -

    - s is mutable and - e = - o, where e is the first element in the +

    + s is mutable and + e = + o, where e is the first element in the sequence, is a valid expression. -

    -
    -

    +

    Constant -

    -
-
- - Result +
+ + Result Type Expressions -
+
- - + +

- - + +

- - + +

- - + +

- - + +

- - + +

-

+

Expression -

-
-

+

Compile Time Complexity -

-
-

- result_of::begin<S>::type -

-
-

+

+ result_of::begin<S>::type +

Amortized constant time -

-
-

- result_of::end<S>::type -

-
-

+

+ result_of::end<S>::type +

Amortized constant time -

-
-

- result_of::size<S>::type -

-
-

+

+ result_of::size<S>::type +

Unspecified -

-
-

- result_of::empty<S>::type -

-
-

+

+ result_of::empty<S>::type +

Constant time -

-
-

- result_of::front<S>::type -

-
-

+

+ result_of::front<S>::type +

Amortized constant time -

-
-
- - Expression +
+ + Expression Semantics -
+
- - + +

- - + + - - + + - - + + - - + + - - + +
-

+

Expression -

-
-

+

Semantics -

-
-

- begin(s) -

-
-

- An iterator to the first element of the sequence; see begin. -

-

+ begin(s) +

+ An iterator to the first element of the sequence; see begin. +

-

- end(s) -

-
-

- A past-the-end iterator to the sequence; see end. -

-

+ end(s) +

+ A past-the-end iterator to the sequence; see end. +

-

- size(s) -

-
-

- The size of the sequence; see size. -

-

+ size(s) +

+ The size of the sequence; see size. +

-

- empty(s) -

-
-

- A boolean Integral Constant c - such that c::value == - true if and only if the - sequence is empty; see empty. -

-

+ empty(s) +

+ A boolean Integral Constant c + such that c::value == + true if and only if the + sequence is empty; see empty. +

-

- front(s) -

-
-

- The first element in the sequence; see front. -

-

+ front(s) +

+ The first element in the sequence; see front. +

-
- - Invariants -
+
+ + Invariants +

For any Forward Sequence s the following invariants always hold:

-
-
- - Result +
+ + Result Type Expressions -
+
- - + +

- - + +

- - + +

- - + +

- - + +

-

+

Expression -

-
-

+

Compile Time Complexity -

-
-

- result_of::begin<S>::type -

-
-

+

+ result_of::begin<S>::type +

Amortized constant time -

-
-

- result_of::end<S>::type -

-
-

+

+ result_of::end<S>::type +

Amortized constant time -

-
-

- result_of::at<S, - N>::type -

-
-

+

+ result_of::at<S, + N>::type +

Amortized constant time -

-
-

- result_of::value_at<S, - N>::type -

-
-

+

+ result_of::value_at<S, + N>::type +

Amortized constant time -

-
- +
+ + Expression Semantics -
+

The semantics of an expression are defined only where they differ from, - or are not defined in Bidirectional + or are not defined in Bidirectional Sequence.

@@ -306,49 +257,41 @@ - - + +

- - + +
-

+

Expression -

-
-

+

Semantics -

-
-

- at<N>(s) -

-
-

- The Nth element from the beginning of the sequence; see at. -

-

+ at<N>(s) +

+ The Nth element from the beginning of the sequence; see at. +

-
- - Models -
-
    -
  • std::pair
  • -
  • boost::array
  • -
  • vector
  • -
  • reverse_view
  • -
  • -iterator_range +
    + + Models +
    +
    diff --git a/doc/html/fusion/sequence/intrinsic.html b/doc/html/fusion/sequence/intrinsic.html index 3556b04f..50577a23 100644 --- a/doc/html/fusion/sequence/intrinsic.html +++ b/doc/html/fusion/sequence/intrinsic.html @@ -3,10 +3,11 @@ Intrinsic - + - + @@ -22,34 +23,37 @@
    PrevUpHomeNext
    -
    - +
    +
    + +
    +

    - Intrinsic form the essential interface of every Fusion Sequence. + Intrinsic form the essential interface of every Fusion Sequence. STL counterparts of these functions are usually implemented as member functions. - Intrinsic functions, unlike Algorithms, - are not generic across the full Sequence - repertoire. They need to be implemented for each Fusion Sequence - [5] + Intrinsic functions, unlike Algorithms, + are not generic across the full Sequence + repertoire. They need to be implemented for each Fusion Sequence + [5] .

    -
    - - Header -
    +

    + + Header +

    #include <boost/fusion/sequence/intrinsic.hpp>
     #include <boost/fusion/include/intrinsic.hpp>
     


    -

    [5] +

    [5] In practice, many of intrinsic functions have default implementations that will work in majority of cases

    diff --git a/doc/html/fusion/sequence/intrinsic/functions.html b/doc/html/fusion/sequence/intrinsic/functions.html index 192d7ed5..e2b94ae0 100644 --- a/doc/html/fusion/sequence/intrinsic/functions.html +++ b/doc/html/fusion/sequence/intrinsic/functions.html @@ -3,10 +3,10 @@ Functions - + - + @@ -22,10 +22,13 @@
    PrevUpHomeNext
    -
    - +
    +
    + +
    +
    begin
    end
    diff --git a/doc/html/fusion/sequence/intrinsic/functions/at.html b/doc/html/fusion/sequence/intrinsic/functions/at.html index 9b082f85..a71a663e 100644 --- a/doc/html/fusion/sequence/intrinsic/functions/at.html +++ b/doc/html/fusion/sequence/intrinsic/functions/at.html @@ -3,10 +3,10 @@ at - + - + @@ -22,32 +22,35 @@
    PrevUpHomeNext
    -
    -
    -at -
    +
    +
    +
    +at +
    +
    +
    - - Description + + Description

    Returns the N-th element from the beginning of the sequence.

    - - Synopsis + + Synopsis
    template <typename N, typename Sequence>
    -typename result_of::at<Sequence, N>::type
    +typename result_of::at<Sequence, N>::type
     at(Sequence& seq);
     
     template <typename N, typename Sequence>
    -typename result_of::at<Sequence const, N>::type
    +typename result_of::at<Sequence const, N>::type
     at(Sequence const& seq);
     
    - - Parameters + + Parameters
    @@ -56,99 +59,82 @@ - - + - + +

    - - + - + +

    - - + - + +

    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - seq -

    -
    -

    - Model of Random +

    + seq +

    + Model of Random Access Sequence -

    -
    -

    +

    The sequence we wish to investigate. -

    -
    -

    - N -

    -
    -

    +

    + N +

    An MPL Integral Constant -

    -
    -

    +

    An index from the beginning of the sequence. -

    -
    - - Expression + + Expression Semantics
    at<N>(seq);
     

    - Return type: Returns a reference to - the N-th element from the beginning of the sequence seq - if seq is mutable and - e = - o, where e + Return type: Returns a reference to + the N-th element from the beginning of the sequence seq + if seq is mutable and + e = + o, where e is the N-th 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 sequence.

    - Precondition: 0 - <= N::value < size(s) + Precondition: 0 + <= N::value < size(s)

    - Semantics: Equivalent to + Semantics: Equivalent to

    -
    deref(advance<N>(begin(s)))
    +
    deref(advance<N>(begin(s)))
     
    - - Header + + Header
    #include <boost/fusion/sequence/intrinsic/at.hpp>
     #include <boost/fusion/include/at.hpp>
     
    - - Example + + Example
    -
    vector<int, int, int> v(1, 2, 3);
    +
    vector<int, int, int> v(1, 2, 3);
     assert(at<mpl::int_<1> >(v) == 2);
     
    diff --git a/doc/html/fusion/sequence/intrinsic/functions/at_c.html b/doc/html/fusion/sequence/intrinsic/functions/at_c.html index 672b860f..71e1f788 100644 --- a/doc/html/fusion/sequence/intrinsic/functions/at_c.html +++ b/doc/html/fusion/sequence/intrinsic/functions/at_c.html @@ -3,10 +3,10 @@ at_c - + - + @@ -22,32 +22,35 @@
    PrevUpHomeNext
    -
    -
    -at_c -
    +
    +
    +
    +at_c +
    +
    +
    - - Description + + Description

    Returns the N-th element from the beginning of the sequence.

    - - Synopsis + + Synopsis
    template <int N, typename Sequence>
    -typename result_of::at_c<Sequence, N>::type
    +typename result_of::at_c<Sequence, N>::type
     at_c(Sequence& seq);
     
     template <int N, typename Sequence>
    -typename result_of::at_c<Sequence const, N>::type
    +typename result_of::at_c<Sequence const, N>::type
     at_c(Sequence const& seq);
     
    - - Parameters + + Parameters
    @@ -56,99 +59,82 @@ - - + - + +

    - - + - + +

    - - + - + +

    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - seq -

    -
    -

    - Model of Random +

    + seq +

    + Model of Random Access Sequence -

    -
    -

    +

    The sequence we wish to investigate. -

    -
    -

    - N -

    -
    -

    +

    + N +

    An integral constant -

    -
    -

    +

    An index from the beginning of the sequence. -

    -
    - - Expression + + Expression Semantics
    at_c<N>(seq);
     

    - Return type: Returns a reference to - the N-th element from the beginning of the sequence seq - if seq is mutable and - e = - o, where e + Return type: Returns a reference to + the N-th element from the beginning of the sequence seq + if seq is mutable and + e = + o, where e is the N-th 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 sequence.

    - Precondition: 0 + Precondition: 0 <= N - < size(s) + < size(s)

    - Semantics: Equivalent to + Semantics: Equivalent to

    -
    deref(advance<N>(begin(s)))
    +
    deref(advance<N>(begin(s)))
     
    - - Header + + Header
    #include <boost/fusion/sequence/intrinsic/at_c.hpp>
     #include <boost/fusion/include/at_c.hpp>
     
    - - Example + + Example
    -
    vector<int, int, int> v(1, 2, 3);
    +
    vector<int, int, int> v(1, 2, 3);
     assert(at_c<1>(v) == 2);
     
    diff --git a/doc/html/fusion/sequence/intrinsic/functions/at_key.html b/doc/html/fusion/sequence/intrinsic/functions/at_key.html index ce74b346..1843dfaa 100644 --- a/doc/html/fusion/sequence/intrinsic/functions/at_key.html +++ b/doc/html/fusion/sequence/intrinsic/functions/at_key.html @@ -3,10 +3,10 @@ at_key - + - + @@ -22,32 +22,35 @@
    PrevUpHomeNext
    -
    -
    -at_key -
    +
    +
    +
    +at_key +
    +
    +
    - - Description + + Description

    Returns the element associated with a Key from the sequence.

    - - Synopsis + + Synopsis
    template <typename Key, typename Sequence>
    -typename result_of::at_key<Sequence, Key>::type
    +typename result_of::at_key<Sequence, Key>::type
     at_key(Sequence& seq);
     
     template <typename Key, typename Sequence>
    -typename result_of::at_key<Sequence const, Key>::type
    +typename result_of::at_key<Sequence const, Key>::type
     at_key(Sequence const& seq);
     
    - - Parameters + + Parameters
    @@ -56,95 +59,78 @@ - - + - + +

    - - + - + +

    - - + - + +

    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - seq -

    -
    -

    - Model of Associative +

    + seq +

    + Model of Associative Sequence -

    -
    -

    +

    The sequence we wish to investigate. -

    -
    -

    - Key -

    -
    -

    +

    + Key +

    Any type -

    -
    -

    +

    The queried key. -

    -
    - - Expression + + Expression Semantics
    at_key<Key>(seq);
     

    - Return type: Returns a reference to - the element associated with Key from the sequence seq - if seq is mutable and - e = - o, where e + Return type: Returns a reference to + the element associated with Key from the sequence seq + if seq is mutable and + e = + o, where e is the element associated with Key, is a valid expression. Else, returns a type convertable to the element associated with Key.

    - Precondition: has_key<Key>(seq) == true + Precondition: has_key<Key>(seq) == true

    - Semantics: Returns the element associated + Semantics: Returns the element associated with Key.

    - - Header + + Header
    #include <boost/fusion/sequence/intrinsic/at_key.hpp>
     #include <boost/fusion/include/at_key.hpp>
     
    - - Example + + Example
    -
    set<int, char, bool> s(1, 'x', true);
    +
    set<int, char, bool> s(1, 'x', true);
     assert(at_key<char>(s) == 'x');
     
    diff --git a/doc/html/fusion/sequence/intrinsic/functions/back.html b/doc/html/fusion/sequence/intrinsic/functions/back.html index 7fedb3db..6a90422e 100644 --- a/doc/html/fusion/sequence/intrinsic/functions/back.html +++ b/doc/html/fusion/sequence/intrinsic/functions/back.html @@ -3,10 +3,10 @@ back - + - + @@ -22,32 +22,35 @@
    PrevUpHomeNext
    -
    -
    -back -
    +
    +
    +
    +back +
    +
    +
    - - Description + + Description

    Returns the last element in the sequence.

    - - Synopsis + + Synopsis
    template <typename Sequence>
    -typename result_of::back<Sequence>::type
    +typename result_of::back<Sequence>::type
     back(Sequence& seq);
     
     template <typename Sequence>
    -typename result_of::back<Sequence const>::type
    +typename result_of::back<Sequence const>::type
     back(Sequence const& seq);
     
    - - Parameters + + Parameters
    @@ -56,76 +59,65 @@ - - + - + +

    - - + - + +

    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - seq -

    -
    -

    - Model of Bidirectional +

    + seq +

    + Model of Bidirectional Sequence -

    -
    -

    +

    The sequence we wish to investigate. -

    -
    - - Expression + + Expression Semantics
    back(seq);
     

    - Return type: Returns a reference to - the last element in the sequence seq - if seq is mutable and - e = - o, where e + Return type: Returns a reference to + the last element in the sequence seq + if seq is mutable and + e = + o, where e is the last element in the sequence, is a valid expression. Else, returns a type convertable to the last element in the sequence.

    - Precondition: empty(seq) == false + Precondition: empty(seq) == false

    - Semantics: Returns the last element + Semantics: Returns the last element in the sequence.

    - - Header + + Header
    #include <boost/fusion/sequence/intrinsic/back.hpp>
     #include <boost/fusion/include/back.hpp>
     
    - - Example + + Example
    -
    vector<int, int, int> v(1, 2, 3);
    +
    vector<int, int, int> v(1, 2, 3);
     assert(back(v) == 3);
     
    diff --git a/doc/html/fusion/sequence/intrinsic/functions/begin.html b/doc/html/fusion/sequence/intrinsic/functions/begin.html index 3d8627f4..4d30a547 100644 --- a/doc/html/fusion/sequence/intrinsic/functions/begin.html +++ b/doc/html/fusion/sequence/intrinsic/functions/begin.html @@ -3,10 +3,10 @@ begin - + - + @@ -22,32 +22,35 @@
    PrevUpHomeNext
    -
    -
    -begin -
    +
    +
    +
    +begin +
    +
    +
    - - Description + + Description

    Returns an iterator pointing to the first element in the sequence.

    - - Synopsis + + Synopsis
    template <typename Sequence>
    -typename result_of::begin<Sequence>::type
    +typename result_of::begin<Sequence>::type
     begin(Sequence& seq);
     
     template <typename Sequence>
    -typename result_of::begin<Sequence const>::type
    +typename result_of::begin<Sequence const>::type
     begin(Sequence const& seq);
     
    - - Parameters + + Parameters
    @@ -56,77 +59,72 @@ - - + - + +

    - - + - + +

    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - seq -

    -
    -

    - Model of Forward +

    + seq +

    + Model of Forward Sequence -

    -
    -

    +

    The sequence we wish to get an iterator from. -

    -
    - - Expression + + Expression Semantics
    begin(seq);
     

    - Return type: Forward - Iterator if seq - is a Forward - Sequence else, Bidirectional - Iterator if seq - is a Bidirectional - Sequence else, Random - Access Iterator if seq - is a Random + Return type: Forward + Iterator if seq + is a Forward + Sequence else, Bidirectional + Iterator if seq + is a Bidirectional + Sequence else, Random + Access Iterator if seq + is a Random Access Sequence.

    - Semantics: Returns an iterator pointing + Semantics: Returns an iterator pointing to the first element in the sequence.

    - - Header + + Header
    #include <boost/fusion/sequence/intrinsic/begin.hpp>
     #include <boost/fusion/include/begin.hpp>
     
    - - Example + + Example
    -
    vector<int, int, int> v(1, 2, 3);
    -assert(deref(begin(v)) == 1);
    +
    vector<int, int, int> v(1, 2, 3);
    +assert(deref(begin(v)) == 1);
     
    diff --git a/doc/html/fusion/sequence/intrinsic/functions/empty.html b/doc/html/fusion/sequence/intrinsic/functions/empty.html index accf602b..5c410a05 100644 --- a/doc/html/fusion/sequence/intrinsic/functions/empty.html +++ b/doc/html/fusion/sequence/intrinsic/functions/empty.html @@ -3,10 +3,10 @@ empty - + - + @@ -22,30 +22,33 @@
    PrevUpHomeNext
    -
    -
    -empty -
    +
    +
    +
    +empty +
    +
    +
    - - Description + + Description

    - Returns a type convertible to bool - that evaluates to true if - the sequence is empty, else, evaluates to false. + Returns a type convertible to bool + that evaluates to true if + the sequence is empty, else, evaluates to false.

    - - Synopsis + + Synopsis
    template <typename Sequence>
    -typename result_of::empty<Sequence>::type
    +typename result_of::empty<Sequence>::type
     empty(Sequence const& seq);
     
    - - Parameters + + Parameters
    @@ -54,67 +57,56 @@ - - + - + +

    - - + - + +

    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - seq -

    -
    -

    - Model of Forward +

    + seq +

    + Model of Forward Sequence -

    -
    -

    +

    The sequence we wish to investigate. -

    -
    - - Expression + + Expression Semantics
    empty(seq);
     

    - Return type: Convertible to bool. + Return type: Convertible to bool.

    - Semantics: Evaluates to true if the sequence is empty, else, evaluates - to false. + Semantics: Evaluates to true if the sequence is empty, else, evaluates + to false.

    - - Header + + Header
    #include <boost/fusion/sequence/intrinsic/empty.hpp>
     #include <boost/fusion/include/empty.hpp>
     
    - - Example + + Example
    -
    vector<int, int, int> v(1, 2, 3);
    +
    vector<int, int, int> v(1, 2, 3);
     assert(empty(v) == false);
     
    diff --git a/doc/html/fusion/sequence/intrinsic/functions/end.html b/doc/html/fusion/sequence/intrinsic/functions/end.html index 1a002a1b..1bcac953 100644 --- a/doc/html/fusion/sequence/intrinsic/functions/end.html +++ b/doc/html/fusion/sequence/intrinsic/functions/end.html @@ -3,10 +3,10 @@ end - + - + @@ -22,32 +22,35 @@
    PrevUpHomeNext
    -
    -
    -end -
    +
    +
    +
    +end +
    +
    +
    - - Description + + Description

    Returns an iterator pointing to one element past the end of the sequence.

    - - Synopsis + + Synopsis
    template <typename Sequence>
    -typename result_of::end<Sequence>::type
    +typename result_of::end<Sequence>::type
     end(Sequence& seq);
     
     template <typename Sequence>
    -typename result_of::end<Sequence const>::type
    +typename result_of::end<Sequence const>::type
     end(Sequence const& seq);
     
    - - Parameters + + Parameters
    @@ -56,77 +59,72 @@ - - + - + +

    - - + - + +

    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - seq -

    -
    -

    - Model of Forward +

    + seq +

    + Model of Forward Sequence -

    -
    -

    +

    The sequence we wish to get an iterator from. -

    -
    - - Expression + + Expression Semantics
    end(seq);
     

    - Return type: Forward - Iterator if seq - is a Forward - Sequence else, Bidirectional - Iterator if seq - is a Bidirectional - Sequence else, Random - Access Iterator if seq - is a Random + Return type: Forward + Iterator if seq + is a Forward + Sequence else, Bidirectional + Iterator if seq + is a Bidirectional + Sequence else, Random + Access Iterator if seq + is a Random Access Sequence.

    - Semantics: Returns an iterator pointing + Semantics: Returns an iterator pointing to one element past the end of the sequence.

    - - Header + + Header
    #include <boost/fusion/sequence/intrinsic/end.hpp>
     #include <boost/fusion/include/end.hpp>
     
    - - Example + + Example
    -
    vector<int, int, int> v(1, 2, 3);
    -assert(deref(prior(end(v))) == 3);
    +
    vector<int, int, int> v(1, 2, 3);
    +assert(deref(prior(end(v))) == 3);
     
    diff --git a/doc/html/fusion/sequence/intrinsic/functions/front.html b/doc/html/fusion/sequence/intrinsic/functions/front.html index a485719f..78b58256 100644 --- a/doc/html/fusion/sequence/intrinsic/functions/front.html +++ b/doc/html/fusion/sequence/intrinsic/functions/front.html @@ -3,10 +3,10 @@ front - + - + @@ -22,32 +22,35 @@
    PrevUpHomeNext
    -
    -
    -front -
    +
    +
    +
    +front +
    +
    +
    - - Description + + Description

    Returns the first element in the sequence.

    - - Synopsis + + Synopsis
    template <typename Sequence>
    -typename result_of::front<Sequence>::type
    +typename result_of::front<Sequence>::type
     front(Sequence& seq);
     
     template <typename Sequence>
    -typename result_of::front<Sequence const>::type
    +typename result_of::front<Sequence const>::type
     front(Sequence const& seq);
     
    - - Parameters + + Parameters
    @@ -56,76 +59,65 @@ - - + - + +

    - - + - + +

    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - seq -

    -
    -

    - Model of Forward +

    + seq +

    + Model of Forward Sequence -

    -
    -

    +

    The sequence we wish to investigate. -

    -
    - - Expression + + Expression Semantics
    front(seq);
     

    - Return type: Returns a reference to - the first element in the sequence seq - if seq is mutable and - e = - o, where e + Return type: Returns a reference to + the first element in the sequence seq + if seq is mutable and + e = + o, where e is the first element in the sequence, is a valid expression. Else, returns a type convertable to the first element in the sequence.

    - Precondition: empty(seq) == false + Precondition: empty(seq) == false

    - Semantics: Returns the first element + Semantics: Returns the first element in the sequence.

    - - Header + + Header
    #include <boost/fusion/sequence/intrinsic/front.hpp>
     #include <boost/fusion/include/front.hpp>
     
    - - Example + + Example
    -
    vector<int, int, int> v(1, 2, 3);
    +
    vector<int, int, int> v(1, 2, 3);
     assert(front(v) == 1);
     
    diff --git a/doc/html/fusion/sequence/intrinsic/functions/has_key.html b/doc/html/fusion/sequence/intrinsic/functions/has_key.html index 1630c313..b2bae525 100644 --- a/doc/html/fusion/sequence/intrinsic/functions/has_key.html +++ b/doc/html/fusion/sequence/intrinsic/functions/has_key.html @@ -3,10 +3,10 @@ has_key - + - + @@ -22,31 +22,34 @@
    PrevUpHomeNext
    -
    - +
    +
    + +
    +
    - - Description + + Description

    - Returns a type convertible to bool - that evaluates to true if + Returns a type convertible to bool + that evaluates to true if the sequence contains an element associated with a Key, else, evaluates - to false. + to false.

    - - Synopsis + + Synopsis
    template <typename Key, typename Sequence>
    -typename result_of::has_key<Sequence, Key>::type
    +typename result_of::has_key<Sequence, Key>::type
     has_key(Sequence const& seq);
     
    - - Parameters + + Parameters
    @@ -55,86 +58,69 @@ - - + - + +

    - - + - + +

    - - + - + +

    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - seq -

    -
    -

    - Model of Associative +

    + seq +

    + Model of Associative Sequence -

    -
    -

    +

    The sequence we wish to investigate. -

    -
    -

    - Key -

    -
    -

    +

    + Key +

    Any type -

    -
    -

    +

    The queried key. -

    -
    - - Expression + + Expression Semantics
    has_key<Key>(seq);
     

    - Return type: Convertible to bool. + Return type: Convertible to bool.

    - Semantics: Evaluates to true if the sequence contains an element - associated with Key, else, evaluates to false. + Semantics: Evaluates to true if the sequence contains an element + associated with Key, else, evaluates to false.

    - - Header + + Header
    #include <boost/fusion/sequence/intrinsic/has_key.hpp>
     #include <boost/fusion/include/has_key.hpp>
     
    - - Example + + Example
    -
    set<int, char, bool> s(1, 'x', true);
    +
    set<int, char, bool> s(1, 'x', true);
     assert(has_key<char>(s) == true);
     
    diff --git a/doc/html/fusion/sequence/intrinsic/functions/size.html b/doc/html/fusion/sequence/intrinsic/functions/size.html index a7275245..b83dce43 100644 --- a/doc/html/fusion/sequence/intrinsic/functions/size.html +++ b/doc/html/fusion/sequence/intrinsic/functions/size.html @@ -3,10 +3,10 @@ size - + - + @@ -22,29 +22,32 @@
    PrevUpHomeNext
    -
    -
    -size -
    +
    +
    +
    +size +
    +
    +
    - - Description + + Description

    - Returns a type convertible to int + Returns a type convertible to int that evaluates the number of elements in the sequence.

    - - Synopsis + + Synopsis
    template <typename Sequence>
    -typename result_of::size<Sequence>::type
    +typename result_of::size<Sequence>::type
     size(Sequence const& seq);
     
    - - Parameters + + Parameters
    @@ -53,67 +56,56 @@ - - + - + +

    - - + - + +

    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - seq -

    -
    -

    - Model of Forward +

    + seq +

    + Model of Forward Sequence -

    -
    -

    +

    The sequence we wish to investigate. -

    -
    - - Expression + + Expression Semantics
    size(seq);
     

    - Return type: Convertible to int. + Return type: Convertible to int.

    - Semantics: Returns the number of elements + Semantics: Returns the number of elements in the sequence.

    - - Header + + Header
    #include <boost/fusion/sequence/intrinsic/size.hpp>
     #include <boost/fusion/include/size.hpp>
     
    - - Example + + Example
    -
    vector<int, int, int> v(1, 2, 3);
    +
    vector<int, int, int> v(1, 2, 3);
     assert(size(v) == 3);
     
    diff --git a/doc/html/fusion/sequence/intrinsic/functions/swap.html b/doc/html/fusion/sequence/intrinsic/functions/swap.html index 846e11c1..85d277c2 100644 --- a/doc/html/fusion/sequence/intrinsic/functions/swap.html +++ b/doc/html/fusion/sequence/intrinsic/functions/swap.html @@ -3,10 +3,10 @@ swap - + - + @@ -22,27 +22,30 @@
    PrevUpHomeNext
    -
    -
    -swap -
    +
    +
    +
    +swap +
    +
    +
    - - Description + + Description

    Performs an element by element swap of the elements in 2 sequences.

    - - Synopsis + + Synopsis
    template<typename Seq1, typename Seq2>
     void swap(Seq1& seq1, Seq2& seq2);
     
    - - Parameters + + Parameters
    @@ -51,68 +54,57 @@ - - + - + +

    - - + - + +

    -

    +

    Parameters -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - seq1, seq2 -

    -
    -

    - Models of Forward +

    + seq1, seq2 +

    + Models of Forward Sequence -

    -
    -

    +

    The sequences whos elements we wish to swap. -

    -
    - - Expression + + Expression Semantics
    swap(seq1, seq2);
     

    - Return type: void + Return type: void

    - Precondition: size(seq1) == size(seq2) + Precondition: size(seq1) == size(seq2)

    - Semantics: Calls swap(a1, b1) for corresponding elements in seq1 and seq2. + Semantics: Calls swap(a1, b1) for corresponding elements in seq1 and seq2.

    /sequence/intrinsic/swap.hpp>

    - - Example + + Example
    -
    vector<int, std::string> v1(1, "hello"), v2(2, "world");
    +
    vector<int, std::string> v1(1, "hello"), v2(2, "world");
     swap(v1, v2);
    -assert(v1 == make_vector(2, "world"));
    -assert(v2 == make_vector(1, "hello"));
    +assert(v1 == make_vector(2, "world"));
    +assert(v2 == make_vector(1, "hello"));
     
    diff --git a/doc/html/fusion/sequence/intrinsic/metafunctions.html b/doc/html/fusion/sequence/intrinsic/metafunctions.html index 5867b7fe..8166d000 100644 --- a/doc/html/fusion/sequence/intrinsic/metafunctions.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions.html @@ -3,10 +3,10 @@ Metafunctions - + - + @@ -22,10 +22,13 @@
    PrevUpHomeNext
    -
    - +
    +
    + +
    +
    begin
    end
    diff --git a/doc/html/fusion/sequence/intrinsic/metafunctions/at.html b/doc/html/fusion/sequence/intrinsic/metafunctions/at.html index 99bea1fd..c6409c32 100644 --- a/doc/html/fusion/sequence/intrinsic/metafunctions/at.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/at.html @@ -3,10 +3,10 @@ at - + - + @@ -22,22 +22,25 @@
    PrevUpHomeNext
    -
    -
    -at -
    +
    +
    +
    +at +
    +
    +
    - - Description + + Description

    - Returns the result type of at - [6] + Returns the result type of at + [6] .

    - - Synopsis + + Synopsis
    template<
         typename Seq,
    @@ -48,101 +51,84 @@
     };
     
    -

    Table 1.25. Parameters

    -
    +

    Table 1.25. Parameters

    +
    - - + - + +

    - - + - + +

    - - + - + +

    -
    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - Seq -

    -
    -

    - A model of Forward +

    + Seq +

    + A model of Forward Sequence -

    -
    -

    +

    Argument sequence -

    -
    -

    - N -

    -
    -

    +

    + N +

    An MPL Integral Constant -

    -
    -

    +

    Index of element -

    -
    +
    -
    - - Expression +
    + + Expression Semantics
    result_of::at<Seq, N>::type
     

    - Return type: Any type. + Return type: Any type.

    - Semantics: Returns the result type of - using at to access the Nth element of Seq. + Semantics: Returns the result type of + using at to access the Nth element of Seq.

    /sequence/intrinsic/at.hpp>

    - - Example + + Example
    -
    typedef vector<int,float,char> vec;
    -BOOST_MPL_ASSERT((boost::is_same<result_of::at<vec, boost::mpl::int_<1> >::type, float&>));
    +
    typedef vector<int,float,char> vec;
    +BOOST_MPL_ASSERT((boost::is_same<result_of::at<vec, boost::mpl::int_<1> >::type, float&>));
     


    -

    [6] - result_of::at reflects the actual return - type of the function at. Sequence(s) - typically return references to its elements via the at function. If you want - to get the actual element type, use result_of::value_at +

    [6] + result_of::at reflects the actual return + type of the function at. Sequence(s) + typically return references to its elements via the at function. If you want + to get the actual element type, use result_of::value_at

    diff --git a/doc/html/fusion/sequence/intrinsic/metafunctions/at_c.html b/doc/html/fusion/sequence/intrinsic/metafunctions/at_c.html index 83f57d64..33968e9b 100644 --- a/doc/html/fusion/sequence/intrinsic/metafunctions/at_c.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/at_c.html @@ -3,10 +3,10 @@ at_c - + - + @@ -22,22 +22,25 @@
    PrevUpHomeNext
    -
    -
    -at_c -
    +
    +
    +
    +at_c +
    +
    +
    - - Description + + Description

    - Returns the result type of at_c - [7] + Returns the result type of at_c + [7] .

    - - Synopsis + + Synopsis
    template<
         typename Seq,
    @@ -48,100 +51,83 @@
     };
     
    -

    Table 1.26. Parameters

    -
    +

    Table 1.26. Parameters

    +
    - - + - + +

    - - + - + +

    - - + - + +

    -
    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - Seq -

    -
    -

    - A model of Forward +

    + Seq +

    + A model of Forward Sequence -

    -
    -

    +

    Argument sequence -

    -
    -

    - M -

    -
    -

    +

    + M +

    Positive integer index -

    -
    -

    +

    Index of element -

    -
    +
    -
    - - Expression +
    + + Expression Semantics
    result_of::at_c<Seq, M>::type
     

    - Return type: Any type + Return type: Any type

    - Semantics: Returns the result type of - using at_c to access the Mth element of Seq. + Semantics: Returns the result type of + using at_c to access the Mth element of Seq.

    /sequence/intrinsic/at.hpp>

    - - Example + + Example
    -
    typedef vector<int,float,char> vec;
    -BOOST_MPL_ASSERT((boost::is_same<result_of::at_c<vec, 1>::type, float&>));
    +
    typedef vector<int,float,char> vec;
    +BOOST_MPL_ASSERT((boost::is_same<result_of::at_c<vec, 1>::type, float&>));
     


    -

    [7] - result_of::at_c reflects the actual - return type of the function at_c. Sequence(s) - typically return references to its elements via the at_c function. If you want - to get the actual element type, use result_of::value_at_c +

    [7] + result_of::at_c reflects the actual + return type of the function at_c. Sequence(s) + typically return references to its elements via the at_c function. If you want + to get the actual element type, use result_of::value_at_c

    diff --git a/doc/html/fusion/sequence/intrinsic/metafunctions/at_key.html b/doc/html/fusion/sequence/intrinsic/metafunctions/at_key.html index 018be677..4d39311c 100644 --- a/doc/html/fusion/sequence/intrinsic/metafunctions/at_key.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/at_key.html @@ -3,10 +3,10 @@ at_key - + - + @@ -22,22 +22,25 @@
    PrevUpHomeNext
    -
    -
    -at_key -
    +
    +
    +
    +at_key +
    +
    +
    - - Description + + Description

    - Returns the result type of at_key - [8] + Returns the result type of at_key + [8] .

    - - Synopsis + + Synopsis
    template<
         typename Seq,
    @@ -48,102 +51,85 @@
     };
     
    -

    Table 1.30. Parameters

    -
    +

    Table 1.30. Parameters

    +
    - - + - + +

    - - + - + +

    - - + - + +

    -
    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - Seq -

    -
    -

    - A model of Forward +

    + Seq +

    + A model of Forward Sequence -

    -
    -

    +

    Argument sequence -

    -
    -

    - Key -

    -
    -

    +

    + Key +

    Any type -

    -
    -

    +

    Key type -

    -
    +
    -
    - - Expression +
    + + Expression Semantics
    result_of::at_key<Seq, Key>::type
     

    - Return type: Any type. + Return type: Any type.

    - Semantics: Returns the result of using - at_key to access the element - with key type Key in - Seq. + Semantics: Returns the result of using + at_key to access the element + with key type Key in + Seq.

    /sequence/intrinsic/at_key.hpp>

    - - Example + + Example
    -
    typedef map<pair<int, char>, pair<char, char>, pair<double, char> > mymap;
    -BOOST_MPL_ASSERT((boost::is_same<result_of::at_key<mymap, int>::type, char&>));
    +
    typedef map<pair<int, char>, pair<char, char>, pair<double, char> > mymap;
    +BOOST_MPL_ASSERT((boost::is_same<result_of::at_key<mymap, int>::type, char&>));
     


    -

    [8] - result_of::at_key reflects the actual - return type of the function at_key. _sequence_s - typically return references to its elements via the at_key function. If you - want to get the actual element type, use result_of::value_at_key +

    [8] + result_of::at_key reflects the actual + return type of the function at_key. _sequence_s + typically return references to its elements via the at_key function. If you + want to get the actual element type, use result_of::value_at_key

    diff --git a/doc/html/fusion/sequence/intrinsic/metafunctions/back.html b/doc/html/fusion/sequence/intrinsic/metafunctions/back.html index cc97fec5..f8750874 100644 --- a/doc/html/fusion/sequence/intrinsic/metafunctions/back.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/back.html @@ -3,10 +3,10 @@ back - + - + @@ -22,20 +22,23 @@
    PrevUpHomeNext
    -
    -
    -back -
    +
    +
    +
    +back +
    +
    +
    - - Description + + Description

    - Returns the result type of back. + Returns the result type of back.

    - - Synopsis + + Synopsis
    template<typename Seq>
     struct back
    @@ -44,73 +47,62 @@
     };
     
    -

    Table 1.23. Parameters

    -
    +

    Table 1.23. Parameters

    +
    - - + - + +

    - - + - + +

    -
    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - Seq -

    -
    -

    - A model of Forward +

    + Seq +

    + A model of Forward Sequence -

    -
    -

    +

    Argument sequence -

    -
    +
    -
    - - Expression +
    + + Expression Semantics
    result_of::back<Seq>::type
     

    - Return type: Any type + Return type: Any type

    - Semantics: The type returned by dereferencing - an iterator to the last element in the sequence. Equivalent to result_of::deref<result_of::prior<result_of::end<Seq>::type>::type>::type. + Semantics: The type returned by dereferencing + an iterator to the last element in the sequence. Equivalent to result_of::deref<result_of::prior<result_of::end<Seq>::type>::type>::type.

    /sequence/intrinsic/back.hpp>

    - - Example + + Example
    -
    typedef vector<int,char> vec;
    -BOOST_MPL_ASSERT((boost::is_same<result_of::back<vec>::type, char&>));
    +
    typedef vector<int,char> vec;
    +BOOST_MPL_ASSERT((boost::is_same<result_of::back<vec>::type, char&>));
     
    diff --git a/doc/html/fusion/sequence/intrinsic/metafunctions/begin.html b/doc/html/fusion/sequence/intrinsic/metafunctions/begin.html index 86bbb9d2..ed242471 100644 --- a/doc/html/fusion/sequence/intrinsic/metafunctions/begin.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/begin.html @@ -3,10 +3,10 @@ begin - + - + @@ -22,20 +22,23 @@
    PrevUpHomeNext
    -
    -
    -begin -
    +
    +
    +
    +begin +
    +
    +
    - - Description + + Description

    - Returns the result type of begin. + Returns the result type of begin.

    - - Synopsis + + Synopsis
    template<typename Seq>
     struct begin
    @@ -44,75 +47,64 @@
     };
     
    -

    Table 1.19. Parameters

    -
    +

    Table 1.19. Parameters

    +
    - - + - + +

    - - + - + +

    -
    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - Seq -

    -
    -

    - A model of Forward +

    + Seq +

    + A model of Forward Sequence -

    -
    -

    +

    Argument sequence -

    -
    +
    -
    - - Expression +
    + + Expression Semantics
    result_of::begin<Seq>::type
     

    - Return type: An iterator modelling the - same traversal concept as Seq. + Return type: An iterator modelling the + same traversal concept as Seq.

    - Semantics: Returns the type of an iterator - to the first element of Seq. + Semantics: Returns the type of an iterator + to the first element of Seq.

    /sequence/intrinsic/begin.hpp>

    - - Example + + Example
    -
    typedef vector<int> vec;
    -typedef result_of::begin<vec>::type it;
    -BOOST_MPL_ASSERT((boost::is_same<result_of::deref<it>::type, int&>))
    +
    typedef vector<int> vec;
    +typedef result_of::begin<vec>::type it;
    +BOOST_MPL_ASSERT((boost::is_same<result_of::deref<it>::type, int&>))
     
    diff --git a/doc/html/fusion/sequence/intrinsic/metafunctions/empty.html b/doc/html/fusion/sequence/intrinsic/metafunctions/empty.html index c40d5389..614d9b33 100644 --- a/doc/html/fusion/sequence/intrinsic/metafunctions/empty.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/empty.html @@ -3,10 +3,10 @@ empty - + - + @@ -22,20 +22,23 @@
    PrevUpHomeNext
    -
    -
    -empty -
    +
    +
    +
    +empty +
    +
    +
    - - Description + + Description

    - Returns the result type of empty. + Returns the result type of empty.

    - - Synopsis + + Synopsis
    template<typename Seq>
     struct empty
    @@ -44,78 +47,67 @@
     };
     
    -

    Table 1.21. Parameters

    -
    +

    Table 1.21. Parameters

    +
    - - + - + +

    - - + - + +

    -
    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - Seq -

    -
    -

    - A model of Forward +

    + Seq +

    + A model of Forward Sequence -

    -
    -

    +

    Argument sequence -

    -
    +
    -
    - - Expression +
    + + Expression Semantics
    result_of::empty<Seq>::type
     

    - Return type: An MPL + Return type: An MPL Integral Constant

    - Semantics: Returns mpl::true_ - if Seq has zero elements, - mpl::false_ otherwise. + Semantics: Returns mpl::true_ + if Seq has zero elements, + mpl::false_ otherwise.

    /sequence/intrinsic/empty.hpp>

    - - Example + + Example
    -
    typedef vector<> empty_vec;
    -typedef vector<int,float,char> vec;
    +
    typedef vector<> empty_vec;
    +typedef vector<int,float,char> vec;
     
    -BOOST_MPL_ASSERT((result_of::empty<empty_vec>));
    -BOOST_MPL_ASSERT_NOT((result_of::empty<vec>));
    +BOOST_MPL_ASSERT((result_of::empty<empty_vec>));
    +BOOST_MPL_ASSERT_NOT((result_of::empty<vec>));
     
    diff --git a/doc/html/fusion/sequence/intrinsic/metafunctions/end.html b/doc/html/fusion/sequence/intrinsic/metafunctions/end.html index d47b7db9..132a7bcc 100644 --- a/doc/html/fusion/sequence/intrinsic/metafunctions/end.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/end.html @@ -3,10 +3,10 @@ end - + - + @@ -22,20 +22,23 @@
    PrevUpHomeNext
    -
    -
    -end -
    +
    +
    +
    +end +
    +
    +
    - - Description + + Description

    - Returns the result type of end. + Returns the result type of end.

    - - Synopsis + + Synopsis
    template<typename Seq>
     struct end
    @@ -44,75 +47,64 @@
     };
     
    -

    Table 1.20. Parameters

    -
    +

    Table 1.20. Parameters

    +
    - - + - + +

    - - + - + +

    -
    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - Seq -

    -
    -

    - A model of Forward +

    + Seq +

    + A model of Forward Sequence -

    -
    -

    +

    Argument sequence -

    -
    +
    -
    - - Expression +
    + + Expression Semantics
    result_of::end<Seq>::type
     

    - Return type: A model of the same traversal - concept as Seq. + Return type: A model of the same traversal + concept as Seq.

    - Semantics: Returns the type of an iterator - one past the end of Seq. + Semantics: Returns the type of an iterator + one past the end of Seq.

    /sequence/intrinsic/end.hpp>

    - - Example + + Example
    -
    typedef vector<int> vec;
    -typedef result_of::prior<result_of::end<vec>::type>::type first;
    -BOOST_MPL_ASSERT((result_of::equal_to<first, result_of::begin<vec>::type>))
    +
    typedef vector<int> vec;
    +typedef result_of::prior<result_of::end<vec>::type>::type first;
    +BOOST_MPL_ASSERT((result_of::equal_to<first, result_of::begin<vec>::type>))
     
    diff --git a/doc/html/fusion/sequence/intrinsic/metafunctions/front.html b/doc/html/fusion/sequence/intrinsic/metafunctions/front.html index e67c3bf1..1490b953 100644 --- a/doc/html/fusion/sequence/intrinsic/metafunctions/front.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/front.html @@ -3,10 +3,10 @@ front - + - + @@ -22,20 +22,23 @@
    PrevUpHomeNext
    -
    -
    -front -
    +
    +
    +
    +front +
    +
    +
    - - Description + + Description

    - Returns the result type of front. + Returns the result type of front.

    - - Synopsis + + Synopsis
    template<typename Seq>
     struct front
    @@ -44,74 +47,63 @@
     };
     
    -

    Table 1.22. Parameters

    -
    +

    Table 1.22. Parameters

    +
    - - + - + +

    - - + - + +

    -
    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - Seq -

    -
    -

    - A model of Forward +

    + Seq +

    + A model of Forward Sequence -

    -
    -

    +

    Argument sequence -

    -
    +
    -
    - - Expression +
    + + Expression Semantics
    result_of::front<Seq>::type
     

    - Return type: Any type + Return type: Any type

    - Semantics: The type returned by dereferencing - an iterator to the first element in Seq. - Equivalent to result_of::deref<result_of::begin<Seq>::type>::type. + Semantics: The type returned by dereferencing + an iterator to the first element in Seq. + Equivalent to result_of::deref<result_of::begin<Seq>::type>::type.

    /sequence/intrinsic/front.hpp>

    - - Example + + Example
    -
    typedef vector<int,char> vec;
    -BOOST_MPL_ASSERT((boost::is_same<result_of::front<vec>::type, int&>));
    +
    typedef vector<int,char> vec;
    +BOOST_MPL_ASSERT((boost::is_same<result_of::front<vec>::type, int&>));
     
    diff --git a/doc/html/fusion/sequence/intrinsic/metafunctions/has_key.html b/doc/html/fusion/sequence/intrinsic/metafunctions/has_key.html index 68a1a669..ddb91f51 100644 --- a/doc/html/fusion/sequence/intrinsic/metafunctions/has_key.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/has_key.html @@ -3,10 +3,10 @@ has_key - + - + @@ -22,20 +22,23 @@
    PrevUpHomeNext
    -
    - +
    +
    + +
    +
    - - Description + + Description

    - Returns the result type of has_key. + Returns the result type of has_key.

    - - Synopsis + + Synopsis
    template<
         typename Seq,
    @@ -46,96 +49,79 @@
     };
     
    -

    Table 1.29. Parameters

    -
    +

    Table 1.29. Parameters

    +
    - - + - + +

    - - + - + +

    - - + - + +

    -
    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - Seq -

    -
    -

    - A model of Forward +

    + Seq +

    + A model of Forward Sequence -

    -
    -

    +

    Argument sequence -

    -
    -

    - Key -

    -
    -

    +

    + Key +

    Any type -

    -
    -

    +

    Key type -

    -
    +
    -
    - - Expression +
    + + Expression Semantics
    result_of::has_key<Seq, Key>::type
     

    - Return type: An MPL + Return type: An MPL Integral Constant.

    - Semantics: Returns mpl::true_ - if Seq contains an element - with key type Key, returns - mpl::false_ otherwise. + Semantics: Returns mpl::true_ + if Seq contains an element + with key type Key, returns + mpl::false_ otherwise.

    /sequence/intrinsic/has_key.hpp>

    - - Example + + Example
    -
    typedef map<pair<int, char>, pair<char, char>, pair<double, char> > mymap;
    -BOOST_MPL_ASSERT((result_of::has_key<mymap, int>));
    -BOOST_MPL_ASSERT_NOT((result_of::has_key<mymap, void*>));
    +
    typedef map<pair<int, char>, pair<char, char>, pair<double, char> > mymap;
    +BOOST_MPL_ASSERT((result_of::has_key<mymap, int>));
    +BOOST_MPL_ASSERT_NOT((result_of::has_key<mymap, void*>));
     
    diff --git a/doc/html/fusion/sequence/intrinsic/metafunctions/size.html b/doc/html/fusion/sequence/intrinsic/metafunctions/size.html index 4267ca0b..0d379b65 100644 --- a/doc/html/fusion/sequence/intrinsic/metafunctions/size.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/size.html @@ -3,10 +3,10 @@ size - + - + @@ -22,20 +22,23 @@
    PrevUpHomeNext
    -
    -
    -size -
    +
    +
    +
    +size +
    +
    +
    - - Description + + Description

    - Returns the result type of size. + Returns the result type of size.

    - - Synopsis + + Synopsis
    template<typename Seq>
     struct size
    @@ -44,74 +47,63 @@
     };
     
    -

    Table 1.24. Parameters

    -
    +

    Table 1.24. Parameters

    +
    - - + - + +

    - - + - + +

    -
    -

    +

    Parameter -

    -
    -

    +

    Requirement -

    -
    -

    +

    Description -

    -
    -

    - Seq -

    -
    -

    - A model of Forward +

    + Seq +

    + A model of Forward Sequence -

    -
    -

    +

    Argument sequence -

    -
+
-
- - Expression +
+ + Expression Semantics
result_of::size<Seq>::type
 

- Return type: An MPL + Return type: An MPL Integral Constant.

- Semantics: Returns the number of elements - in Seq. + Semantics: Returns the number of elements + in Seq.

/sequence/intrinsic/size.hpp>

- - Example + + Example
-
typedef vector<int,float,char> vec;
-typedef result_of::size<vec>::type size_mpl_integral_constant;
+
typedef vector<int,float,char> vec;
+typedef result_of::size<vec>::type size_mpl_integral_constant;
 BOOST_MPL_ASSERT_RELATION(size_mpl_integral_constant::value, ==, 3);
 
diff --git a/doc/html/fusion/sequence/intrinsic/metafunctions/swap.html b/doc/html/fusion/sequence/intrinsic/metafunctions/swap.html index 8c843266..3d52d217 100644 --- a/doc/html/fusion/sequence/intrinsic/metafunctions/swap.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/swap.html @@ -3,10 +3,10 @@ swap - + - + @@ -22,20 +22,23 @@
PrevUpHomeNext
-
-
-swap -
+
+
+
+swap +
+
+
- - Description + + Description

Returns the return type of swap.

- - Synopsis + + Synopsis
template<typename Seq1, typename Seq2>
 struct swap
@@ -44,62 +47,51 @@
 };
 
-

Table 1.32. Parameters

-
+

Table 1.32. Parameters

+
- - + - + +

- - + - + +

-
-

+

Parameters -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Seq1, Seq2 -

-
-

- Models of Forward +

+ Seq1, Seq2 +

+ Models of Forward Sequence -

-
-

+

The sequences being swapped -

-
+
-
- - Expression +
+ + Expression Semantics
result_of::swap<Seq1, Seq2>::type
 

- Return type: void. + Return type: void.

- Semantics: Always returns void. + Semantics: Always returns void.

/sequence/intrinsic/swap.hpp> diff --git a/doc/html/fusion/sequence/intrinsic/metafunctions/value_at.html b/doc/html/fusion/sequence/intrinsic/metafunctions/value_at.html index 9d77c556..5a8b0d69 100644 --- a/doc/html/fusion/sequence/intrinsic/metafunctions/value_at.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/value_at.html @@ -3,10 +3,10 @@ value_at - + - + @@ -22,20 +22,23 @@

PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- Returns the actual type at a given index from the Sequence. + Returns the actual type at a given index from the Sequence.

- - Synopsis + + Synopsis
template<
     typename Seq,
@@ -46,93 +49,76 @@
 };
 
-

Table 1.27. Parameters

-
+

Table 1.27. Parameters

+
- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Seq -

-
-

- A model of Forward +

+ Seq +

+ A model of Forward Sequence -

-
-

+

Argument sequence -

-
-

- N -

-
-

+

+ N +

An MPL Integral Constant -

-
-

+

Index of element -

-
+
-
- - Expression +
+ + Expression Semantics
result_of::value_at<Seq, N>::type
 

- Return type: Any type. + Return type: Any type.

- Semantics: Returns the actual type at - the Nth element of Seq. + Semantics: Returns the actual type at + the Nth element of Seq.

/sequence/intrinsic/value_at.hpp>

- - Example + + Example
-
typedef vector<int,float,char> vec;
-BOOST_MPL_ASSERT((boost::is_same<result_of::value_at<vec, boost::mpl::int_<1> >::type, float>));
+
typedef vector<int,float,char> vec;
+BOOST_MPL_ASSERT((boost::is_same<result_of::value_at<vec, boost::mpl::int_<1> >::type, float>));
 
diff --git a/doc/html/fusion/sequence/intrinsic/metafunctions/value_at_c.html b/doc/html/fusion/sequence/intrinsic/metafunctions/value_at_c.html index 19596cc3..1697ff5c 100644 --- a/doc/html/fusion/sequence/intrinsic/metafunctions/value_at_c.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/value_at_c.html @@ -3,10 +3,10 @@ value_at_c - + - + @@ -22,20 +22,23 @@
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- Returns the actual type at a given index from the Sequence. + Returns the actual type at a given index from the Sequence.

- - Synopsis + + Synopsis
template<
     typename Seq,
@@ -46,92 +49,75 @@
 };
 
-

Table 1.28. Parameters

-
+

Table 1.28. Parameters

+
- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Seq -

-
-

- A model of Forward +

+ Seq +

+ A model of Forward Sequence -

-
-

+

Argument sequence -

-
-

- M -

-
-

+

+ M +

Positive integer index -

-
-

+

Index of element -

-
+
-
- - Expression +
+ + Expression Semantics
result_of::value_at_c<Seq, M>::type
 

- Return type: Any type + Return type: Any type

- Semantics: Returns the actual type at - the Mth element of Seq. + Semantics: Returns the actual type at + the Mth element of Seq.

/sequence/intrinsic/value_at.hpp>

- - Example + + Example
-
typedef vector<int,float,char> vec;
-BOOST_MPL_ASSERT((boost::is_same<result_of::value_at_c<vec, 1>::type, float>));
+
typedef vector<int,float,char> vec;
+BOOST_MPL_ASSERT((boost::is_same<result_of::value_at_c<vec, 1>::type, float>));
 
diff --git a/doc/html/fusion/sequence/intrinsic/metafunctions/value_at_key.html b/doc/html/fusion/sequence/intrinsic/metafunctions/value_at_key.html index 2e86a594..28e784ec 100644 --- a/doc/html/fusion/sequence/intrinsic/metafunctions/value_at_key.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/value_at_key.html @@ -3,10 +3,10 @@ value_at_key - + - + @@ -22,20 +22,23 @@
PrevUpHomeNext
-
- +
+
+ +
+
- - Description + + Description

- Returns the actual element type associated with a Key from the Sequence. + Returns the actual element type associated with a Key from the Sequence.

- - Synopsis + + Synopsis
template<
     typename Seq,
@@ -46,93 +49,76 @@
 };
 
-

Table 1.31. Parameters

-
+

Table 1.31. Parameters

+
- - + - + +

- - + - + +

- - + - + +

-
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- Seq -

-
-

- A model of Forward +

+ Seq +

+ A model of Forward Sequence -

-
-

+

Argument sequence -

-
-

- Key -

-
-

+

+ Key +

Any type -

-
-

+

Key type -

-
+ -
- - Expression +
+ + Expression Semantics
result_of::value_at_key<Seq, Key>::type
 

- Return type: Any type. + Return type: Any type.

- Semantics: Returns the actual element - type associated with key type Key - in Seq. + Semantics: Returns the actual element + type associated with key type Key + in Seq.

/sequence/intrinsic/value_at_key.hpp>

- - Example + + Example
-
typedef map<pair<int, char>, pair<char, char>, pair<double, char> > mymap;
-BOOST_MPL_ASSERT((boost::is_same<result_of::at_key<mymap, int>::type, char>));
+
typedef map<pair<int, char>, pair<char, char>, pair<double, char> > mymap;
+BOOST_MPL_ASSERT((boost::is_same<result_of::at_key<mymap, int>::type, char>));
 
diff --git a/doc/html/fusion/sequence/operator.html b/doc/html/fusion/sequence/operator.html index b5c33368..6c3f0e63 100644 --- a/doc/html/fusion/sequence/operator.html +++ b/doc/html/fusion/sequence/operator.html @@ -3,10 +3,10 @@ Operator - + - + @@ -22,16 +22,19 @@
PrevUpHomeNext
-
- +
+
+ +
+

- These operators, like the Algorithms, + These operators, like the Algorithms, work generically on all Fusion sequences. All conforming Fusion sequences automatically get these operators for free.

diff --git a/doc/html/fusion/sequence/operator/comparison.html b/doc/html/fusion/sequence/operator/comparison.html index 76e2f9d7..6d7fa800 100644 --- a/doc/html/fusion/sequence/operator/comparison.html +++ b/doc/html/fusion/sequence/operator/comparison.html @@ -3,10 +3,10 @@ Comparison - + - + @@ -22,10 +22,13 @@
PrevUpHomeNext
-
- +
+
+ +
+

- The Comparison operators: ==, - !=, <, - <=, >= - and >= work generically + The Comparison operators: ==, + !=, <, + <=, >= + and >= work generically on all Fusion sequences. Comparison operators are "short- circuited": elementary comparisons start from the first elements and are performed only until the result is clear.

-
- - Header -
+
+ + Header +
#include <boost/fusion/sequence/comparison.hpp>
 #include <boost/fusion/include/comparison.hpp>
 
diff --git a/doc/html/fusion/sequence/operator/comparison/equal.html b/doc/html/fusion/sequence/operator/comparison/equal.html index fded29fb..9a6f2d60 100644 --- a/doc/html/fusion/sequence/operator/comparison/equal.html +++ b/doc/html/fusion/sequence/operator/comparison/equal.html @@ -3,11 +3,12 @@ equal - + - - + +
@@ -22,28 +23,31 @@
PrevUpHomeNext
-
-
-equal -
+
+
+
+equal +
+
+
- - Description + + Description

Compare two sequences for equality.

- - Synopsis + + Synopsis
template <typename Seq1, typename Seq2>
 bool
 operator==(Seq1 const& a, Seq2 const& b);
 
- - Parameters + + Parameters
@@ -52,59 +56,47 @@ - - + - + +

- - - + + +
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- a, - b -

-
-

- Instances of Sequence -

-
-

- Sequence(s) to compare -

-

+ a, + b +

+ Instances of Sequence +

+ Sequence(s) to compare +

- - Expression + + Expression Semantics
a == b
 

- Return type: bool + Return type: bool

- Requirements: + Requirements:

- For each element, e1, - in sequence a, and for - each element, e2, in - sequence b, a == b is a valid expression returning a + For each element, e1, + in sequence a, and for + each element, e2, in + sequence b, a == b is a valid expression returning a type that is convertible to bool.

@@ -112,29 +104,29 @@ compile time error.

- Semantics: + Semantics:

- For each element, e1, - in sequence a, and for - each element, e2, in - sequence b, e1 == e2 returns true. For any 2 zero length + For each element, e1, + in sequence a, and for + each element, e2, in + sequence b, e1 == e2 returns true. For any 2 zero length _sequence_s, e and f, e == f returns true.

- - Header + + Header
#include <boost/fusion/sequence/comparison/equal_to.hpp>
 #include <boost/fusion/include/equal_to.hpp>
 
- - Example + + Example
-
vector<int, char> v1(5, 'a');
-vector<int, char> v2(5, 'a');
+
vector<int, char> v1(5, 'a');
+vector<int, char> v2(5, 'a');
 assert(v1 == v2);
 
diff --git a/doc/html/fusion/sequence/operator/comparison/greater_than.html b/doc/html/fusion/sequence/operator/comparison/greater_than.html index 3d65efc2..da0e1ae3 100644 --- a/doc/html/fusion/sequence/operator/comparison/greater_than.html +++ b/doc/html/fusion/sequence/operator/comparison/greater_than.html @@ -1,13 +1,16 @@ -greater than +greater + than - + - - + + @@ -22,25 +25,29 @@
PrevUpHomeNext
-
-

Lexicographically compare two sequences.

- - Synopsis + + Synopsis
template <typename Seq1, typename Seq2>
 bool
 operator>(Seq1 const& a, Seq2 const& b);
 
- - Parameters + + Parameters
@@ -49,59 +56,47 @@ - - + - + +

- - - + + +
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- a, - b -

-
-

- Instances of Sequence -

-
-

- Sequence(s) to compare -

-

+ a, + b +

+ Instances of Sequence +

+ Sequence(s) to compare +

- - Expression + + Expression Semantics
a > b
 

- Return type: bool + Return type: bool

- Requirements: + Requirements:

- For each element, e1, - in sequence a, and for - each element, e2, in - sequence b, a < b is a valid expression returning a + For each element, e1, + in sequence a, and for + each element, e2, in + sequence b, a < b is a valid expression returning a type that is convertible to bool.

@@ -109,22 +104,22 @@ compile time error.

- Semantics: Returns b < a. + Semantics: Returns b < a.

- - Header + + Header
#include <boost/fusion/sequence/comparison/less_equal.hpp>
 #include <boost/fusion/include/less_equal.hpp>
 
- - Example + + Example
-
vector<int, float> v1(4, 3.3f);
-vector<short, float> v2(5, 3.3f);
-vector<long, double> v3(5, 4.4);
+
vector<int, float> v1(4, 3.3f);
+vector<short, float> v2(5, 3.3f);
+vector<long, double> v3(5, 4.4);
 assert(v2 > v1);
 assert(v3 > v2);
 
diff --git a/doc/html/fusion/sequence/operator/comparison/greater_than_equal.html b/doc/html/fusion/sequence/operator/comparison/greater_than_equal.html index f8e46421..64541c98 100644 --- a/doc/html/fusion/sequence/operator/comparison/greater_than_equal.html +++ b/doc/html/fusion/sequence/operator/comparison/greater_than_equal.html @@ -1,12 +1,14 @@ -greater than equal +greater + than equal - + - + @@ -22,25 +24,29 @@
PrevUpHomeNext
-
-

Lexicographically compare two sequences.

- - Synopsis + + Synopsis
template <typename Seq1, typename Seq2>
 bool
 operator>=(Seq1 const& a, Seq2 const& b);
 
- - Parameters + + Parameters
@@ -49,59 +55,47 @@ - - + - + +

- - - + + +
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- a, - b -

-
-

- Instances of Sequence -

-
-

- Sequence(s) to compare -

-

+ a, + b +

+ Instances of Sequence +

+ Sequence(s) to compare +

- - Expression + + Expression Semantics
a >= b
 

- Return type: bool + Return type: bool

- Requirements: + Requirements:

- For each element, e1, - in sequence a, and for - each element, e2, in - sequence b, a < b is a valid expression returning a + For each element, e1, + in sequence a, and for + each element, e2, in + sequence b, a < b is a valid expression returning a type that is convertible to bool.

@@ -109,22 +103,22 @@ compile time error.

- Semantics: Returns !(a < b). + Semantics: Returns !(a < b).

- - Header + + Header
#include <boost/fusion/sequence/comparison/greater_equal.hpp>
 #include <boost/fusion/include/greater_equal.hpp>
 
- - Example + + Example
-
vector<int, float> v1(4, 3.3f);
-vector<short, float> v2(5, 3.3f);
-vector<long, double> v3(5, 4.4);
+
vector<int, float> v1(4, 3.3f);
+vector<short, float> v2(5, 3.3f);
+vector<long, double> v3(5, 4.4);
 assert(v2 >= v1);
 assert(v3 >= v2);
 
diff --git a/doc/html/fusion/sequence/operator/comparison/less_than.html b/doc/html/fusion/sequence/operator/comparison/less_than.html index 9adf5b5f..65e36053 100644 --- a/doc/html/fusion/sequence/operator/comparison/less_than.html +++ b/doc/html/fusion/sequence/operator/comparison/less_than.html @@ -1,13 +1,16 @@ -less than +less + than - + - - + + @@ -22,25 +25,29 @@
PrevUpHomeNext
-
-

Lexicographically compare two sequences.

- - Synopsis + + Synopsis
template <typename Seq1, typename Seq2>
 bool
 operator<(Seq1 const& a, Seq2 const& b);
 
- - Parameters + + Parameters
@@ -49,59 +56,47 @@ - - + - + +

- - - + + +
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- a, - b -

-
-

- Instances of Sequence -

-
-

- Sequence(s) to compare -

-

+ a, + b +

+ Instances of Sequence +

+ Sequence(s) to compare +

- - Expression + + Expression Semantics
a < b
 

- Return type: bool + Return type: bool

- Requirements: + Requirements:

- For each element, e1, - in sequence a, and for - each element, e2, in - sequence b, a < b is a valid expression returning a + For each element, e1, + in sequence a, and for + each element, e2, in + sequence b, a < b is a valid expression returning a type that is convertible to bool.

@@ -109,24 +104,24 @@ compile time error.

- Semantics: Returns the lexicographical - comparison of between a - and b. + Semantics: Returns the lexicographical + comparison of between a + and b.

- - Header + + Header
#include <boost/fusion/sequence/comparison/less.hpp>
 #include <boost/fusion/include/less.hpp>
 
- - Example + + Example
-
vector<int, float> v1(4, 3.3f);
-vector<short, float> v2(5, 3.3f);
-vector<long, double> v3(5, 4.4);
+
vector<int, float> v1(4, 3.3f);
+vector<short, float> v2(5, 3.3f);
+vector<long, double> v3(5, 4.4);
 assert(v1 < v2);
 assert(v2 < v3);
 
diff --git a/doc/html/fusion/sequence/operator/comparison/less_than_equal.html b/doc/html/fusion/sequence/operator/comparison/less_than_equal.html index 66303246..d81c9247 100644 --- a/doc/html/fusion/sequence/operator/comparison/less_than_equal.html +++ b/doc/html/fusion/sequence/operator/comparison/less_than_equal.html @@ -1,13 +1,16 @@ -less than equal +less + than equal - + - - + + @@ -22,25 +25,29 @@
PrevUpHomeNext
-
-

Lexicographically compare two sequences.

- - Synopsis + + Synopsis
template <typename Seq1, typename Seq2>
 bool
 operator<=(Seq1 const& a, Seq2 const& b);
 
- - Parameters + + Parameters
@@ -49,59 +56,47 @@ - - + - + +

- - - + + +
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- a, - b -

-
-

- Instances of Sequence -

-
-

- Sequence(s) to compare -

-

+ a, + b +

+ Instances of Sequence +

+ Sequence(s) to compare +

- - Expression + + Expression Semantics
a <= b
 

- Return type: bool + Return type: bool

- Requirements: + Requirements:

- For each element, e1, - in sequence a, and for - each element, e2, in - sequence b, a < b is a valid expression returning a + For each element, e1, + in sequence a, and for + each element, e2, in + sequence b, a < b is a valid expression returning a type that is convertible to bool.

@@ -109,22 +104,22 @@ compile time error.

- Semantics: Returns !(b < a). + Semantics: Returns !(b < a).

- - Header + + Header
#include <boost/fusion/sequence/comparison/less_equal.hpp>
 #include <boost/fusion/include/less_equal.hpp>
 
- - Example + + Example
-
vector<int, float> v1(4, 3.3f);
-vector<short, float> v2(5, 3.3f);
-vector<long, double> v3(5, 4.4);
+
vector<int, float> v1(4, 3.3f);
+vector<short, float> v2(5, 3.3f);
+vector<long, double> v3(5, 4.4);
 assert(v1 <= v2);
 assert(v2 <= v3);
 
diff --git a/doc/html/fusion/sequence/operator/comparison/not_equal.html b/doc/html/fusion/sequence/operator/comparison/not_equal.html index f16d4ab1..43bf5c9f 100644 --- a/doc/html/fusion/sequence/operator/comparison/not_equal.html +++ b/doc/html/fusion/sequence/operator/comparison/not_equal.html @@ -1,13 +1,15 @@ -not equal +not + equal - + - - + + @@ -22,25 +24,29 @@
PrevUpHomeNext
-
-

Compare two sequences for inequality.

- - Synopsis + + Synopsis
template <typename Seq1, typename Seq2>
 bool
 operator!=(Seq1 const& a, Seq2 const& b);
 
- - Parameters + + Parameters
@@ -49,59 +55,47 @@ - - + - + +

- - - + + +
-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- a, - b -

-
-

- Instances of Sequence -

-
-

- Sequence(s) to compare -

-

+ a, + b +

+ Instances of Sequence +

+ Sequence(s) to compare +

- - Expression + + Expression Semantics
a != b
 

- Return type: bool + Return type: bool

- Requirements: + Requirements:

- For each element, e1, - in sequence a, and for - each element, e2, in - sequence b, a == b is a valid expression returning a + For each element, e1, + in sequence a, and for + each element, e2, in + sequence b, a == b is a valid expression returning a type that is convertible to bool.

@@ -109,24 +103,24 @@ compile time error.

- Semantics: + Semantics:

Returns !(a == b).

- - Header + + Header
#include <boost/fusion/sequence/comparison/not_equal_to.hpp>
 #include <boost/fusion/include/not_equal_to.hpp>
 
- - Example + + Example
-
vector<int, char> v3(5, 'b');
-vector<int, char> t4(2, 'a');
+
vector<int, char> v3(5, 'b');
+vector<int, char> t4(2, 'a');
 assert(v1 != v3);
 assert(v1 != t4);
 assert(!(v1 != v2));
diff --git a/doc/html/fusion/sequence/operator/i_o.html b/doc/html/fusion/sequence/operator/i_o.html
index f6e009c7..575313ab 100644
--- a/doc/html/fusion/sequence/operator/i_o.html
+++ b/doc/html/fusion/sequence/operator/i_o.html
@@ -3,10 +3,10 @@
 
 I/O
 
-
+
 
 
-
+
 
 
 
@@ -22,58 +22,61 @@
 
PrevUpHomeNext
-
-

-I/O -

+
+
+

+I/O +

+
+

- The I/O operators: << - and >> work generically - on all Fusion sequences. The global operator<< has been overloaded for generic - output streams such that Sequence(s) - are output by recursively calling operator<< for each element. Analogously, - the global operator>> - has been overloaded to extract Sequence(s) - from generic input streams by recursively calling operator>> for each element. + The I/O operators: << + and >> work generically + on all Fusion sequences. The global operator<< has been overloaded for generic + output streams such that Sequence(s) + are output by recursively calling operator<< for each element. Analogously, + the global operator>> + has been overloaded to extract Sequence(s) + from generic input streams by recursively calling operator>> for each element.

- The default delimiter between the elements is space, and the Sequence + The default delimiter between the elements is space, and the Sequence is enclosed in parenthesis. For Example:

-
vector<float, int, std::string> a(1.0f, 2, std::string("Howdy folks!");
+
vector<float, int, std::string> a(1.0f, 2, std::string("Howdy folks!");
 cout << a;
 

- outputs the vector + outputs the vector as: (1.0 2 Howdy folks!)

The library defines three manipulators for changing the default behavior:

-
+

Manipulators

-
tuple_open(arg)
+
tuple_open(arg)

Defines the character that is output before the first element.

-
tuple_close(arg)
+
tuple_close(arg)

Defines the character that is output after the last element.

-
tuple_delimiter(arg)
+
tuple_delimiter(arg)

Defines the delimiter character between elements.

- The argument to tuple_open, - tuple_close and tuple_delimiter may be a char, wchar_t, + The argument to tuple_open, + tuple_close and tuple_delimiter may be a char, wchar_t, a C-string, or a wide C-string.

@@ -82,12 +85,12 @@

std::cout << tuple_open('[') << tuple_close(']') << tuple_delimiter(", ") << a;
 

- outputs the same vector, a + outputs the same vector, a as: [1.0, 2, Howdy folks!]

- The same manipulators work with operator>> and istream - as well. Suppose the std::cin + The same manipulators work with operator>> and istream + as well. Suppose the std::cin stream contains the following data:

(1 2 3) [4:5]
@@ -95,27 +98,27 @@
 

The code:

-
vector<int, int, int> i;
-vector<int, int> j;
+
vector<int, int, int> i;
+vector<int, int> j;
 
 std::cin >> i;
 std::cin >> set_open('[') >> set_close(']') >> set_delimiter(':');
 std::cin >> j;
 

- reads the data into the vector(s) i - and j. + reads the data into the vector(s) i + and j.

- Note that extracting Sequence(s) - with std::string or C-style string elements does - not generally work, since the streamed Sequence + Note that extracting Sequence(s) + with std::string or C-style string elements does + not generally work, since the streamed Sequence representation may not be unambiguously parseable.

-
- - Header -
+
+ + Header +
#include <boost/fusion/sequence/io.hpp>
 #include <boost/fusion/include/io.hpp>
 
diff --git a/doc/html/fusion/sequence/operator/i_o/in.html b/doc/html/fusion/sequence/operator/i_o/in.html index 16637f05..10be1c26 100644 --- a/doc/html/fusion/sequence/operator/i_o/in.html +++ b/doc/html/fusion/sequence/operator/i_o/in.html @@ -3,10 +3,10 @@ in - + - + @@ -22,29 +22,32 @@
PrevUpHomeNext
-
-
-in -
+
+
+
+in +
+
+
- - Description + + Description

- Read a Sequence from an input + Read a Sequence from an input stream.

- - Synopsis + + Synopsis
template <typename IStream, typename Sequence>
 IStream&
 operator>>(IStream& is, Sequence& seq);
 
- - Parameters + + Parameters
@@ -53,86 +56,68 @@ - - + - + +

- - + - + +

- - - + + +

-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

+

is -

-
-

+

An input stream. -

-
-

+

Stream to extract information from. -

-
-

+

seq -

-
-

- A Sequence. -

-
-

+

+ A Sequence. +

The sequence to read. -

-
- - Expression + + Expression Semantics
is >> seq
 

- Return type: IStream& + Return type: IStream&

- Semantics: For each element, e, in sequence, seq, - call is >> - e. + Semantics: For each element, e, in sequence, seq, + call is >> + e.

- - Header + + Header
#include <boost/fusion/sequence/io/in.hpp>
 #include <boost/fusion/include/in.hpp>
 
- - Example + + Example
-
vector<int, std::string, char> v;
+
vector<int, std::string, char> v;
 std::cin >> v;
 
diff --git a/doc/html/fusion/sequence/operator/i_o/out.html b/doc/html/fusion/sequence/operator/i_o/out.html index ff79fdd6..277292c9 100644 --- a/doc/html/fusion/sequence/operator/i_o/out.html +++ b/doc/html/fusion/sequence/operator/i_o/out.html @@ -3,10 +3,10 @@ out - + - + @@ -22,29 +22,32 @@
PrevUpHomeNext
-
-
-out -
+
+
+
+out +
+
+
- - Description + + Description

- Write a Sequence to an output + Write a Sequence to an output stream.

- - Synopsis + + Synopsis
template <typename OStream, typename Sequence>
 OStream&
 operator<<(OStream& os, Sequence& seq);
 
- - Parameters + + Parameters
@@ -53,86 +56,68 @@ - - + - + +

- - + - + +

- - - + + +

-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

+

os -

-
-

+

An output stream. -

-
-

+

Stream to write information to. -

-
-

+

seq -

-
-

- A Sequence. -

-
-

+

+ A Sequence. +

The sequence to write. -

-
- - Expression + + Expression Semantics
os << seq
 

- Return type: OStream& + Return type: OStream&

- Semantics: For each element, e, in sequence, seq, - call os << - e. + Semantics: For each element, e, in sequence, seq, + call os << + e.

- - Header + + Header
#include <boost/fusion/sequence/io/out.hpp>
 #include <boost/fusion/include/out.hpp>
 
- - Example + + Example
-
std::cout << make_vector(123, "Hello", 'x') << std::endl;
+
std::cout << make_vector(123, "Hello", 'x') << std::endl;
 
diff --git a/doc/html/fusion/support.html b/doc/html/fusion/support.html index 329f1cf0..7b36fd9c 100644 --- a/doc/html/fusion/support.html +++ b/doc/html/fusion/support.html @@ -3,10 +3,10 @@ Support - + - + @@ -22,10 +22,13 @@
PrevUpHomeNext
-
- +
+
+ +
+
is_sequence
is_view
diff --git a/doc/html/fusion/support/category_of.html b/doc/html/fusion/support/category_of.html index 8402b285..232c6eda 100644 --- a/doc/html/fusion/support/category_of.html +++ b/doc/html/fusion/support/category_of.html @@ -3,10 +3,10 @@ category_of - + - + @@ -22,24 +22,27 @@
PrevUpHomeNext
-
- -
- - Description -
+
+
+ +
+
+

+ + Description +

A metafunction that establishes the conceptual classification of a particular - Sequence or Iterator - (see Iterator Concepts and - Sequence Concepts). + Sequence or Iterator + (see Iterator Concepts and + Sequence Concepts).

-
- - Synopsis -
+

+ + Synopsis +

namespace traits
 {
     template <typename T>
@@ -49,10 +52,10 @@
     };
 }
 
-
- - Parameters -
+

+ + Parameters +

@@ -60,49 +63,37 @@ - - + - + +

- - + - + +

-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- T -

-
-

+

+ T +

Any type -

-
-

+

The type to query. -

-
-
- - Expression +

+ + Expression Semantics -

+
typedef traits::category_of<T>::type category;
 

- Return type: + Return type:

For Iterators, the return type is derived from one of: @@ -153,23 +144,23 @@ }}

- Semantics: Establishes the conceptual classification - of a particular Sequence or Iterator. + Semantics: Establishes the conceptual classification + of a particular Sequence or Iterator.

-
- - Header -
+

+ + Header +

#include <boost/fusion/support/category_of.hpp>
 #include <boost/fusion/include/category_of.hpp>
 
-
- - Example -
+

+ + Example +

using boost::is_base_of;
-typedef traits::category_of<list<> >::type list_category;
-typedef traits::category_of<vector<> >::type vector_category;
+typedef traits::category_of<list<> >::type list_category;
+typedef traits::category_of<vector<> >::type vector_category;
 BOOST_MPL_ASSERT(( is_base_of<forward_traversal_tag, list_category> ));
 BOOST_MPL_ASSERT(( is_base_of<random_access_traversal_tag, vector_category> ));
 
diff --git a/doc/html/fusion/support/deduce.html b/doc/html/fusion/support/deduce.html index e0241734..c7bb56ad 100644 --- a/doc/html/fusion/support/deduce.html +++ b/doc/html/fusion/support/deduce.html @@ -3,10 +3,10 @@ deduce - + - + @@ -22,34 +22,37 @@
PrevUpHomeNext
-
-

-deduce -

-
- - Description -
+
+
+

+deduce +

+
+
+

+ + Description +

- Metafunction to apply element + Metafunction to apply element conversion to the full argument type.

- It removes references to const, - references to array types are kept, even if the array is const. - Reference wrappers are removed (see boost::ref). + It removes references to const, + references to array types are kept, even if the array is const. + Reference wrappers are removed (see boost::ref).

-
- - Header -
+

+ + Header +

#include <boost/fusion/support/deduce.hpp>
 #include <boost/fusion/include/deduce.hpp>
 
-
- - Synopsis -
+

+ + Synopsis +

namespace traits
 {
     template <typename T>
@@ -59,10 +62,10 @@
     };
 }
 
-
- - Example -
+

+ + Example +

template <typename T>
 struct holder
 {
@@ -79,11 +82,11 @@
     return holder<T>(a);
 }
 
-
- - See also -
- +

+ + See also +

+
diff --git a/doc/html/fusion/support/deduce_sequence.html b/doc/html/fusion/support/deduce_sequence.html index dfaec85e..91e5103d 100644 --- a/doc/html/fusion/support/deduce_sequence.html +++ b/doc/html/fusion/support/deduce_sequence.html @@ -3,10 +3,10 @@ deduce_sequence - + - + @@ -22,32 +22,37 @@
PrevUpHomeNext
-
- -
- - Description -
+
+
+ +
+
+

+ + Description +

- Applies element - conversion to each element in a Forward - Sequence. The resulting type is a Random + Applies element + conversion to each element in a Forward + Sequence. The resulting type is a Random Access Sequence that provides a converting constructor accepting the original type as its argument.

-
- - Header -
+

+ + Header +

#include <boost/fusion/support/deduce_sequence.hpp>
 #include <boost/fusion/include/deduce_sequence.hpp>
 
-
- - Synopsis -
+

+ + Synopsis +

namespace traits
 {
     template <class Sequence>
@@ -57,10 +62,10 @@
     };
 }
 
-
- - Example -
+

+ + Example +

template <class Seq>
 struct holder
 {
@@ -72,18 +77,18 @@
 };
 
 template <typename T0, typename T1>
-holder< vector<T0 const &, T1 const &> >
+holder< vector<T0 const &, T1 const &> >
 make_holder(T0 const & a0, T1 const & a1)
 {
-    typedef vector<T0 const &, T1 const &> arg_vec_t;
+    typedef vector<T0 const &, T1 const &> arg_vec_t;
     return holder<arg_vec_t>( arg_vec_t(a0,a1) );
 }
 
-
- - See also -
- +

+ + See also +

+
diff --git a/doc/html/fusion/support/is_sequence.html b/doc/html/fusion/support/is_sequence.html index cefb2073..6d1a85e1 100644 --- a/doc/html/fusion/support/is_sequence.html +++ b/doc/html/fusion/support/is_sequence.html @@ -3,10 +3,10 @@ is_sequence - + - + @@ -22,25 +22,28 @@
PrevUpHomeNext
-
- -
- - Description -
+
+
+ +
+
+

+ + Description +

- Metafunction that evaluates to mpl::true_ - if a certain type T is a - conforming Fusion Sequence, mpl::false_ + Metafunction that evaluates to mpl::true_ + if a certain type T is a + conforming Fusion Sequence, mpl::false_ otherwise. This may be specialized to accomodate clients which provide Fusion conforming sequences.

-
- - Synopsis -
+

+ + Synopsis +

namespace traits
 {
     template <typename T>
@@ -50,10 +53,10 @@
     };
 }
 
-
- - Parameters -
+

+ + Parameters +

@@ -61,74 +64,62 @@ - - + - + +

- - + - + +

-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- T -

-
-

+

+ T +

Any type -

-
-

+

The type to query. -

-
-
- - Expression +

+ + Expression Semantics -

+
typedef traits::is_sequence<T>::type c;
 

- Return type: An MPL + Return type: An MPL Boolean Constant.

- Semantics: Metafunction that evaluates to - mpl::true_ if a certain type T - is a conforming Fusion sequence, mpl::false_ + Semantics: Metafunction that evaluates to + mpl::true_ if a certain type T + is a conforming Fusion sequence, mpl::false_ otherwise.

-
- - Header -
+

+ + Header +

#include <boost/fusion/support/is_sequence.hpp>
 #include <boost/fusion/include/is_sequence.hpp>
 
-
- - Example -
+

+ + Example +

BOOST_MPL_ASSERT_NOT(( traits::is_sequence< std::vector<int> > ));
 BOOST_MPL_ASSERT_NOT(( is_sequence< int > ));
-BOOST_MPL_ASSERT(( traits::is_sequence<list<> > ));
-BOOST_MPL_ASSERT(( traits::is_sequence<list<int> > ));
-BOOST_MPL_ASSERT(( traits::is_sequence<vector<> > ));
-BOOST_MPL_ASSERT(( traits::is_sequence<vector<int> > ));
+BOOST_MPL_ASSERT(( traits::is_sequence<list<> > ));
+BOOST_MPL_ASSERT(( traits::is_sequence<list<int> > ));
+BOOST_MPL_ASSERT(( traits::is_sequence<vector<> > ));
+BOOST_MPL_ASSERT(( traits::is_sequence<vector<int> > ));
 
diff --git a/doc/html/fusion/support/is_view.html b/doc/html/fusion/support/is_view.html index 5a9e1fb1..4f935e6f 100644 --- a/doc/html/fusion/support/is_view.html +++ b/doc/html/fusion/support/is_view.html @@ -3,10 +3,10 @@ is_view - + - + @@ -22,28 +22,31 @@
PrevUpHomeNext
-
- -
- - Description -
+
+
+ +
+
+

+ + Description +

- Metafunction that evaluates to mpl::true_ - if a certain type T is a - conforming Fusion View, mpl::false_ + Metafunction that evaluates to mpl::true_ + if a certain type T is a + conforming Fusion View, mpl::false_ otherwise. A view is a specialized sequence that does not actually contain data. Views hold sequences which may be other views. In general, views are held by other views by value, while non-views are held by other views by - reference. is_view may be + reference. is_view may be specialized to accomodate clients providing Fusion conforming views.

-
- - Synopsis -
+

+ + Synopsis +

namespace traits
 {
     template <typename T>
@@ -53,10 +56,10 @@
     };
 }
 
-
- - Parameters -
+

+ + Parameters +

@@ -64,74 +67,62 @@ - - + - + +

- - + - + +

-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- T -

-
-

+

+ T +

Any type -

-
-

+

The type to query. -

-
-
- - Expression Semantics -
+

+ + Expression Semantics +

typedef traits::is_view<T>::type c;
 

- Return type: An MPL + Return type: An MPL Boolean Constant.

- Semantics: Metafunction that evaluates to - mpl::true_ if a certain type T - is a conforming Fusion view, mpl::false_ + Semantics: Metafunction that evaluates to + mpl::true_ if a certain type T + is a conforming Fusion view, mpl::false_ otherwise.

-
- - Header -
+

+ + Header +

#include <boost/fusion/support/is_view.hpp>
 #include <boost/fusion/include/is_view.hpp>
 
-
- - Example -
+

+ + Example +

BOOST_MPL_ASSERT_NOT(( traits::is_view<std::vector<int> > ));
 BOOST_MPL_ASSERT_NOT(( traits::is_view<int> ));
 
 using boost::mpl::_
 using boost::is_pointer;
-typedef vector<int*, char, long*, bool, double> vector_type;
-typedef filter_view<vector_type, is_pointer<_> > filter_view_type;
+typedef vector<int*, char, long*, bool, double> vector_type;
+typedef filter_view<vector_type, is_pointer<_> > filter_view_type;
 BOOST_MPL_ASSERT(( traits::is_view<filter_view_type> ));
 
diff --git a/doc/html/fusion/support/pair.html b/doc/html/fusion/support/pair.html index d488d98b..29681901 100644 --- a/doc/html/fusion/support/pair.html +++ b/doc/html/fusion/support/pair.html @@ -3,10 +3,10 @@ pair - + - + @@ -22,25 +22,28 @@
PrevUpHomeNext
-
-

-pair -

-
- - Description -
+
+
+

+pair +

+
+
+

+ + Description +

- Fusion pair type is a half - runtime pair. A half runtime pair is similar to a std::pair, - but, unlike std::pair, + Fusion pair type is a half + runtime pair. A half runtime pair is similar to a std::pair, + but, unlike std::pair, the first type does not have data. It is used as elements in _map_s, for example.

-
- - Synopsis -
+

+ + Synopsis +

template <typename First, typename Second>
 struct pair;
 
@@ -60,276 +63,212 @@
 typename result_of::make_pair<First,Second>::type
 make_pair(Second const &);
 
-
- - Template parameters -
+

+ + Template parameters +

- - + +

- - + +

- - + +

-

+

Parameter -

-
-

+

Description -

-
-

+

First -

-
-

+

The first type. This is purely a type. No data is held. -

-
-

+

Second -

-
-

+

The second type. This contains data. -

-
-
+

Notation

-
P
+
P

Fusion pair type

-
p, - p2
+
p, + p2

Fusion pairs

-
F, - S
+
F, + S

Arbitrary types

-
s
+
s

- Value of type S + Value of type S

-
o
+
o

Output stream

-
i
+
i

Input stream

-
- - Expression Semantics -
+

+ + Expression Semantics +

- - + +

- - + + - - + + - - + +

- - + + - - + + - - + + - - + + - - +

+ - - + + - - + + - - + +

- - + +

-

+

Expression -

-
-

+

Semantics -

-
-

- P::first_type -

-
-

- The type of the first template parameter, F, - equivalent to result_of::first<P>::type. -

-

+ P::first_type +

+ The type of the first template parameter, F, + equivalent to result_of::first<P>::type. +

-

- P::second_type -

-
-

- The type of the second template parameter, S, - equivalent to result_of::second<P>::type. -

-

+ P::second_type +

+ The type of the second template parameter, S, + equivalent to result_of::second<P>::type. +

-

- P() -

-
-

+

+ P() +

Default construction. -

-
-

- P(s) -

-
-

- Construct a pair given value for the second type, s. -

-

+ P(s) +

+ Construct a pair given value for the second type, s. +

-

- P(p2) -

-
-

- Copy constructs a pair from another pair, p2. -

-

+ P(p2) +

+ Copy constructs a pair from another pair, p2. +

-

- p.second -

-
-

- Get the data from p1. -

-

+ p.second +

+ Get the data from p1. +

-

- p = - p2 -

-
-

- Assigns a pair, p1, - from another pair, p2. -

-

+ p = + p2 +

+ Assigns a pair, p1, + from another pair, p2. +

-

+

make_pair<F>(s) -

-
-

- Make a pair given the first type, F, - and a value for the second type, s. - The second type assumes the type of s -

-

+ Make a pair given the first type, F, + and a value for the second type, s. + The second type assumes the type of s +

-

- o << - p -

-
-

- Output p to output - stream, o. -

-

+ o << + p +

+ Output p to output + stream, o. +

-

- i >> - p -

-
-

- Input p from input - stream, i. -

-

+ i >> + p +

+ Input p from input + stream, i. +

-

- p == - p2 -

-
-

+

+ p == + p2 +

Tests two pairs for equality. -

-
-

- p != - p2 -

-
-

+

+ p != + p2 +

Tests two pairs for inequality. -

-
-
- - Header -
+

+ + Header +

#include <boost/fusion/support/pair.hpp>
 #include <boost/fusion/include/pair.hpp>
 
-
- - Example -
+

+ + Example +

pair<int, char> p('X');
 std::cout << p << std::endl;
 std::cout << make_pair<int>('X') << std::endl;
diff --git a/doc/html/fusion/support/tag_of.html b/doc/html/fusion/support/tag_of.html
index 1d324467..0883b982 100644
--- a/doc/html/fusion/support/tag_of.html
+++ b/doc/html/fusion/support/tag_of.html
@@ -3,10 +3,10 @@
 
 tag_of
 
-
+
 
 
-
+
 
 
 
@@ -22,28 +22,31 @@
 
PrevUpHomeNext
-
-

-tag_of -

-
- - Description -
+
+
+

+tag_of +

+
+
+

+ + Description +

All conforming Fusion sequences and iterators have an associated tag type. - The purpose of the tag is to enable tag - dispatching from Intrinsic + The purpose of the tag is to enable tag + dispatching from Intrinsic functions to implementations appropriate for the type.

This metafunction may be specialized to accomodate clients providing Fusion conforming sequences.

-
- - Synopsis -
+

+ + Synopsis +

namespace traits
 {
     template<typename Sequence>
@@ -53,10 +56,10 @@
     };
 }
 
-
- - Parameters -
+

+ + Parameters +

@@ -64,68 +67,56 @@ - - + - + +

- - + - + +

-

+

Parameter -

-
-

+

Requirement -

-
-

+

Description -

-
-

- T -

-
-

+

+ T +

Any type -

-
-

+

The type to query. -

-
-
- - Expression Semantics -
+

+ + Expression Semantics +

typedef traits::tag_of<T>::type tag;
 

- Return type: Any type. + Return type: Any type.

- Semantics: Returns the tag type associated - with T. + Semantics: Returns the tag type associated + with T.

-
- - Header -
+

+ + Header +

#include <boost/fusion/support/tag_of.hpp>
 #include <boost/fusion/include/tag_of.hpp>
 
-
- - Example -
-
typedef traits::tag_of<list<> >::type tag1;
-typedef traits::tag_of<list<int> >::type tag2;
-typedef traits::tag_of<vector<> >::type tag3;
-typedef traits::tag_of<vector<int> >::type tag4;
+

+ + Example +

+
typedef traits::tag_of<list<> >::type tag1;
+typedef traits::tag_of<list<int> >::type tag2;
+typedef traits::tag_of<vector<> >::type tag3;
+typedef traits::tag_of<vector<int> >::type tag4;
 
 BOOST_MPL_ASSERT((boost::is_same<tag1, tag2>));
 BOOST_MPL_ASSERT((boost::is_same<tag3, tag4>));
diff --git a/doc/html/fusion/tuple.html b/doc/html/fusion/tuple.html
index 85f69cb8..9abb1754 100644
--- a/doc/html/fusion/tuple.html
+++ b/doc/html/fusion/tuple.html
@@ -3,10 +3,10 @@
 
 Tuple
 
-
+
 
 
-
+
 
 
 
@@ -22,10 +22,13 @@
 
PrevUpHomeNext
-
-

-Tuple -

+
+
+

+Tuple +

+
+
Class template tuple
@@ -44,12 +47,12 @@

The TR1 technical report describes extensions to the C++ standard library. Many of these extensions will be considered for the next iteration of the C++ - standard. TR1 describes a tuple type, and support for treating std::pair + standard. TR1 describes a tuple type, and support for treating std::pair as a type of tuple.

Fusion provides full support for the TR1 - Tuple interface, and the extended uses of std::pair described + Tuple interface, and the extended uses of std::pair described in the TR1 document.

diff --git a/doc/html/fusion/tuple/class_template_tuple.html b/doc/html/fusion/tuple/class_template_tuple.html index 663aec85..702ce257 100644 --- a/doc/html/fusion/tuple/class_template_tuple.html +++ b/doc/html/fusion/tuple/class_template_tuple.html @@ -3,10 +3,10 @@ Class template tuple - + - + @@ -22,10 +22,13 @@
PrevUpHomeNext
-
- +
+

Fusion's implementation of the TR1 - Tuple is also a fusion Forward + Tuple is also a fusion Forward Sequence. As such the fusion tuple type provides a lot of functionality beyond that required by TR1.

- Currently tuple is basically a synonym for vector, although this may be changed + Currently tuple is basically a synonym for vector, although this may be changed in future releases of fusion.

-
- - Synopsis -
+

+ + Synopsis +

template<
     typename T1 = unspecified,
     typename T2 = unspecified,
diff --git a/doc/html/fusion/tuple/class_template_tuple/construction.html b/doc/html/fusion/tuple/class_template_tuple/construction.html
index 90fb7d32..343d67bf 100644
--- a/doc/html/fusion/tuple/class_template_tuple/construction.html
+++ b/doc/html/fusion/tuple/class_template_tuple/construction.html
@@ -3,11 +3,12 @@
 
 Construction
 
-
+
 
 
-
-
+
+
 
 
 
@@ -22,14 +23,17 @@
 
PrevUpHomeNext
-
- -
- - Description -
+
+
+ +
+
+
+ + Description +

The TR1 Tuple type provides a default constructor, a constructor that takes @@ -37,34 +41,34 @@ copy constructor. The details of the various constructors are described in this section.

-
- - Specification -
-
+
+ + Specification +
+

Notation

-
T1 - ... TN, - U1 ... - UN
+
T1 + ... TN, + U1 ... + UN

Tuple element types

-
P1 - ... PN
+
P1 + ... PN

Parameter types

-
Ti, - Ui
+
Ti, + Ui

- The type of the ith + The type of the ith element of a tuple

-
Pi
+
Pi

- The type of the ith + The type of the ith parameter

@@ -72,45 +76,45 @@
tuple();
 

- Requirements: Each Ti + Requirements: Each Ti is default constructable.

- Semantics: Default initializes each element + Semantics: Default initializes each element of the tuple.

tuple(P1,P2,...,PN);
 

- Requirements: Each Pi - is Ti if Ti is a reference type, const Ti& otherwise. + Requirements: Each Pi + is Ti if Ti is a reference type, const Ti& otherwise.

- Semantics: Copy initializes each element + Semantics: Copy initializes each element with the corresponding parameter.

tuple(const tuple& t);
 

- Requirements: Each Ti + Requirements: Each Ti should be copy constructable.

- Semantics: Copy constructs each element - of *this - with the corresponding element of t. + Semantics: Copy constructs each element + of *this + with the corresponding element of t.

template<typename U1, typename U2, ..., typename UN>
 tuple(const tuple<U1, U2, ..., UN>& t);
 

- Requirements: Each Ti - shall be constructible from the corresponding Ui. + Requirements: Each Ti + shall be constructible from the corresponding Ui.

- Semantics: Constructs each element of - *this - with the corresponding element of t. + Semantics: Constructs each element of + *this + with the corresponding element of t.

diff --git a/doc/html/fusion/tuple/class_template_tuple/element_access.html b/doc/html/fusion/tuple/class_template_tuple/element_access.html index 60288b37..109030be 100644 --- a/doc/html/fusion/tuple/class_template_tuple/element_access.html +++ b/doc/html/fusion/tuple/class_template_tuple/element_access.html @@ -1,13 +1,16 @@ -Element access +Element + access - + - - + +
@@ -22,59 +25,63 @@
PrevUpHomeNext
-
- +
+ + Description +

The TR1 - Tuple provides the get + Tuple provides the get function to provide access to it's elements by zero based numeric index.

-
- - Specification -
+
+ + Specification +
template<int I, T>
 RJ get(T& t);
 

- Requires: 0 + Requires: 0 < I - <= N. - The program is ill formed if I - is out of bounds. T is - any fusion sequence type, including tuple. + <= N. + The program is ill formed if I + is out of bounds. T is + any fusion sequence type, including tuple.

- Return type: RJ - is equivalent to result_of::at_c<I,T>::type. + Return type: RJ + is equivalent to result_of::at_c<I,T>::type.

- Returns: A reference to the Ith element of T. + Returns: A reference to the Ith element of T.

template<int I, typename T>
 PJ get(T const& t);
 

- Requires: 0 + Requires: 0 < I - <= N. - The program is ill formed if I - is out of bounds. T is - any fusion sequence type, including tuple. + <= N. + The program is ill formed if I + is out of bounds. T is + any fusion sequence type, including tuple.

- Return type: PJ - is equivalent to result_of::at_c<I,T>::type. + Return type: PJ + is equivalent to result_of::at_c<I,T>::type.

- Returns: A const reference to the Ith element of T. + Returns: A const reference to the Ith element of T.

diff --git a/doc/html/fusion/tuple/class_template_tuple/relational_operators.html b/doc/html/fusion/tuple/class_template_tuple/relational_operators.html index f1c5cd78..1ac49290 100644 --- a/doc/html/fusion/tuple/class_template_tuple/relational_operators.html +++ b/doc/html/fusion/tuple/class_template_tuple/relational_operators.html @@ -1,12 +1,14 @@ -Relational operators +Relational + operators - + - + @@ -22,47 +24,51 @@
PrevUpHomeNext
-
- +
+ + Description +

The TR1 Tuple provides the standard boolean relational operators.

-
- - Specification -
-
+
+ + Specification +
+

Notation

-
T1 - ... TN, - U1 ... - UN
+
T1 + ... TN, + U1 ... + UN

Tuple element types

-
P1 - ... PN
+
P1 + ... PN

Parameter types

-
Ti, - Ui
+
Ti, + Ui

- The type of the ith + The type of the ith element of a tuple

-
Pi
+
Pi

- The type of the ith + The type of the ith parameter

@@ -74,19 +80,23 @@ const tuple<U1, U2, ..., UN>& rhs);

- Requirements: For all i, - 1 <= + Requirements: For all i, + 1 <= i < - N, get<i>(lhs) == get<i>(rhs) - is a valid expression returning a type that is convertible to bool. + N, get<i>(lhs) == get<i>(rhs) + is a valid expression returning a type that is convertible to bool.

- Semantics: Returns true - if and only if get<i>(lhs) == get<i>(rhs) - for all i. For any 2 zero - length tuples e and f, e - == f - returns true. + Semantics: Returns true + if and only if get<i>(lhs) == get<i>(rhs) + for all i. For any 2 zero + length tuples e and f, e + == f + returns true.

template<typename T1, typename T2, ..., typename TN,
          typename U1, typename U2, ..., typename UN>
@@ -95,16 +105,18 @@
     const tuple<U1, U2, ..., UN>& rhs);
 

- Requirements: For all i, - 1 <= + Requirements: For all i, + 1 <= i < - N, get<i>(lhs) < get<i>(rhs) - is a valid expression returning a type that is convertible to bool. + N, get<i>(lhs) < get<i>(rhs) + is a valid expression returning a type that is convertible to bool.

- Semantics: Returns the lexicographical - comparison of between lhs - and rhs. + Semantics: Returns the lexicographical + comparison of between lhs + and rhs.

template<typename T1, typename T2, ..., typename TN,
          typename U1, typename U2, ..., typename UN>
@@ -113,14 +125,16 @@
     const tuple<U1, U2, ..., UN>& rhs);
 

- Requirements: For all i, - 1 <= + Requirements: For all i, + 1 <= i < - N, get<i>(lhs) == get<i>(rhs) - is a valid expression returning a type that is convertible to bool. + N, get<i>(lhs) == get<i>(rhs) + is a valid expression returning a type that is convertible to bool.

- Semantics: Returns !(lhs == rhs). + Semantics: Returns !(lhs == rhs).

template<typename T1, typename T2, ..., typename TN,
          typename U1, typename U2, ..., typename UN>
@@ -129,14 +143,16 @@
     const tuple<U1, U2, ..., UN>& rhs);
 

- Requirements: For all i, - 1 <= + Requirements: For all i, + 1 <= i < - N, get<i>(rhs) < get<i>(lhs) - is a valid expression returning a type that is convertible to bool. + N, get<i>(rhs) < get<i>(lhs) + is a valid expression returning a type that is convertible to bool.

- Semantics: Returns !(rhs < lhs) + Semantics: Returns !(rhs < lhs)

template<typename T1, typename T2, ..., typename TN,
          typename U1, typename U2, ..., typename UN>
@@ -145,15 +161,17 @@
     const tuple<U1, U2, ..., UN>& rhs);
 

- Requirements: For all i, - 1 <= + Requirements: For all i, + 1 <= i < - N, get<i>(rhs) < get<i>(lhs) - is a valid expression returning a type that is convertible to bool. + N, get<i>(rhs) < get<i>(lhs) + is a valid expression returning a type that is convertible to bool.

- Semantics: Returns rhs - < lhs. + Semantics: Returns rhs + < lhs.

template<typename T1, typename T2, ..., typename TN,
          typename U1, typename U2, ..., typename UN>
@@ -162,14 +180,16 @@
     const tuple<U1, U2, ..., UN>& rhs);
 

- Requirements: For all i, - 1 <= + Requirements: For all i, + 1 <= i < - N, get<i>(lhs) < get<i>(rhs) - is a valid expression returning a type that is convertible to bool. + N, get<i>(lhs) < get<i>(rhs) + is a valid expression returning a type that is convertible to bool.

- Semantics: Returns !(lhs < rhs). + Semantics: Returns !(lhs < rhs).

diff --git a/doc/html/fusion/tuple/class_template_tuple/tuple_creation_functions.html b/doc/html/fusion/tuple/class_template_tuple/tuple_creation_functions.html index 5125a226..91851959 100644 --- a/doc/html/fusion/tuple/class_template_tuple/tuple_creation_functions.html +++ b/doc/html/fusion/tuple/class_template_tuple/tuple_creation_functions.html @@ -1,13 +1,15 @@ -Tuple creation functions +Tuple + creation functions - + - - + +
@@ -22,44 +24,48 @@
PrevUpHomeNext
-
- +
+ + Description +

- TR1 describes 2 utility functions for creating _tr1tuple_s. make_tuple - builds a tuple out of it's argument list, and tie + TR1 describes 2 utility functions for creating _tr1tuple_s. make_tuple + builds a tuple out of it's argument list, and tie builds a tuple of references to it's arguments. The details of these creation functions are described in this section.

-
- - Specification -
+
+ + Specification +
template<typename T1, typename T2, ..., typename TN>
 tuple<V1, V2, ..., VN> make_tuple(const T1& t1, const T2& t2, ..., const TN& tn);
 

- Where Vi is X& - if the cv-unqualified type Ti - is reference_wrapper<X>, - otherwise Vi is Ti. + Where Vi is X& + if the cv-unqualified type Ti + is reference_wrapper<X>, + otherwise Vi is Ti.

- Returns: tuple<V1, V2, ..., VN>(t1, t2, ..., tN) + Returns: tuple<V1, V2, ..., VN>(t1, t2, ..., tN)

template<typename T1, typename T2, ..., typename 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 + 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.

diff --git a/doc/html/fusion/tuple/class_template_tuple/tuple_helper_classes.html b/doc/html/fusion/tuple/class_template_tuple/tuple_helper_classes.html index dda1f7aa..24589a52 100644 --- a/doc/html/fusion/tuple/class_template_tuple/tuple_helper_classes.html +++ b/doc/html/fusion/tuple/class_template_tuple/tuple_helper_classes.html @@ -1,13 +1,16 @@ -Tuple helper classes +Tuple + helper classes - + - - + +
@@ -22,51 +25,55 @@
PrevUpHomeNext
-
- +
+ + Description +

The TR1 Tuple provides 2 helper traits, for compile time access to the tuple size, and the element types.

-
- - Specification -
+
+ + Specification +
tuple_size<T>::value
 

- Requires: T - is any fusion sequence type, including tuple. + Requires: T + is any fusion sequence type, including tuple.

- Type: MPL + Type: MPL Integral Constant

- Value: The number of elements in the sequence. - Equivalent to result_of::size<T>::type. + Value: The number of elements in the sequence. + Equivalent to result_of::size<T>::type.

tuple_element<I, T>::type
 

- Requires: T - is any fusion sequence type, including tuple. - 0 <= + Requires: T + is any fusion sequence type, including tuple. + 0 <= I < - N or the program is ill formed. + N or the program is ill formed.

- Value: The type of the Ith - element of T. Equivalent - to result_of::value_at<I,T>::type. + Value: The type of the Ith + element of T. Equivalent + to result_of::value_at<I,T>::type.

diff --git a/doc/html/fusion/tuple/pairs.html b/doc/html/fusion/tuple/pairs.html index 0c0d0512..c7604ff7 100644 --- a/doc/html/fusion/tuple/pairs.html +++ b/doc/html/fusion/tuple/pairs.html @@ -3,10 +3,11 @@ Pairs - + - + @@ -22,49 +23,52 @@
PrevUpHomeNext
-
-

-Pairs -

-
- - Description -
+
+
+

+Pairs +

+
+
+

+ + Description +

The TR1 - Tuple interface is specified to provide uniform access to std::pair + Tuple interface is specified to provide uniform access to std::pair as if it were a 2 element tuple.

-
- - Specification -
+

+ + Specification +

tuple_size<std::pair<T1, T2> >::value
 

- Type: An MPL + Type: An MPL Integral Constant

- Value: Returns 2, the number of elements + Value: Returns 2, the number of elements in a pair.

tuple_element<0, std::pair<T1, T2> >::type
 

- Type: T1 + Type: T1

- Value: Returns the type of the first element + Value: Returns the type of the first element of the pair

tuple_element<1, std::pair<T1, T2> >::type
 

- Type: T2 + Type: T2

- Value: Returns thetype of the second element + Value: Returns thetype of the second element of the pair

template<int I, typename T1, typename T2>
@@ -74,21 +78,21 @@
 const P& get(const std::pair<T1, T2>& pr);
 

- Type: If I - == 0 - P is T1, - else if I == - 1 P - is T2 else the program is + Type: If I + == 0 + P is T1, + else if I == + 1 P + is T2 else the program is ill-formed.

- Returns: pr.first - if I == - 0 else pr.second.[*Returns: - pr.first if I - == 0 - else pr.second. + Returns: pr.first + if I == + 0 else pr.second.[*Returns: + pr.first if I + == 0 + else pr.second.

diff --git a/doc/html/fusion/view.html b/doc/html/fusion/view.html index 2dfa641a..0f332aea 100644 --- a/doc/html/fusion/view.html +++ b/doc/html/fusion/view.html @@ -3,10 +3,10 @@ View - + - + @@ -22,10 +22,13 @@
PrevUpHomeNext
-
-

-View -

+
+
+

+View +

+
+
single_view
filter_view
@@ -45,10 +48,10 @@ sequence(s) are actually accessed. Views' lazy nature make them very cheap to copy and be passed around by value.

-

- - Header -

+

+ + Header +

#include <boost/fusion/view.hpp>
 #include <boost/fusion/include/view.hpp>
 
diff --git a/doc/html/fusion/view/filter_view.html b/doc/html/fusion/view/filter_view.html index f52663ac..7256cf97 100644 --- a/doc/html/fusion/view/filter_view.html +++ b/doc/html/fusion/view/filter_view.html @@ -3,10 +3,10 @@ filter_view - + - + @@ -22,39 +22,42 @@
PrevUpHomeNext
-
- -
- - Description -
+
+
+ +
+
+

+ + Description +

- filter_view is a view into + filter_view is a view into a subset of its underlying sequence's elements satisfying a given predicate (an MPL metafunction). - The filter_view presents - only those elements for which its predicate evaluates to mpl::true_. + The filter_view presents + only those elements for which its predicate evaluates to mpl::true_.

-
- - Header -
+

+ + Header +

#include <boost/fusion/view/filter_view.hpp>
 #include <boost/fusion/include/filter_view.hpp>
 
-
- - Synopsis -
+

+ + Synopsis +

template <typename Sequence, typename Pred>
 struct filter_view;
 
-
- - Template parameters -
+

+ + Template parameters +

@@ -62,88 +65,74 @@ - - + - + +

- - + - +

+ - - - + + +
-

+

Parameter -

-
-

+

Description -

-
-

+

Default -

-
-

- Sequence -

-
-

- A Forward +

+ Sequence +

+ A Forward Sequence -

-
-

-

-

+

-

- Pred -

-
-

- Unary Metafunction returning an mpl::bool_ -

-
-

-

-

+ Pred +

+ Unary Metafunction returning an mpl::bool_ +

+

-
- - Model of -
- -
+

+ + Model of +

+ +

Notation

-
F
+
F

- A filter_view type + A filter_view type

-
f, - f2
+
f, + f2

- Instances of filter_view + Instances of filter_view

-
s
+
s

- A Forward Sequence + A Forward Sequence

-
- - Expression Semantics -
+

+ + Expression Semantics +

Semantics of an expression is defined only where it differs from, or is not - defined in Forward + defined in Forward Sequence.

@@ -152,71 +141,55 @@ - - + +

- - + + - - + + - - + +
-

+

Expression -

-
-

+

Semantics -

-
-

- F(s) -

-
-

- Creates a filter_view - given a sequence, s. -

-

+ F(s) +

+ Creates a filter_view + given a sequence, s. +

-

- F(f) -

-
-

- Copy constructs a filter_view - from another filter_view, - f. -

-

+ F(f) +

+ Copy constructs a filter_view + from another filter_view, + f. +

-

- f = - f2 -

-
-

- Assigns to a filter_view, - f, from another - filter_view, f2. -

-

+ f = + f2 +

+ Assigns to a filter_view, + f, from another + filter_view, f2. +

-
- - Example -
+

+ + Example +

using boost::mpl::_;
 using boost::mpl::not_;
 using boost::is_class;
 
-typedef vector<std::string, char, long, bool, double> vector_type;
+typedef vector<std::string, char, long, bool, double> vector_type;
 
 vector_type v("a-string", '@', 987654, true, 6.6);
 filter_view<vector_type const, not_<is_class<_> > > view(v);
diff --git a/doc/html/fusion/view/iterator_range.html b/doc/html/fusion/view/iterator_range.html
index 259037b1..dab5178b 100644
--- a/doc/html/fusion/view/iterator_range.html
+++ b/doc/html/fusion/view/iterator_range.html
@@ -3,10 +3,10 @@
 
 iterator_range
 
-
+
 
 
-
+
 
 
 
@@ -22,36 +22,39 @@
 
PrevUpHomeNext
-
- -
- - Description -
+
+
+ +
+
+

+ + Description +

- iterator_range presents a + iterator_range presents a sub-range of its underlying sequence delimited by a pair of iterators.

-
- - Header -
+

+ + Header +

#include <boost/fusion/view/iterator_range.hpp>
 #include <boost/fusion/include/iterator_range.hpp>
 
-
- - Synopsis -
+

+ + Synopsis +

template <typename First, typename Last>
 struct iterator_range;
 
-
- - Template parameters -
+

+ + Template parameters +

@@ -59,99 +62,85 @@ - - + - + +

- - - + + + - - - + + +
-

+

Parameter -

-
-

+

Description -

-
-

+

Default -

-
-

- First -

-
-

- A fusion Iterator -

-
-

-

-

+ First +

+ A fusion Iterator +

+

-

- Last -

-
-

- A fusion Iterator -

-
-

-

-

+ Last +

+ A fusion Iterator +

+

-
- - Model of -
-
  • -Forward Sequence, - Bidirectional - Sequence or Random +

    + + Model of +

    +
    -
    +

    Notation

    -
    IR
    +
    IR

    - An iterator_range type + An iterator_range type

    -
    f
    +
    f

    - An instance of First + An instance of First

    -
    l
    +
    l

    - An instance of Last + An instance of Last

    -
    ir, - ir2
    +
    ir, + ir2

    - Instances of iterator_range + Instances of iterator_range

    -
    - - Expression +

    + + Expression Semantics -

    +

    Semantics of an expression is defined only where it differs from, or is not - defined in Forward + defined in Forward Sequence.

    @@ -160,76 +149,60 @@ - - + +

    - - + + - - + + - - + +
    -

    +

    Expression -

    -
    -

    +

    Semantics -

    -
    -

    - IR(f, l) -

    -
    -

    - Creates an iterator_range - given iterators, f - and l. -

    -

    + IR(f, l) +

    + Creates an iterator_range + given iterators, f + and l. +

    -

    - IR(ir) -

    -
    -

    - Copy constructs an iterator_range - from another iterator_range, - ir. -

    -

    + IR(ir) +

    + Copy constructs an iterator_range + from another iterator_range, + ir. +

    -

    - ir = - ir2 -

    -
    -

    - Assigns to a iterator_range, - ir, from another - iterator_range, - ir2. -

    -

    + ir = + ir2 +

    + Assigns to a iterator_range, + ir, from another + iterator_range, + ir2. +

    -
    - - Example -
    +

    + + Example +

    char const* s = "Ruby";
    -typedef vector<int, char, double, char const*> vector_type;
    +typedef vector<int, char, double, char const*> vector_type;
     vector_type vec(1, 'x', 3.3, s);
     
    -typedef result_of::begin<vector_type>::type A;
    -typedef result_of::end<vector_type>::type B;
    -typedef result_of::next<A>::type C;
    -typedef result_of::prior<B>::type D;
    +typedef result_of::begin<vector_type>::type A;
    +typedef result_of::end<vector_type>::type B;
    +typedef result_of::next<A>::type C;
    +typedef result_of::prior<B>::type D;
     
     C c(vec);
     D d(vec);
    diff --git a/doc/html/fusion/view/joint_view.html b/doc/html/fusion/view/joint_view.html
    index bf3a51ea..4ec643f8 100644
    --- a/doc/html/fusion/view/joint_view.html
    +++ b/doc/html/fusion/view/joint_view.html
    @@ -3,10 +3,10 @@
     
     joint_view
     
    -
    +
     
     
    -
    +
     
     
     
    @@ -22,36 +22,39 @@
     
    PrevUpHomeNext
    -
    - -
    - - Description -
    +
    +
    + +
    +
    +

    + + Description +

    - joint_view presents a view + joint_view presents a view which is a concatenation of two sequences.

    -
    - - Header -
    +

    + + Header +

    #include <boost/fusion/view/joint_view.hpp>
     #include <boost/fusion/include/joint_view.hpp>
     
    -
    - - Synopsis -
    +

    + + Synopsis +

    template <typename Sequence1, typename Sequence2>
     struct joint_view;
     
    -
    - - Template parameters -
    +

    + + Template parameters +

    @@ -59,93 +62,79 @@ - - + - + +

    - - + - +

    + - - + - +

    +
    -

    +

    Parameter -

    -
    -

    +

    Description -

    -
    -

    +

    Default -

    -
    -

    - Sequence1 -

    -
    -

    - A Forward +

    + Sequence1 +

    + A Forward Sequence -

    -
    -

    -

    -

    +

    -

    - Sequence2 -

    -
    -

    - A Forward +

    + Sequence2 +

    + A Forward Sequence -

    -
    -

    -

    -

    +

    -
    - - Model of -
    - -
    +

    + + Model of +

    + +

    Notation

    -
    JV
    +
    JV

    - A joint_view type + A joint_view type

    -
    s1
    +
    s1

    - An instance of Sequence1 + An instance of Sequence1

    -
    s2
    +
    s2

    - An instance of Sequence2 + An instance of Sequence2

    -
    jv, - jv2
    +
    jv, + jv2

    - Instances of joint_view + Instances of joint_view

    -
    - - Expression Semantics -
    +

    + + Expression Semantics +

    Semantics of an expression is defined only where it differs from, or is not - defined in Forward + defined in Forward Sequence.

    @@ -154,72 +143,56 @@ - - + +

    - - + + - - + + - - + +
    -

    +

    Expression -

    -
    -

    +

    Semantics -

    -
    -

    - JV(s1, s2) -

    -
    -

    - Creates a joint_view - given sequences, s1 - and s2. -

    -

    + JV(s1, s2) +

    + Creates a joint_view + given sequences, s1 + and s2. +

    -

    - JV(jv) -

    -
    -

    - Copy constructs a joint_view - from another joint_view, - jv. -

    -

    + JV(jv) +

    + Copy constructs a joint_view + from another joint_view, + jv. +

    -

    - jv = - jv2 -

    -
    -

    - Assigns to a joint_view, - jv, from another - joint_view, jv2. -

    -

    + jv = + jv2 +

    + Assigns to a joint_view, + jv, from another + joint_view, jv2. +

    -
    - - Example -
    -
    vector<int, char> v1(3, 'x');
    -vector<std::string, int> v2("hello", 123);
    +

    + + Example +

    +
    vector<int, char> v1(3, 'x');
    +vector<std::string, int> v2("hello", 123);
     joint_view<
    -    vector<int, char>
    -  , vector<std::string, int>
    +    vector<int, char>
    +  , vector<std::string, int>
     > view(v1, v2);
     std::cout << view << std::endl;
     
    diff --git a/doc/html/fusion/view/nview.html b/doc/html/fusion/view/nview.html index 1d2684f3..c571a6ef 100644 --- a/doc/html/fusion/view/nview.html +++ b/doc/html/fusion/view/nview.html @@ -3,10 +3,10 @@ nview - + - + @@ -22,32 +22,35 @@
    PrevUpHomeNext
    -
    -

    -nview -

    -
    - - Description -
    +
    +
    +

    +nview +

    +
    +
    +

    + + Description +

    - nview presents a view which - iterates over a given Sequence in - a specified order. An nview - is constructed from an arbitrary Sequence + nview presents a view which + iterates over a given Sequence in + a specified order. An nview + is constructed from an arbitrary Sequence and a list of indicies specifying the elements to iterate over.

    -
    - - Header -
    +

    + + Header +

    #include <boost/fusion/view/nview.hpp>
     #include <boost/fusion/include/nview.hpp>
     
    -
    - - Synopsis -
    +

    + + Synopsis +

    template <typename Sequence, typename Indicies>
     struct nview;
     
    @@ -55,10 +58,10 @@
     typename result_of::nview<Sequence, I1, I2, ...>::type
     as_nview(Sequence& s);
     
    -
    - - Template parameters -
    +

    + + Template parameters +

    @@ -66,110 +69,89 @@ - - + - + +

    - - + - +

    + - - + - +

    + - - + - +

    +
    -

    +

    Parameter -

    -
    -

    +

    Description -

    -
    -

    +

    Default -

    -
    -

    - Sequence -

    -
    -

    - An arbitrary Fusion Forward +

    + Sequence +

    + An arbitrary Fusion Forward Sequence -

    -
    -

    -

    -

    +

    -

    - Indicies -

    -
    -

    - A mpl::vector_c<int, ...> holding the indicies defining +

    + Indicies +

    + A mpl::vector_c<int, ...> holding the indicies defining the required iteration order. -

    -
    -

    -

    -

    +

    -

    - I1, I2, I3... -

    -
    -

    +

    + I1, I2, I3... +

    A list of integers specifying the required iteration order. -

    -
    -

    - INT_MAX for I2, I3... -

    -

    + INT_MAX for I2, I3... +

    -
    - - Model of -
    -
    • -Random - Access Sequence (see Sequence +

      + + Model of +

      + -
      +

      Notation

      -
      NV
      +
      NV

      - A nview type + A nview type

      -
      s
      +
      s

      - An instance of Sequences + An instance of Sequences

      -
      nv1, - nv2
      +
      nv1, + nv2

      - Instances of NV + Instances of NV

      -
      - - Expression Semantics -
      +

      + + Expression Semantics +

      Semantics of an expression is defined only where it differs from, or is not - defined in Random + defined in Random Access Sequence.

      @@ -178,72 +160,56 @@ - - + +

      - - + +

      - - + + - - + +
      -

      +

      Expression -

      -
      -

      +

      Semantics -

      -
      -

      - NV(s) -

      -
      -

      - Creates an nview +

      + NV(s) +

      + Creates an nview given a sequence and a list of indicies. -

      -
      -

      - NV(nv1) -

      -
      -

      - Copy constructs an nview - from another nview, - nv1. -

      -

      + NV(nv1) +

      + Copy constructs an nview + from another nview, + nv1. +

      -

      - nv1 = - nv2 -

      -
      -

      - Assigns to an nview, - nv1, from another - nview, nv2. -

      -

      + nv1 = + nv2 +

      + Assigns to an nview, + nv1, from another + nview, nv2. +

      - The nview internally stores - a Fusion vector - of references to the elements of the original Fusion Sequence + The nview internally stores + a Fusion vector + of references to the elements of the original Fusion Sequence

      -
      - - Example -
      -
      typedef vector<int, char, double> vec;
      +

      + + Example +

      +
      typedef vector<int, char, double> vec;
       typedef mpl::vector_c<int, 2, 1, 0, 2, 0> indicies;
       
       vec v1(1, 'c', 2.0);
      diff --git a/doc/html/fusion/view/reverse_view.html b/doc/html/fusion/view/reverse_view.html
      index dacdc1da..61d7a51a 100644
      --- a/doc/html/fusion/view/reverse_view.html
      +++ b/doc/html/fusion/view/reverse_view.html
      @@ -3,10 +3,10 @@
       
       reverse_view
       
      -
      +
       
       
      -
      +
       
       
       
      @@ -22,33 +22,36 @@
       
      PrevUpHomeNext
      -
      - +
      +
      + +
      +

      - reverse_view presents a reversed + reverse_view presents a reversed view of underlying sequence. The first element will be its last and the last element will be its first.

      -
      - - Header -
      +

      + + Header +

      #include <boost/fusion/view/reverse_view.hpp>
       #include <boost/fusion/include/reverse_view.hpp>
       
      -
      - - Synopsis -
      +

      + + Synopsis +

      template <typename Sequence>
       struct reverse_view;
       
      -
      - - Template parameters -
      +

      + + Template parameters +

      @@ -56,72 +59,63 @@ - - + - + +

      - - + - +

      +
      -

      +

      Parameter -

      -
      -

      +

      Description -

      -
      -

      +

      Default -

      -
      -

      - Sequence -

      -
      -

      - A Bidirectional +

      + Sequence +

      + A Bidirectional Sequence -

      -
      -

      -

      -

      +

      -
      - - Model of -
      -
      • Bidirectional +

        + + Model of +

        + -
        +

        Notation

        -
        RV
        +
        RV

        - A reverse_view type + A reverse_view type

        -
        s
        +
        s

        - An instance of Sequence + An instance of Sequence

        -
        rv, - rv2
        +
        rv, + rv2

        - Instances of reverse_view + Instances of reverse_view

        -
        - - Expression +

        + + Expression Semantics -

        +

        Semantics of an expression is defined only where it differs from, or is not - defined in Bidirectional + defined in Bidirectional Sequence.

        @@ -130,67 +124,51 @@ - - + +

        - - + + - - + + - - + +
        -

        +

        Expression -

        -
        -

        +

        Semantics -

        -
        -

        - RV(s) -

        -
        -

        - Creates a unary reverse_view - given sequence, s. -

        -

        + RV(s) +

        + Creates a unary reverse_view + given sequence, s. +

        -

        - RV(rv) -

        -
        -

        - Copy constructs a reverse_view - from another reverse_view, - rv. -

        -

        + RV(rv) +

        + Copy constructs a reverse_view + from another reverse_view, + rv. +

        -

        - rv = - rv2 -

        -
        -

        - Assigns to a reverse_view, - rv, from another - reverse_view, rv2. -

        -

        + rv = + rv2 +

        + Assigns to a reverse_view, + rv, from another + reverse_view, rv2. +

        -
        - - Example -
        -
        typedef vector<int, short, double> vector_type;
        +

        + + Example +

        +
        typedef vector<int, short, double> vector_type;
         vector_type vec(2, 5, 3.3);
         
         reverse_view<vector_type> reverse(vec);
        diff --git a/doc/html/fusion/view/single_view.html b/doc/html/fusion/view/single_view.html
        index 9153a177..71f85da0 100644
        --- a/doc/html/fusion/view/single_view.html
        +++ b/doc/html/fusion/view/single_view.html
        @@ -3,10 +3,10 @@
         
         single_view
         
        -
        +
         
         
        -
        +
         
         
         
        @@ -22,32 +22,35 @@
         
        PrevUpHomeNext
        -
        - +
        +
        + +
        +

        - single_view is a view into + single_view is a view into a value as a single element sequence.

        -
        - - Header -
        +

        + + Header +

        #include <boost/fusion/view/single_view.hpp>
         #include <boost/fusion/include/single_view.hpp>
         
        -
        - - Synopsis -
        +

        + + Synopsis +

        template <typename T>
         struct single_view;
         
        -
        - - Template parameters -
        +

        + + Template parameters +

        @@ -55,69 +58,59 @@ - - + - + +

        - - + - +

        +
        -

        +

        Parameter -

        -
        -

        +

        Description -

        -
        -

        +

        Default -

        -
        -

        - T -

        -
        -

        +

        + T +

        Any type -

        -
        -

        -

        -

        +

        -
        - - Model of -
        - -
        +

        + + Model of +

        + +

        Notation

        -
        S
        +
        S

        - A single_view type + A single_view type

        -
        s, - s2
        +
        s, + s2

        - Instances of single_view + Instances of single_view

        -
        x
        +
        x

        - An instance of T + An instance of T

        -
        - - Expression Semantics -
        +

        + + Expression Semantics +

        Semantics of an expression is defined only where it differs from, or is not - defined in Forward + defined in Forward Sequence.

        @@ -126,66 +119,50 @@ - - + +

        - - + + - - + + - - + +
        -

        +

        Expression -

        -
        -

        +

        Semantics -

        -
        -

        - S(x) -

        -
        -

        - Creates a single_view - from x. -

        -

        + S(x) +

        + Creates a single_view + from x. +

        -

        - S(s) -

        -
        -

        - Copy constructs a single_view - from another single_view, - s. -

        -

        + S(s) +

        + Copy constructs a single_view + from another single_view, + s. +

        -

        - s = - s2 -

        -
        -

        - Assigns to a single_view, - s, from another - single_view, s2. -

        -

        + s = + s2 +

        + Assigns to a single_view, + s, from another + single_view, s2. +

        -
        - - Example -
        +

        + + Example +

        single_view<int> view(3);
         std::cout << view << std::endl;
         
        diff --git a/doc/html/fusion/view/transform_view.html b/doc/html/fusion/view/transform_view.html index 36cd83c9..94501c95 100644 --- a/doc/html/fusion/view/transform_view.html +++ b/doc/html/fusion/view/transform_view.html @@ -3,10 +3,10 @@ transform_view - + - + @@ -22,46 +22,49 @@
        PrevUpHomeNext
        -
        - +
        +
        + +
        +

        - The unary version of transform_view + The unary version of transform_view presents a view of its underlying sequence given a unary function object - or function pointer. The binary version of transform_view + or function pointer. The binary version of transform_view presents a view of 2 underlying sequences, given a binary function object - or function pointer. The transform_view - inherits the traversal characteristics (see Sequence + or function pointer. The transform_view + inherits the traversal characteristics (see Sequence Traversal Concept) of its underlying sequence or sequences.

        -
        - - Header -
        +

        + + Header +

        #include <boost/fusion/view/transform_view.hpp>
         #include <boost/fusion/include/transform_view.hpp>
         
        -
        - - Synopsis -
        +

        + + Synopsis +

        - Unary Version + Unary Version

        template <typename Sequence, typename F1>
         struct transform_view;
         

        - Binary Version + Binary Version

        template <typename Sequence1, typename Sequence2, typename F2>
         struct transform_view;
         
        -
        - - Template parameters -
        +

        + + Template parameters +

        @@ -69,181 +72,154 @@ - - + - + +

        - - + - +

        + - - + - +

        + - - + - +

        + - - + - +

        + - - + - +

        +
        -

        +

        Parameter -

        -
        -

        +

        Description -

        -
        -

        +

        Default -

        -
        -

        - Sequence -

        -
        -

        - A Forward +

        + Sequence +

        + A Forward Sequence -

        -
        -

        -

        -

        +

        -

        - Sequence1 -

        -
        -

        - A Forward +

        + Sequence1 +

        + A Forward Sequence -

        -
        -

        -

        -

        +

        -

        - Sequence2 -

        -
        -

        - A Forward +

        + Sequence2 +

        + A Forward Sequence -

        -
        -

        -

        -

        +

        -

        - F1 -

        -
        -

        - A unary function object or function pointer. boost::result_of<F1(E)>::type is the return type of an instance - of F1 when called - with a value of each element type E +

        + F1 +

        + A unary function object or function pointer. boost::result_of<F1(E)>::type is the return type of an instance + of F1 when called + with a value of each element type E in the input sequence. -

        -
        -

        -

        -

        +

        -

        - F2 -

        -
        -

        - A binary function object or function pointer. boost::result_of<F2(E1, E2)>::type is the return type of an instance - of F2 when called - with a value of each corresponding pair of element type E1 and E2 +

        + F2 +

        + A binary function object or function pointer. boost::result_of<F2(E1, E2)>::type is the return type of an instance + of F2 when called + with a value of each corresponding pair of element type E1 and E2 in the input sequences. -

        -
        -

        -

        -

        +

        -
        - - Model of -
        -
        • -Forward Sequence, - Bidirectional - Sequence or Random +

          + + Model of +

          +
          -
          +

          Notation

          -
          TV
          +
          TV

          - A transform_view type + A transform_view type

          -
          BTV
          +
          BTV

          - A binary transform_view + A binary transform_view type

          -
          UTV
          +
          UTV

          - A unary transform_view + A unary transform_view type

          -
          f1
          +
          f1

          - An instance of F1 + An instance of F1

          -
          f2
          +
          f2

          - An instance of F2 + An instance of F2

          -
          s
          +
          s

          - An instance of Sequence + An instance of Sequence

          -
          s1
          +
          s1

          - An instance of Sequence1 + An instance of Sequence1

          -
          s2
          +
          s2

          - An instance of Sequence2 + An instance of Sequence2

          -
          tv, - tv2
          +
          tv, + tv2

          - Instances of transform_view + Instances of transform_view

          -
          - - Expression +

          + + Expression Semantics -

          +

          Semantics of an expression is defined only where it differs from, or is not - defined in Forward - Sequence, Bidirectional - Sequence or Random - Access Sequence depending on the traversal characteristics (see Sequence Traversal Concept) + defined in Forward + Sequence, Bidirectional + Sequence or Random + Access Sequence depending on the traversal characteristics (see Sequence Traversal Concept) of its underlying sequence or sequences.

          @@ -252,83 +228,63 @@ - - + +

          - - + + - - + + - - + + - - + +
          -

          +

          Expression -

          -
          -

          +

          Semantics -

          -
          -

          - UTV(s, f1) -

          -
          -

          - Creates a unary transform_view - given sequence, s - and unary function object or function pointer, f1. -

          -

          + UTV(s, f1) +

          + Creates a unary transform_view + given sequence, s + and unary function object or function pointer, f1. +

          -

          - BTV(s1, s2, f2) -

          -
          -

          - Creates a binary transform_view - given sequences, s1 - and s2 and binary - function object or function pointer, f2. -

          -

          + BTV(s1, s2, f2) +

          + Creates a binary transform_view + given sequences, s1 + and s2 and binary + function object or function pointer, f2. +

          -

          - TV(tv) -

          -
          -

          - Copy constructs a transform_view - from another transform_view, - tv. -

          -

          + TV(tv) +

          + Copy constructs a transform_view + from another transform_view, + tv. +

          -

          - tv = - tv2 -

          -
          -

          - Assigns to a transform_view, - tv, from another - transform_view, - tv2. -

          -

          + tv = + tv2 +

          + Assigns to a transform_view, + tv, from another + transform_view, + tv2. +

          -
          - - Example -
          +

          + + Example +

          struct square
           {
               template<typename Sig>
          @@ -346,7 +302,7 @@
               }
           };
           
          -typedef vector<int, short, double> vector_type;
          +typedef vector<int, short, double> vector_type;
           vector_type vec(2, 5, 3.3);
           
           transform_view<vector_type, square> transform(vec, square());
          diff --git a/doc/html/fusion/view/zip_view.html b/doc/html/fusion/view/zip_view.html
          index 653cc549..c9204f7f 100644
          --- a/doc/html/fusion/view/zip_view.html
          +++ b/doc/html/fusion/view/zip_view.html
          @@ -3,10 +3,10 @@
           
           zip_view
           
          -
          +
           
           
          -
          +
           
           
           
          @@ -22,39 +22,42 @@
           
          PrevUpHomeNext
          -
          - -
          - - Description -
          +
          +
          + +
          +
          +

          + + Description +

          - zip_view presents a view - which iterates over a collection of Sequence(s) - in parallel. A zip_view is - constructed from a Sequence of references + zip_view presents a view + which iterates over a collection of Sequence(s) + in parallel. A zip_view is + constructed from a Sequence of references to the component _sequence_s.

          -
          - - Header -
          +

          + + Header +

          #include <boost/fusion/view/zip_view.hpp>
           #include <boost/fusion/include/zip_view.hpp>
           
          -
          - - Synopsis -
          +

          + + Synopsis +

          template <typename Sequences>
           struct zip_view;
           
          -
          - - Template parameters -
          +

          + + Template parameters +

          @@ -62,77 +65,70 @@ - - + - + +

          - - + - +

          +
          -

          +

          Parameter -

          -
          -

          +

          Description -

          -
          -

          +

          Default -

          -
          -

          - Sequences -

          -
          -

          - A Forward +

          + Sequences +

          + A Forward Sequence of references to other Fusion _sequence_s -

          -
          -

          -

          -

          +

          -
          - - Model of -
          -
          • -Forward Sequence, - Bidirectional - Sequence or Random +

            + + Model of +

            +
            -
            +

            Notation

            -
            ZV
            +
            ZV

            - A zip_view type + A zip_view type

            -
            s
            +
            s

            - An instance of Sequences + An instance of Sequences

            -
            zv1, - zv2
            +
            zv1, + zv2

            - Instances of ZV + Instances of ZV

            -
            - - Expression Semantics -
            +

            + + Expression Semantics +

            Semantics of an expression is defined only where it differs from, or is not - defined in Forward + defined in Forward Sequence.

            @@ -141,71 +137,55 @@ - - + +

            - - + +

            - - + + - - + +
            -

            +

            Expression -

            -
            -

            +

            Semantics -

            -
            -

            - ZV(s) -

            -
            -

            - Creates a zip_view +

            + ZV(s) +

            + Creates a zip_view given a sequence of references to the component _sequence_s. -

            -
            -

            - ZV(zv1) -

            -
            -

            - Copy constructs a zip_view - from another zip_view, - zv. -

            -

            + ZV(zv1) +

            + Copy constructs a zip_view + from another zip_view, + zv. +

            -

            - zv1 = - zv2 -

            -
            -

            - Assigns to a zip_view, - zv, from another - zip_view, zv2. -

            -

            + zv1 = + zv2 +

            + Assigns to a zip_view, + zv, from another + zip_view, zv2. +

            -
            - - Example -
            -
            typedef vector<int,int> vec1;
            -typedef vector<char,char> vec2;
            +

            + + Example +

            +
            typedef vector<int,int> vec1;
            +typedef vector<char,char> vec2;
             vec1 v1(1,2);
             vec2 v2('a','b');
            -typedef vector<vec1&, vec2&> sequences;
            +typedef vector<vec1&, vec2&> sequences;
             std::cout << zip_view<sequences>(sequences(v1, v2)) << std::endl; // ((1 a) (2 b))
             
            diff --git a/doc/html/index.html b/doc/html/index.html index 83e07fad..d329753f 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -3,7 +3,7 @@ Chapter 1. Fusion 2.0 - + @@ -18,8 +18,9 @@
            Next
            -
            -
            +
            +
            +

            Chapter 1. Fusion 2.0

            @@ -33,13 +34,13 @@

            -
            -

            +

            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) -

            -
            -
            +

            +
            +
            +

            Table of Contents

            @@ -241,7 +242,7 @@
            - +

            Last revised: September 29, 2009 at 14:44:20 GMT

            Last revised: October 11, 2009 at 16:05:02 GMT


            diff --git a/test/sequence/nview.cpp b/test/sequence/nview.cpp index b8729cea..e8110f79 100644 --- a/test/sequence/nview.cpp +++ b/test/sequence/nview.cpp @@ -28,48 +28,48 @@ BOOST_FUSION_ADAPT_STRUCT( (double, double_) ); -using namespace boost::fusion; +namespace fusion = boost::fusion; template -bool check_size(Sequence& s, int seqsize) +bool check_size(Sequence const& s, int seqsize) { - return size(s) == seqsize; + return fusion::size(s) == seqsize; } template -bool check_deref_begin(Sequence& s, T val) +bool check_deref_begin(Sequence const& s, T val) { - return deref(begin(s)) == val; + return fusion::deref(fusion::begin(s)) == val; } template -bool check_deref_next(Sequence& s, T val) +bool check_deref_next(Sequence const& s, T val) { - return deref(next(begin(s))) == val; + return fusion::deref(fusion::next(fusion::begin(s))) == val; } template -bool check_deref_advance(Sequence& s, T val) +bool check_deref_advance(Sequence const& s, T val) { - return deref(advance_c(begin(s))) == val; + return fusion::deref(fusion::advance_c(fusion::begin(s))) == val; } template -bool check_deref_prior(Sequence& s, T val) +bool check_deref_prior(Sequence const& s, T val) { - return deref(prior(end(s))) == val; + return fusion::deref(fusion::prior(fusion::end(s))) == val; } template -bool check_at(Sequence& s, T val) +bool check_at(Sequence const& s, T val) { - return at_c(s) == val; + return fusion::at_c(s) == val; } template -bool check_distance(Sequence& s, int val) +bool check_distance(Sequence const& s, int val) { - return distance(begin(s), end(s)) == val; + return fusion::distance(fusion::begin(s), fusion::end(s)) == val; } int main() @@ -79,6 +79,8 @@ int main() t.string_ = "test"; t.double_ = 2.0; + using fusion::as_nview; + // check size() { BOOST_TEST(check_size(as_nview<0>(t), 1)); diff --git a/test/sequence/test_deduce_sequence.cpp b/test/sequence/test_deduce_sequence.cpp new file mode 100644 index 00000000..d137cd30 --- /dev/null +++ b/test/sequence/test_deduce_sequence.cpp @@ -0,0 +1,16 @@ + +#include +#include + +typedef boost::fusion::traits::deduce_sequence < + +boost::mpl::vector + +>::type seq1_t; + + +typedef boost::fusion::traits::deduce_sequence < + +boost::fusion::vector + +>::type seq2_t;