diff --git a/doc/adapted.qbk b/doc/adapted.qbk new file mode 100644 index 00000000..a43801a3 --- /dev/null +++ b/doc/adapted.qbk @@ -0,0 +1,161 @@ +[section Adapted] + +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. 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 +[footnote Fusion sequences may also be adapted as fully conforming __mpl__ +sequences (see __intrinsics__). That way, we can have 2-way adaptation to +and from __mpl__ and Fusion]. + +[heading Header] + + #include + #include + +[section std::pair] + +This module provides adapters for `std::pair`. Including the module header +makes `std::pair` a fully conforming __random_access_sequence__. + +[heading Header] + + #include + #include + +[heading Model of] + +* __random_access_sequence__ + +[heading Example] + + std::pair p(123, "Hola!!!"); + std::cout << __at_c__<0>(p) << std::endl; + std::cout << __at_c__<1>(p) << std::endl; + std::cout << p << std::endl; + +[heading See also] + +__std_pair_doc__, __tr1_tuple_pair__ + +[endsect] + +[section mpl sequence] + +This module provides adapters for __mpl__ sequences. Including the module +header makes all __mpl__ sequences fully conforming fusion sequences. + +[heading Header] + + #include + #include + +[heading Model of] + +* __forward_sequence__ (If the __mpl__ sequence is a forward sequence.) +* __bidirectional_sequence__ (If the __mpl__ sequence is a bidirectional sequence.) +* __random_access_sequence__ (If the __mpl__ sequence is a random access sequence.) + +[heading Example] + + mpl::vector_c vec_c; + fusion::vector2 v(vec_c); + std::cout << __at_c__<0>(v) << std::endl; + std::cout << __at_c__<1>(v) << std::endl; + + v = mpl::vector_c(); + std::cout << __at_c__<0>(v) << std::endl; + std::cout << __at_c__<1>(v) << std::endl; + +[heading See also] + +__mpl__ + +[endsect] + +[section boost::array] + +This module provides adapters for `boost::array`. Including the module +header makes `boost::array` a fully conforming __random_access_sequence__. + +[heading Header] + + #include + #include + +[heading Model of] + +* __random_access_sequence__ + +[heading Example] + + boost::array 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; + +[heading See also] + +__boost_array_library__ + +[endsect] + +[section boost::tuple] +This module provides adapters for `boost::tuple`. Including the module +header makes `boost::tuple` a fully conforming __forward_sequence__. + +[heading Header] + + #include + #include + +[heading Model of] + +* __forward_sequence__ + +[heading Example] + + boost::tuple example_tuple(101, "hello"); + std::cout << *boost::fusion::begin(example_tuple) << '\n'; + std::cout << *boost::fusion::next(boost::fusion::begin(example_tuple)) << '\n'; + +[heading See also] + +__boost_tuple_library__ + +[endsect] + +[section boost::variant] +This module provides adapters for `boost::variant`. Including the module +header makes `boost::variant` a fully conforming __forward_sequence__. +The variant acts as a sequence of the types that can be contained in the variant. +Accessing types not currently stored int the variant will lead to the variant +being populated with a default constructed value of that type. + +[heading Header] + + #include + #include + +[heading Model of] + +* __forward_sequence__ + +[heading Example] + + boost::variant example_variant = 101; + std::cout << example_variant << '\n'; + *boost::fusion::find(example_variant) = "hello"; + std::cout << example_variant << '\n'; + +[heading See also] + +__boost_variant_library__ + +[endsect] + +[endsect] diff --git a/doc/algorithms.qbk b/doc/algorithm.qbk similarity index 94% rename from doc/algorithms.qbk rename to doc/algorithm.qbk index 44c46073..25e2021d 100644 --- a/doc/algorithms.qbk +++ b/doc/algorithm.qbk @@ -1,49 +1,54 @@ -[section Algorithms] +[section Algorithm] + [heading Lazy Evaluation] -Unlike __mpl__, Fusion algorithms are lazy and non sequence-type -preserving. What does that mean? It means that when you operate on a -sequence through a Fusion algorithm that returns a sequence, the sequence -returned may not be of the same class as the original. This is by design. -Runtime efficiency is given a high priority. Like __mpl__, and unlike -__stl__, 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 reference to -the original sequence plus the transform function. Iteration over the -__transform_view__ will apply the transform function over the sequence -elements on demand. This /lazy/ evaluation scheme allows us to chain as +Unlike __mpl__, Fusion algorithms are lazy and non sequence-type +preserving. What does that mean? It means that when you operate on a +sequence through a Fusion algorithm that returns a sequence, the sequence +returned may not be of the same class as the original. This is by design. +Runtime efficiency is given a high priority. Like __mpl__, and unlike +__stl__, 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 reference to +the original sequence plus the transform function. Iteration over 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. [heading 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 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__ functions to convert back to the original +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__ functions to convert back to the original sequence type. [heading Header] + #include + #include [section Iteration] -The iteration algorithms provide the fundamental algorithms for traversing +The iteration algorithms provide the fundamental algorithms for traversing a sequence repeatedly applying an operation to its elements. [heading Header] + #include + #include [section Functions] @@ -79,7 +84,9 @@ For a sequence `Seq`, initial state, and binary function object or function poin Linear, exactly `__result_of_size__::value` applications of `f`. [heading Header] + #include + #include [heading Example] struct make_string @@ -130,7 +137,9 @@ For a sequence `Seq`, initial state, and binary function object or function poin Linear, exactly `__result_of_size__::value` applications of `f`. [heading Header] + #include + #include [heading Example] struct make_string @@ -179,7 +188,9 @@ Applies a unary function object to each element of a sequence. Linear, exactly `__result_of_size__::value` applications of `f`. [heading Header] + #include + #include [heading Example] struct increment @@ -235,7 +246,9 @@ type `State` and binary function object or function pointer of type `F`. Linear, exactly `__result_of_size__::value` applications of `F`. [heading Header] + #include + #include [endsect] @@ -273,7 +286,9 @@ type `State` and binary function object or function pointer of type `F`. Linear, exactly `__result_of_size__::value` applications of `F`. [heading Header] + #include + #include [endsect] @@ -311,7 +326,9 @@ The return type is always `void`. Constant. [heading Header] + #include + #include [endsect] @@ -323,7 +340,9 @@ Constant. The query algorithms provide support for searching and analyzing sequences. [heading Header] + #include + #include [section Functions] @@ -357,7 +376,9 @@ For a sequence `seq` and unary function object `f`, `any` returns true if `f` re Linear. At most `__result_of_size__::value` comparisons. [heading Header] + #include + #include [heading Example] struct odd @@ -404,7 +425,9 @@ For a sequence `seq` and unary function object `f`, `all` returns true if `f` re Linear. At most `__result_of_size__::value` comparisons. [heading Header] + #include + #include [heading Example] struct odd @@ -451,7 +474,9 @@ For a sequence `seq` and unary function object `f`, `none` returns true if `f` r Linear. At most `__result_of_size__::value` comparisons. [heading Header] + #include + #include [heading Example] struct odd @@ -471,7 +496,7 @@ Linear. At most `__result_of_size__::value` comparisons. [section find] [heading Description] -Finds the first element of a given type within a sequence. +Finds the first element of a given type within a sequence. [heading Synopsis] template< @@ -504,7 +529,9 @@ Equivalent to `__find_if__ >(seq)` Linear. At most `__result_of_size__::value` comparisons. [heading Header] + #include + #include [heading Example] const __vector__ vec('a','0'); @@ -514,7 +541,7 @@ Linear. At most `__result_of_size__::value` comparisons. [endsect] [section find_if] -Finds the first element within a sequence with a type for which a given __mpl_lambda_expression__ evaluates to +Finds the first element within a sequence with a type for which a given __mpl_lambda_expression__ evaluates to `boost::mpl::true_`. [heading Description] @@ -543,14 +570,14 @@ Finds the first element within a sequence with a type for which a given __mpl_la [*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_`, +[*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. [heading Complexity] Linear. At most `__result_of_size__::value` comparisons. -[heading Header] - #include + +/algorithm/query/find_if.hpp> [heading Example] const __vector__ vec(1.0,2); @@ -589,7 +616,9 @@ Returns the number of elements of a given type within a sequence. Linear. At most `__result_of_size__::value` comparisons. [heading Header] + #include + #include [heading Example] const __vector__ vec(1.0,2,3); @@ -600,7 +629,7 @@ Linear. At most `__result_of_size__::value` comparisons. [section count_if] [heading Description] -Returns the number of elements within a sequence with a type for which a given unary function object evaluates to +Returns the number of elements within a sequence with a type for which a given unary function object evaluates to `true`. [heading Synopsis] @@ -628,7 +657,9 @@ Returns the number of elements within a sequence with a type for which a given u Linear. At most `__result_of_size__::value` comparisons. [heading Header] + #include + #include [heading Example] const __vector__ vec(1,2,3); @@ -672,7 +703,9 @@ A metafunction returning the result type of __any__. Constant. [heading Header] + #include + #include [endsect] @@ -708,7 +741,9 @@ A metafunction returning the result type of __all__. Constant. [heading Header] + #include + #include [endsect] @@ -744,7 +779,9 @@ A metafunction returning the result type of __none__. Constant. [heading Header] + #include + #include [endsect] @@ -780,7 +817,9 @@ Returns the result type of `find`, given the sequence and search types. Linear, at most `__result_of_size__::value` comparisons. [heading Header] + #include + #include [endsect] @@ -816,7 +855,9 @@ Returns the result type of `find_if` given the sequence and predicate types. Linear. At most `__result_of_size__::value` comparisons. [heading Header] + #include + #include [endsect] @@ -852,7 +893,9 @@ A metafunction that returns the result type of `count` given the sequence and se Constant. [heading Header] + #include + #include [endsect] @@ -888,7 +931,9 @@ A metafunction that returns the result type of `count_if` given the sequence and Constant. [heading Header] + #include + #include [endsect] @@ -904,7 +949,9 @@ it is important that the lifetime of the input arguments is greater than the period during which you wish to use the results.] [heading Header] + #include + #include [section Functions] @@ -929,7 +976,7 @@ For a given sequence, filter returns a new sequences containing only the element [heading Expression Semantics] __filter__(seq); -[*Return type]: A model of __forward_sequence__. +[*Return type]: A model of __forward_sequence__. [*Semantics]: Returns a sequence containing all the elements of `seq` of type `T`. Equivalent to `__filter_if__ >(seq)`. @@ -938,7 +985,9 @@ Equivalent to `__filter_if__ >(seq)`. Constant. Returns a view which is lazily evaluated. [heading Header] + #include + #include [heading Example] const __vector__ vec(1,2,3,4); @@ -977,7 +1026,9 @@ to `boost::mpl::true_`. The order of the retained elements is the same as in the Constant. Returns a view which is lazily evaluated. [heading Header] + #include + #include [heading Example] const __vector__ vec(1,2,3.0,4.0); @@ -1036,7 +1087,9 @@ with elements created by applying `f(e)` to each element of `e` of `seq`. Constant. Returns a view which is lazily evaluated. [heading Header] + #include + #include [heading Example] struct triple @@ -1084,7 +1137,9 @@ Replaces each value within a sequence of a given type and value with a new value Constant. Returns a view which is lazily evaluated. [heading Header] + #include + #include [heading Example] assert(__replace__(__make_vector__(1,2), 2, 3) == __make_vector__(1,3)); @@ -1117,14 +1172,16 @@ a new value. [*Return type]: A model of __forward_sequence__. -[*Semantics]: Returns a new sequence with all the elements of `seq`, +[*Semantics]: Returns a new sequence with all the elements of `seq`, with `new_value` assigned to each element for which `f` evaluates to `true`. [heading Complexity] Constant. Returns a view which is lazily evaluated. [heading Header] + #include + #include [heading Example] struct odd @@ -1161,7 +1218,7 @@ Returns a new sequence, with all the elements of the original sequence, except t [heading Expression Semantics] __remove__(seq); -[*Return type]: A model of __forward_sequence__. +[*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__ >(seq)`. @@ -1170,7 +1227,9 @@ those of type `T`. Equivalent to `__remove_if__ >(seq)`. Constant. Returns a view which is lazily evaluated. [heading Header] + #include + #include [heading Example] const __vector__ vec(1,2.0); @@ -1200,17 +1259,19 @@ function object evaluates to `true`. [heading Expression Semantics] __remove_if__(seq); -[*Return type]: A model of __forward_sequence__. +[*Return type]: A model of __forward_sequence__. [*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_`. +those elements with types for which `Pred` evaluates to `boost::mpl::true_`. Equivalent to `__filter__ >(seq)`. [heading Complexity] Constant. Returns a view which is lazily evaluated. [heading Header] + #include + #include [heading Example] const __vector__ vec(1,2.0); @@ -1245,7 +1306,9 @@ Returns a new sequence with the elements of the original in reverse order. Constant. Returns a view which is lazily evaluated. [heading Header] + #include + #include [heading Example] assert(__reverse__(__make_vector__(1,2,3)) == __make_vector__(3,2,1)); @@ -1279,7 +1342,9 @@ __clear__ returns an empty sequence. Constant. [heading Header] + #include + #include [heading Example] assert(__clear__(__make_vector__(1,2,3)) == __make_vector__()); @@ -1333,7 +1398,9 @@ in the range [`first`,`last`). Constant. Returns a view which is lazily evaluated. [heading Header] + #include + #include [heading Example] const __vector__ vec(1, 2.0, 'c'); @@ -1372,7 +1439,9 @@ elements of the original except those with a given key. Constant. Returns a view which is lazily evaluated. [heading Header] + #include + #include [heading Example] assert(__erase_key__(__make_map__('a', 'b')) == __make_map__('b')); @@ -1412,7 +1481,9 @@ type and value of `t` inserted at iterator `pos`. Constant. Returns a view which is lazily evaluated. [heading Header] + #include + #include [heading Example] const __vector__ vec(1,2); @@ -1453,7 +1524,9 @@ Returns a new sequence with another sequence inserted at a specified iterator. Constant. Returns a view which is lazily evaluated. [heading Header] + #include + #include [heading Example] const __vector__ vec(1,2); @@ -1489,7 +1562,9 @@ Takes 2 sequences and returns a sequence containing the elements of the first fo Constant. Returns a view which is lazily evaluated. [heading Header] + #include + #include [heading Example] __vector__ v1(1, 'a'); @@ -1510,7 +1585,7 @@ Zips sequences together to form a single sequence, whos members are tuples of th ... typename SequenceN > - typename __result_of_zip__::type + typename __result_of_zip__::type zip(Sequence1 const& seq1, Sequence2 const& seq2, ... SequenceN const& seqN); [table Parameters @@ -1529,7 +1604,9 @@ Zips sequences together to form a single sequence, whos members are tuples of th Constant. Returns a view which is lazily evaluated. [heading Header] + #include + #include [heading Example] __vector__ v1(1, 'a'); @@ -1541,7 +1618,7 @@ Constant. Returns a view which is lazily evaluated. [section pop_back] [heading Description] -Returns a new sequence, with the last element of the original removed. +Returns a new sequence, with the last element of the original removed. [heading Synopsis] template< @@ -1565,7 +1642,9 @@ Returns a new sequence, with the last element of the original removed. Constant. Returns a view which is lazily evaluated. [heading Header] + #include + #include [heading Example] assert(___pop_back__(__make_vector__(1,2,3)) == __make_vector__(1,2)); @@ -1600,7 +1679,9 @@ Returns a new sequence, with the first element of the original removed. Constant. Returns a view which is lazily evaluated. [heading Header] + #include + #include [heading Example] assert(__pop_front__(__make_vector__(1,2,3)) == __make_vector__(2,3)); @@ -1637,7 +1718,9 @@ Returns a new sequence with an element added at the end. Constant. Returns a view which is lazily evaluated. [heading Header] + #include + #include [heading Example] assert(__push_back__(__make_vector__(1,2,3),4) == __make_vector__(1,2,3,4)); @@ -1674,7 +1757,9 @@ Returns a new sequence with an element added at the beginning. Constant. Returns a view which is lazily evaluated. [heading Header] + #include + #include [heading Example] assert(__push_front__(__make_vector__(1,2,3),0) == __make_vector__(0,1,2,3)); @@ -1717,7 +1802,9 @@ Returns the result type of __filter__ given the sequence type and type to retain Constant. [heading Header] + #include + #include [endsect] @@ -1753,7 +1840,9 @@ Returns the result type of __filter_if__ given the sequence and unary __mpl_lamb Constant. [heading Header] + #include + #include [endsect] @@ -1808,7 +1897,9 @@ with elements created by applying `f(e)` to each element of `e` of `seq`. Constant. Returns a view which is lazily evaluated. [heading Header] + #include + #include [heading Example] struct triple @@ -1843,7 +1934,7 @@ Returns the result type of __replace__, given the types of the input sequence an [table Parameters [[Parameter][Requirement][Description]] [[`Sequence`][A model of __forward_sequence__][Operation's argument]] - [[`T`][Any type][The type of the search and replacement objects]] + [[`T`][Any type][The type of the search and replacement objects]] ] [heading Expression Semantics] @@ -1857,7 +1948,9 @@ Returns the result type of __replace__, given the types of the input sequence an Constant. [heading Header] + #include + #include [endsect] @@ -1894,7 +1987,9 @@ Returns the result type of __replace_if__, given the types of the sequence, __po Constant. [heading Header] + #include + #include [endsect] @@ -1930,7 +2025,9 @@ Returns the result type of __remove__, given the sequence and removal types. Constant. [heading Header] + #include + #include [endsect] @@ -1966,7 +2063,9 @@ Returns the result type of __remove_if__, given the input sequence and unary __m Constant. [heading Header] + #include + #include [endsect] @@ -2000,7 +2099,9 @@ Returns the result type of __reverse__, given the input sequence type. Constant. [heading Header] + #include + #include [endsect] @@ -2034,7 +2135,9 @@ Returns the result type of __clear__, given the input sequence type. Constant. [heading Header] + #include + #include [endsect] @@ -2077,7 +2180,9 @@ Returns the result type of __erase__, given the input sequence and range delimit Constant. [heading Header] + #include + #include [endsect] @@ -2113,7 +2218,9 @@ Returns the result type of __erase_key__, given the sequence and key types. Constant. [heading Header] + #include + #include [endsect] @@ -2151,7 +2258,9 @@ Returns the result type of __insert__, given the sequence, position iterator and Constant. [heading Header] + #include + #include [endsect] @@ -2189,7 +2298,9 @@ Returns the result type of __insert_range__, given the input sequence, position Constant. [heading Header] + #include + #include [endsect] @@ -2219,7 +2330,9 @@ Returns the result of joining 2 sequences, given the sequence types. Constant. [heading Header] + #include + #include [endsect] @@ -2251,7 +2364,9 @@ Zips sequences together to form a single sequence, whos members are tuples of th Constant. [heading Header] + #include + #include [endsect] @@ -2285,7 +2400,9 @@ Returns the result type of __pop_back__, given the input sequence type. Constant. [heading Header] + #include + #include [endsect] @@ -2318,8 +2435,7 @@ Returns the result type of __pop_front__, given the input sequence type. [heading Complexity] Constant. -[heading Header] - #include +/algorithm/transformation/pop_front.hpp> [endsect] @@ -2354,8 +2470,7 @@ Returns the result type of __push_back__, given the types of the input sequence [heading Complexity] Constant. -[heading Header] - #include +/algorithm/transformation/push_back.hpp> [endsect] @@ -2390,8 +2505,7 @@ Returns the result type of __push_front__, given the types of the input sequence [heading Complexity] Constant. -[heading Header] - #include +/algorithm/transformation/push_front.hpp> [endsect] diff --git a/doc/container.qbk b/doc/container.qbk new file mode 100644 index 00000000..32db47eb --- /dev/null +++ b/doc/container.qbk @@ -0,0 +1,1648 @@ +[section Container] + +Fusion provides a few predefined sequences out of the box. These +/containers/ actually hold heterogenously typed data; unlike +__views__. These containers are more or less counterparts of those in __stl__. + +[heading Header] + + #include + #include + +[section vector] + +[heading Description] + +`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` is the simplest of the Fusion +sequence container, and in many cases the most efficient. + +[heading Header] + + #include + #include + #include + #include + + // numbered forms + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + +[heading Synopsis] + +[*Numbered forms] + + template <> + struct vector0; + + template + struct vector1; + + template + struct vector2; + + template + struct vector3; + + ... + + template + struct vectorN; + +[*Variadic form] + + template < + typename T0 = __unspecified__ + , typename T1 = __unspecified__ + , typename T2 = __unspecified__ + ... + , typename TN = __unspecified__ + > + struct vector; + +The numbered form accepts the exact number of elements. Example: + + vector3 + +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 + +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 + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`T0`...`TN`] [Element types] [['unspecified]]] +] + +[heading Model of] + +* __random_access_sequence__ + +[variablelist Notation + [[`v`] [Instance of `vector`]] + [[`V`] [A `vector` type]] + [[`e0`...`en`] [Heterogeneous values]] + [[`s`] [A __forward_sequence__]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is not +defined in __random_access_sequence__. + +[table + [[Expression] [Semantics]] + [[`V()`] [Creates a vector with default constructed elements.]] + [[`V(e0, e1,... en)`] [Creates a vector with elements `e0`...`en`.]] + [[`V(s)`] [Copy constructs a vector from a __forward_sequence__, `s`.]] + [[`v = s`] [Assigns to a vector, `v`, from a __forward_sequence__, `s`.]] +] + +[heading Example] + + vector v(12, 5.5f); + std::cout << __at_c__<0>(v) << std::endl; + std::cout << __at_c__<1>(v) << std::endl; + +[endsect] + +[section cons] + +[heading 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 is constructed piecemeal (a data at a +time). The runtime cost of access to each element is peculiarly constant +(see __recursive_inline__). + +[heading Header] + + #include + #include + +[heading Synopsis] + + template + struct cons; + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`Car`] [Head type] []] + [[`Cdr`] [Tail type] [`nil`]] +] + +[heading Model of] + +* __forward_sequence__ + +[variablelist Notation + [[`nil`] [An empty `cons`]] + [[`C`] [A `cons` type]] + [[`l`, `l2`] [Instances of `cons`]] + [[`car`] [An arbitrary data]] + [[`cdr`] [Another `cons` list]] + [[`s`] [A __forward_sequence__]] + [[`N`] [An __mpl_integral_constant__]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is not +defined in __forward_sequence__. + +[table + [[Expression] [Semantics]] + [[`nil()`] [Creates an empty list.]] + [[`C()`] [Creates a cons with default constructed elements.]] + [[`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(s)`] [Copy constructs a cons from a __forward_sequence__, `s`.]] + [[`l = s`] [Assigns to a cons, `l`, from a __forward_sequence__, `s`.]] + [[`__at__(l)`] [The Nth element from the beginning of the sequence; see __at__.]] +] + +[blurb __note__ `__at__(l)` is provided for convenience and compatibility +with the original __tuple__ library, despite `cons` being a +__forward_sequence__ only (`at` is supposed to be a +__random_access_sequence__ requirement). The runtime complexity of __at__ is +constant (see __recursive_inline__).] + +[heading Example] + + cons > l(12, cons(5.5f)); + std::cout << __at_c__<0>(l) << std::endl; + std::cout << __at_c__<1>(l) << std::endl; + +[endsect] + +[section list] + +[heading Description] + +`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_inline__). + +[heading Header] + + #include + #include + #include + #include + +[heading Synopsis] + + template < + typename T0 = __unspecified__ + , typename T1 = __unspecified__ + , typename T2 = __unspecified__ + ... + , typename TN = __unspecified__ + > + 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`. Example: + + list + +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 + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`T0`...`TN`] [Element types] [['unspecified-type]]] +] + +[heading Model of] + +* __forward_sequence__ + +[variablelist Notation + [[`L`] [A `list` type]] + [[`l`] [An instance of `list`]] + [[`e0`...`en`] [Heterogeneous values]] + [[`s`] [A __forward_sequence__]] + [[`N`] [An __mpl_integral_constant__]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is not +defined in __forward_sequence__. + +[table + [[Expression] [Semantics]] + [[`L()`] [Creates a list with default constructed elements.]] + [[`L(e0, e1,... en)`] [Creates a list with elements `e0`...`en`.]] + [[`L(s)`] [Copy constructs a list from a __forward_sequence__, `s`.]] + [[`l = s`] [Assigns to a list, `l`, from a __forward_sequence__, `s`.]] + [[`__at__(l)`] [The Nth element from the beginning of the sequence; see __at__.]] +] + +[blurb __note__ `__at__(l)` is provided for convenience and compatibility +with the original __tuple__ library, despite `list` being a +__forward_sequence__ only (__at__ is supposed to be a +__random_access_sequence__ requirement). The runtime complexity of __at__ is +constant (see __recursive_inline__).] + +[heading Example] + + list l(12, 5.5f); + std::cout << __at_c__<0>(l) << std::endl; + std::cout << __at_c__<1>(l) << std::endl; + +[endsect] + +[section set] + +[heading Description] + +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_functions__). + +[heading Header] + + #include + #include + #include + #include + +[heading Synopsis] + + template < + typename T0 = __unspecified__ + , typename T1 = __unspecified__ + , typename T2 = __unspecified__ + ... + , typename TN = __unspecified__ + > + 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`. Example: + + set + +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 + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`T0`...`TN`] [Element types] [['unspecified-type]]] +] + +[heading Model of] + +* __associative_sequence__ +* __forward_sequence__ + +[variablelist Notation + [[`S`] [A `set` type]] + [[`s`] [An instance of `set`]] + [[`e0`...`en`] [Heterogeneous values]] + [[`fs`] [A __forward_sequence__]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is not +defined in __random_access_sequence__ and __associative_sequence__. + +[table + [[Expression] [Semantics]] + [[`S()`] [Creates a set with default constructed elements.]] + [[`S(e0, e1,... en)`] [Creates a set with elements `e0`...`en`.]] + [[`S(fs)`] [Copy constructs a set from a __forward_sequence__ `fs`.]] + [[`s = fs`] [Assigns to a set, `s`, from a __forward_sequence__ `fs`.]] +] + +[heading Example] + + typedef set S; + S s(12, 5.5f); + std::cout << __at_key__(s) << std::endl; + std::cout << __at_key__(s) << std::endl; + std::cout << __result_of_has_key__::value << std::endl; + +[endsect] + +[section map] + +[heading Description] + +map is an __associative_sequence__ of heteregenous typed data elements. +Each element is a key/data 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__). + +[heading Header] + + #include + #include + #include + #include + +[heading Synopsis] + + template < + typename T0 = __unspecified__ + , typename T1 = __unspecified__ + , typename T2 = __unspecified__ + ... + , typename TN = __unspecified__ + > + 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`. Example: + + map<__pair__, __pair__, __pair__ > + +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 + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`T0`...`TN`] [Element types] [['unspecified-type]]] +] + +[heading Model of] + +* __associative_sequence__ +* __forward_sequence__ + +[variablelist Notation + [[`M`] [A `map` type]] + [[`m`] [An instance of `map`]] + [[`e0`...`en`] [Heterogeneous key/value pairs (see __fusion_pair__)]] + [[`s`] [A __forward_sequence__]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is not +defined in __random_access_sequence__ and __associative_sequence__. + +[table + [[Expression] [Semantics]] + [[`M()`] [Creates a map with default constructed elements.]] + [[`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`] [Assigns to a map, `m`, from a __forward_sequence__ `s`.]] +] + +[heading Example] + + typedef map< + __pair__ + , __pair__ > + map_type; + + map_type m( + __fusion_make_pair__('X') + , __fusion_make_pair__("Men")); + + std::cout << __at_key__(m) << std::endl; + std::cout << __at_key__(m) << std::endl; + +[endsect] + +[section Generation] + +These are the functions that you can use to generate various forms of +__containers__ from elemental values. + +[heading Header] + + #include + #include + +[section Functions] + +[section make_list] + +[heading Description] + +Create a __list__ from one or more values. + +[heading Synopsis] + + template + typename __result_of_make_list__::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` +before including any Fusion header to change the default. Example: + + #define FUSION_MAX_LIST_SIZE 20 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `make_list`]] +] + +[heading Expression Semantics] + + make_list(x0, x1,... xN); + +[*Return type]: __result_of_make_list__`::type` + +[*Semantics]: Create a __list__ from `x0, x1,... xN`. + +[heading Header] + + #include + #include + +[heading Example] + + make_list(123, "hello", 12.5) + +[heading See also] + +__note_boost_ref__ + +[endsect] + +[section make_cons] + +[heading Description] + +Create a __cons__ from `car` (/head/) and optional `cdr` (/tail/). + +[heading Synopsis] + + template + typename __result_of_make_cons__::type + make_cons(Car const& car); + + template + typename __result_of_make_cons__::type + make_cons(Car const& car, Cdr const& cdr); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`car`] [Instance of `Car`] [The list's head]] + [[`cdr`] [Instance of `Cdr`] [The list's tail (optional)]] +] + +[heading Expression Semantics] + + make_cons(car, cdr); + +[*Return type]: __result_of_make_cons__`::type` or +__result_of_make_cons__`::type` + +[*Semantics]: Create a __cons__ from `car` (/head/) and optional `cdr` (/tail/). + +[heading Header] + + #include + #include + +[heading Example] + + make_cons('x', make_cons(123)) + +[heading See also] + +__note_boost_ref__ + +[endsect] + +[section make_vector] + +[heading Description] + +Create a __vector__ from one or more values. + +[heading Synopsis] + + template + typename __result_of_make_vector__::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` before including any Fusion header to change the +default. Example: + + #define FUSION_MAX_VECTOR_SIZE 20 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `make_vector`]] +] + +[heading Expression Semantics] + + make_vector(x0, x1,... xN); + +[*Return type]: __result_of_make_vector__`::type` + +[*Semantics]: Create a __vector__ from `x0, x1,... xN`. + +[heading Header] + + #include + #include + +[heading Example] + + make_vector(123, "hello", 12.5) + +[heading See also] + +__note_boost_ref__ + +[endsect] + +[section make_set] + +[heading Description] + +Create a __set__ from one or more values. + +[heading Synopsis] + + template + typename __result_of_make_set__::type + make_set(T0 const& x0, T1 const& x1... TN const& xN); + +The variadic function accepts `0` to `FUSION_MAX_VECTOR_SIZE`[footnote +`set` is implemented in terms of the vector. That is why we reuse +`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 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `make_set`]] +] + +[heading Expression Semantics] + + make_set(x0, x1,... xN); + +[*Return type]: __result_of_make_set__`::type` + +[*Semantics]: Create a __set__ from `x0, x1,... xN`. + +[*Precondition]: There may be no duplicate key types. + +[heading Header] + + #include + #include + +[heading Example] + + make_set(123, "hello", 12.5) + +[heading See also] + +__note_boost_ref__ + +[endsect] + +[section make_map] + +[heading Description] + +Create a __map__ from one or more key/data pairs. + +[heading Synopsis] + + template < + typename K0, typename K1,... typename KN + , typename T0, typename T1,... typename TN> + typename __result_of_make_map__::type + make_map(T0 const& x0, T1 const& x1... TN const& xN); + +The variadic function accepts `0` to `FUSION_MAX_VECTOR_SIZE`[footnote +`map` is implemented in terms of the vector. That is why we reuse +`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 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`K0, K1,... KN`] [The key types] [Keys associated with `x0, x1,... xN`]] + [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `make_map`]] +] + +[heading Expression Semantics] + + make_map(x0, x1,... xN); + +[*Return type]: __result_of_make_map__`::type` + +[*Semantics]: Create a __map__ from `K0, K1,... KN` keys and +`x0, x1,... xN` data. + +[*Precondition]: There may be no duplicate key types. + +[heading Header] + + #include + #include + +[heading Example] + + make_map( + __fusion_make_pair__('X') + , __fusion_make_pair__("Men")) + +[heading See also] + +__note_boost_ref__, __fusion_pair__ + +[endsect] + +[section 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); + +The __vector_tie__ function creates a __vector__ of type +`__vector__`. The same result could be achieved with the call +__make_vector__(__boost_ref_call__(i), __boost_ref_call__(c), __boost_ref_call__(a)) +[footnote see __boost_ref__ for details about `ref`]. + +A /tie/ can be used to 'unpack' another tuple into variables. E.g.: + + int i; char c; double d; + __vector_tie__(i, c, d) = __make_vector__(1,'a', 5.5); + std::cout << i << " " << c << " " << d; + +This code prints 1 a 5.5 to the standard output stream. A sequence +unpacking operation like this is found for example in ML and Python. It is +convenient when calling functions which return sequences. + +[heading Ignore] + +There is also an object called /ignore/ which allows you to ignore an +element assigned by a sequence. The idea is that a function may return a +sequence, only part of which you are interested in. For example: + + char c; + __vector_tie__(ignore, c) = __make_vector__(1, 'a'); + +[endsect] + +[section list_tie] + +[heading Description] + +Constructs a tie using a __list__ sequence. + +[heading Synopsis] + + template + __list__ + 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` +before including any Fusion header to change the default. Example: + + #define FUSION_MAX_LIST_SIZE 20 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `list_tie`]] +] + +[heading Expression Semantics] + + list_tie(x0, x1,... xN); + +[*Return type]: __list__ + +[*Semantics]: Create a __list__ of references from `x0, x1,... xN`. + +[heading Header] + + #include + #include + +[heading Example] + + int i = 123; + double d = 123.456; + list_tie(i, d) + +[endsect] + +[section vector_tie] + +[heading Description] + +Constructs a tie using a __vector__ sequence. + +[heading Synopsis] + + template + __vector__ + 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` before including any Fusion header to change the +default. Example: + + #define FUSION_MAX_VECTOR_SIZE 20 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `vector_tie`]] +] + +[heading Expression Semantics] + + vector_tie(x0, x1,... xN); + +[*Return type]: __vector__ + +[*Semantics]: Create a __vector__ of references from `x0, x1,... xN`. + +[heading Header] + + #include + #include + +[heading Example] + + int i = 123; + double d = 123.456; + vector_tie(i, d) + +[endsect] + +[section map_tie] + +[heading Description] + +Constructs a tie using a __map__ sequence. + +[heading Synopsis] + + template + __map__<__pair__, __pair__,... __pair__ > + 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` before +including any Fusion header to change the default. Example: + + #define FUSION_MAX_MAP_SIZE 20 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`K0, K1,... KN`] [Any type][The key types associated with each of the `x1,x2,...,xN` values]] + [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `map_tie`]] +] + +[heading Expression Semantics] + + map_tie(x0, x1,... xN); + +[*Return type]: __map__<__pair__, __pair__,... __pair__ > + +[*Semantics]: Create a __map__ of references from `x0, x1,... xN` with keys `K0, K1,... KN` + +[heading Header] + + #include + #include + +[heading Example] + + struct int_key; + struct double_key; + ... + int i = 123; + double d = 123.456; + map_tie(i, d) + +[endsect] + +[endsect] + +[section MetaFunctions] + +[section make_list] + +[heading Description] + +Returns the result type of __make_list__. + +[heading Synopsis] + + template + 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` +before including any Fusion header to change the default. Example: + + #define FUSION_MAX_LIST_SIZE 20 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`T0, T1,... TN`] [Any type] [Template arguments to `make_list`]] +] + +[heading Expression Semantics] + + result_of::make_list::type + +[*Return type]: A __list__ with elements of types converted following the +rules for __element_conversion__. + +[*Semantics]: Create a __list__ from `T0, T1,... TN`. + +[heading Header] + + #include + #include + +[heading Example] + + result_of::make_list::type + +[endsect] + +[section make_cons] + +[heading Description] + +Returns the result type of __make_cons__. + +[heading Synopsis] + + template + struct make_cons; + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`Car`] [Any type] [The list's head type]] + [[`Cdr`] [A `cons`] [The list's tail type (optional)]] +] + +[heading Expression Semantics] + + result_of::make_cons::type + +[*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` (/tail/). + +[heading Header] + + #include + #include + +[heading Example] + + result_of::make_cons::type>::type + +[endsect] + +[section make_vector] + +[heading Description] + +Returns the result type of __make_vector__. + +[heading Synopsis] + + template + 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` before including any Fusion header to change the +default. Example: + + #define FUSION_MAX_VECTOR_SIZE 20 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`T0, T1,... TN`] [Any type] [Template arguments to `make_vector`]] +] + +[heading Expression Semantics] + + result_of::make_vector::type + +[*Return type]: A __vector__ with elements of types converted following the +rules for __element_conversion__. + +[*Semantics]: Create a __vector__ from `T0, T1,... TN`. + +[heading Header] + + #include + #include + +[heading Example] + + result_of::make_vector::type + +[endsect] + +[section make_set] + +[heading Description] + +Returns the result type of __make_set__. + +[heading Synopsis] + + template + struct make_set; + +The variadic function accepts `0` to `FUSION_MAX_VECTOR_SIZE`[footnote +`set` is implemented in terms of the vector. That is why we reuse +`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 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`T0, T1,... TN`] [Any type] [The arguments to `make_set`]] +] + +[heading Expression Semantics] + + result_of::make_set::type + +[*Return type]: A __set__ with elements of types converted following the +rules for __element_conversion__. + +[*Semantics]: Create a __set__ from `T0, T1,... TN`. + +[*Precondition]: There may be no duplicate key types. + +[heading Header] + + #include + #include + +[heading Example] + + result_of::make_set::type + +[endsect] + +[section make_map] + +[heading Description] + +Returns the result type of __make_map__. + +[heading Synopsis] + + template < + typename K0, typename K1,... typename KN + , typename T0, typename T1,... typename TN> + struct make_map; + +The variadic function accepts `0` to `FUSION_MAX_VECTOR_SIZE`[footnote +`map` is implemented in terms of the vector. That is why we reuse +`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 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`K0, K1,... KN`] [Any type] [Keys associated with `T0, T1,... TN`]] + [[`T0, T1,... TN`] [Any type] [Data associated with keys `K0, K1,... KN`]] +] + +[heading Expression Semantics] + + resulf_of::make_map::type; + +[*Return type]: __result_of_make_map__`::type` + +[*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 key types. + +[heading Header] + + #include + #include + +[heading Example] + + result_of::make_map::type + +[heading See also] + +__fusion_pair__ + +[endsect] + +[section list_tie] + +[heading Description] + +Returns the result type of __list_tie__. + +[heading Synopsis] + + template + 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` +before including any Fusion header to change the default. Example: + + #define FUSION_MAX_LIST_SIZE 20 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`T0, T1,... TN`] [Any type] [The arguments to `list_tie`]] +] + +[heading Expression Semantics] + + result_of::list_tie::type; + +[*Return type]: __list__ + +[*Semantics]: Create a __list__ of references from `T0, T1,... TN`. + +[heading Header] + + #include + #include + +[heading Example] + + result_of::list_tie::type + +[endsect] + +[section vector_tie] + +[heading Description] + +Returns the result type of __vector_tie__. + +[heading Synopsis] + + template + 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` before including any Fusion header to change the +default. Example: + + #define FUSION_MAX_VECTOR_SIZE 20 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`T0, T1,... TN`] [Any type] [The arguments to `vector_tie`]] +] + +[heading Expression Semantics] + + result_of::vector_tie::type; + +[*Return type]: __vector__ + +[*Semantics]: Create a __vector__ of references from `T0, T1,... TN`. + +[heading Header] + + #include + #include + +[heading Example] + + result_of::vector_tie::type + +[endsect] + +[section map_tie] + +[heading Description] + +Returns the result type of __map_tie__. + +[heading Synopsis] + + template + 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 including any Fusion header to change the +default. Example: + + #define FUSION_MAX_MAP_SIZE 20 + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`K0, K1,... KN`] [Any type] [The key types for `map_tie`]] + [[`D0, D1,... DN`] [Any type] [The arguments types for `map_tie`]] +] + +[heading Expression Semantics] + + result_of::map_tie::type; + +[*Return type]: __map__<__pair__, __pair__,... __pair__ > + +[*Semantics]: Create a __map__ of references from `D0, D1,... DN` with keys `K0, K1,... KN` + +[heading Header] + + #include + #include + +[heading Example] + + struct int_key; + struct double_key; + ... + result_of::map_tie::type + +[endsect] + +[endsect] + +[endsect] + +[section Conversion] + +All fusion sequences can be converted to one of the __containers__ types +using one of these conversion functions. + +[heading Header] + + #include + +[section Functions] + +[section as_list] + +[heading Description] + +Convert a fusion sequence to a __list__. + +[heading Synopsis] + + template + typename result_of::as_list::type + as_list(Sequence& seq); + + template + typename result_of::as_list::type + as_list(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [An instance of Sequence] [The sequence to convert.]] +] + +[heading Expression Semantics] + + as_list(seq); + +[*Return type]: __result_of_as_list__`::type` + +[*Semantics]: Convert a fusion sequence, `seq`, to a __list__. + +[heading Header] + + #include + #include + +[heading Example] + + as_list(__make_vector__('x', 123, "hello")) + +[endsect] + +[section as_vector] + +[heading Description] + +Convert a fusion sequence to a __vector__. + +[heading Synopsis] + + template + typename result_of::as_vector::type + as_vector(Sequence& seq); + + template + typename result_of::as_vector::type + as_vector(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [An instance of Sequence] [The sequence to convert.]] +] + +[heading Expression Semantics] + + as_vector(seq); + +[*Return type]: __result_of_as_vector__`::type` + +[*Semantics]: Convert a fusion sequence, `seq`, to a __vector__. + +[heading Header] + + #include + #include + +[heading Example] + + as_vector(__make_list__('x', 123, "hello")) + +[endsect] + +[section as_set] + +[heading Description] + +Convert a fusion sequence to a __set__. + +[heading Synopsis] + + template + typename result_of::as_set::type + as_set(Sequence& seq); + + template + typename result_of::as_set::type + as_set(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [An instance of Sequence] [The sequence to convert.]] +] + +[heading Expression Semantics] + + as_set(seq); + +[*Return type]: __result_of_as_set__`::type` + +[*Semantics]: Convert a fusion sequence, `seq`, to a __set__. + +[*Precondition]: There may be no duplicate key types. + +[heading Header] + + #include + #include + +[heading Example] + + as_set(__make_vector__('x', 123, "hello")) + +[endsect] + +[section as_map] + +[heading Description] + +Convert a fusion sequence to a __map__. + +[heading Synopsis] + + template + typename result_of::as_map::type + as_map(Sequence& seq); + + template + typename result_of::as_map::type + as_map(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [An instance of Sequence] [The sequence to convert.]] +] + +[heading Expression Semantics] + + as_map(seq); + +[*Return type]: __result_of_as_map__`::type` + +[*Semantics]: Convert a fusion sequence, `seq`, to a __map__. + +[*Precondition]: The elements of the sequence are assumed to be +__fusion_pair__s. There may be no duplicate __fusion_pair__ key types. + +[heading Header] + + #include + #include + +[heading Example] + + as_map(__make_vector__( + __fusion_make_pair__('X') + , __fusion_make_pair__("Men"))) + +[endsect] + +[endsect] + +[section Metafunctions] + +[section as_list] + +[heading Description] + +Returns the result type of __as_list__. + +[heading Synopsis] + + template + struct as_list; + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`Sequence`] [A fusion __sequence__] [The sequence type to convert.]] +] + +[heading Expression Semantics] + + result_of::as_list::type; + +[*Return type]: A __list__ with same elements as the input sequence, +`Sequence`. + +[*Semantics]: Convert a fusion sequence, `Sequence`, to a __list__. + +[heading Header] + + #include + #include + +[heading Example] + + result_of::as_list<__vector__ >::type + +[endsect] + +[section as_vector] + +[heading Description] + +Returns the result type of __as_vector__. + +[heading Synopsis] + + template + struct as_vector; + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`Sequence`] [A fusion __sequence__] [The sequence to convert.]] +] + +[heading Expression Semantics] + + result_of::as_vector::type; + +[*Return type]: A __vector__ with same elements as the input sequence, +`Sequence`. + +[*Semantics]: Convert a fusion sequence, `Sequence`, to a __vector__. + +[heading Header] + + #include + #include + +[heading Example] + + result_of::as_vector<__list__ >::type + +[endsect] + +[section as_set] + +[heading Description] + +Returns the result type of __as_set__. + +[heading Synopsis] + + template + struct as_set; + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`Sequence`] [A fusion __sequence__] [The sequence to convert.]] +] + +[heading Expression Semantics] + + result_of::as_set::type; + +[*Return type]: A __set__ with same elements as the input sequence, +`Sequence`. + +[*Semantics]: Convert a fusion sequence, `Sequence`, to a __set__. + +[*Precondition]: There may be no duplicate key types. + +[heading Header] + + #include + #include + +[heading Example] + + result_of::as_set<__vector__ >::type + +[endsect] + +[section as_map] + +[heading Description] + +Returns the result type of __as_map__. + +[heading Synopsis] + + template + struct as_map; + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`Sequence`] [A fusion __sequence__] [The sequence to convert.]] +] + +[heading Expression Semantics] + + result_of::as_map::type; + +[*Return type]: A __map__ with same elements as the input sequence, +`Sequence`. + +[*Semantics]: Convert a fusion sequence, `Sequence`, to a __map__. + +[*Precondition]: The elements of the sequence are assumed to be +__fusion_pair__s. There may be no duplicate __fusion_pair__ key types. + +[heading Header] + + #include + #include + +[heading Example] + + result_of::as_map<__vector__< + __fusion_pair__ + , __fusion_pair__ > >::type + +[endsect] + +[endsect] + +[endsect] + +[endsect] diff --git a/doc/extension.qbk b/doc/extension.qbk index 47f402f6..8aafcb75 100644 --- a/doc/extension.qbk +++ b/doc/extension.qbk @@ -1,9 +1,9 @@ [section Extension] -[section The Full Extension Mechanism] +[section:ext_full The Full Extension Mechanism] 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__ +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: @@ -30,7 +30,7 @@ are going to use the type: {} }; } - + 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__ @@ -52,8 +52,9 @@ tag type for operations involving our sequence. This is done by specializing `traits::tag_of` for our sequence type. #include + #include - namespace boost { namespace fusion { namespace traits { + namespace boost { namespace fusion { namespace traits { template<> struct tag_of { @@ -61,12 +62,13 @@ tag type for operations involving our sequence. This is done by specializing }; }}} -`traits::tag_of` also has a second template argument, -that can be used in conjuction with `boost::enable_if` to provide tag +`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 + #include + #include [heading Designing a suitable iterator] @@ -98,7 +100,7 @@ A quick summary of the details of our iterator: # The iterator is parameterized by the type it is iterating over, and the index of the current element. # The typedefs `struct_type` and `index` provide convenient access to information we will need later in the implementation. -# The typedef `category` allows the `traits::__category_of__` metafunction to establish +# The typedef `category` allows the `traits::__category_of__` metafunction to establish the traversal category of the iterator. # The constructor stores a reference to the `example_struct` being iterated over. @@ -111,7 +113,7 @@ add features to our implementation. [heading 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` template for +do this, we provide a specialization of the `boost::fusion::extension::value_of_impl` template for our iterator's tag type. template<> @@ -186,7 +188,7 @@ specialization of `deref_impl`. } 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. +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 @@ -211,7 +213,7 @@ 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`. +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 @@ -259,7 +261,7 @@ __random_access_iterator__ `distance_impl` and `advance_impl` also need to be pr in order to satisfy the necessary complexity guarantees. As 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` are +Full implementations of `prior_impl`, `advance_impl`, `distance_impl` and `equal_to_impl` are provided in the example code. [heading Implementing the intrinsic functions of the sequence] @@ -277,7 +279,7 @@ an `impl` type specialized for our sequence tag: 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 +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 @@ -302,7 +304,7 @@ our sequence. 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 +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`, @@ -310,10 +312,10 @@ For our __random_access_sequence__ we will also need to implement `size_impl`, [heading Enabling our type as an associative container] -In order for `example_struct` to serve as an associative container, +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` trait -so that our sequence can be correctly identified as an associative container. +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`. @@ -377,24 +379,24 @@ for a variety of types. [endsect] -[section Sequence Fascade] +[section Sequence Facade] [heading Description] -The __sequence_fascade__ template provides an intrusive mechanism for +The __sequence_facade__ template provides an intrusive mechanism for producing a conforming Fusion iterator. [heading Synopsis] template - struct sequence_fascade; + struct sequence_facade; [heading Usage] -The user of __sequence_fascade__ derives his sequence type from a specialization of __sequence_fascade__ 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_` if the sequence is a view. +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_` if the sequence is a view. The user must the implement the key expressions required by their sequence type. [table Parameters [[Name][Description]] -[[`sequence`, `Seq`][A type derived from __sequence_fascade__]] +[[`sequence`, `Seq`][A type derived from __sequence_facade__]] [[`N`][An __mpl_integral_constant__]] ] @@ -411,21 +413,20 @@ The user must the implement the key expressions required by their sequence type. [[`sequence::template value_at::type`][The type of the `N`th element in a sequence of type `Seq`]] ] -[heading Header] - #include +/sequence/sequence_facade.hpp> [endsect] -[section Iterator Fascade] +[section Iterator Facade] [heading Description] -The __iterator_fascade__ template provides an intrusive mechanism for +The __iterator_facade__ template provides an intrusive mechanism for producing a conforming Fusion iterator. [heading Synopsis] template - struct iterator_fascade; + struct iterator_facade; [heading 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 parameter. The second template parameter should be the traversal category of the iterator being implemented. @@ -434,7 +435,7 @@ The user must the implement the key expressions required by their iterator type. [table Parameters [[Name][Description]] -[[`iterator`, `It`, `It1`, `It2`][A type derived from __iterator_fascade__]] +[[`iterator`, `It`, `It1`, `It2`][A type derived from __iterator_facade__]] [[`N`][An __mpl_integral_constant__]] ] @@ -458,12 +459,13 @@ The user must the implement the key expressions required by their iterator type. [heading Header] #include + #include [endsect] [section Macros] -[section BOOST_FUSION_ADAPT_STRUCT] +[section:adapt_struct BOOST_FUSION_ADAPT_STRUCT] [heading Description] BOOST_FUSION_ADAPT_STRUCT is a macro that can be used to generate all the @@ -493,8 +495,7 @@ part of the sequence. The macro should be used at global scope, and `struct_name` should be the fully namespace qualified name of the struct to be converted. -[heading Header] - #include +/adapted/struct/adapt_struct.hpp> [heading Example] namespace demo @@ -514,7 +515,7 @@ namespace qualified name of the struct to be converted. [endsect] -[section BOOST_FUSION_ADAPT_ASSOC_STRUCT] +[section:adapt_assoc BOOST_FUSION_ADAPT_ASSOC_STRUCT] [heading Description] BOOST_FUSION_ADAPT_ASSOC_STRUCT is a macro that can be used to generate all the @@ -538,16 +539,15 @@ and __associative_sequence__. ) The above macro generates the necessary code to adapt `struct_name` -as a model of __random_access_sequence__ and __associative_sequence__. +as a model of __random_access_sequence__ and __associative_sequence__. The sequence of `(member_typeN, member_nameN, key_typeN)` -triples declare the type, name and key type of each of the struct members +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` should be the fully namespace qualified name of the struct to be converted. -[heading Header] - #include +/adapted/struct/adapt_assoc_struct.hpp> [heading Example] namespace demo diff --git a/doc/functional.qbk b/doc/functional.qbk index afacde35..805cbb79 100644 --- a/doc/functional.qbk +++ b/doc/functional.qbk @@ -3,8 +3,7 @@ Components to call functions and function objects and to make Fusion code callable through a function object interface. -[heading Header] - #include +/functional.hpp> [heading Fused and unfused forms] @@ -283,8 +282,7 @@ arguments. [*Semantics]: Invokes `f` with the elements in `s` as arguments and returns the result of the call expression. -[heading Header] - #include +/functional/invocation/invoke.hpp> [heading Example] __std_plus_doc__ add; @@ -347,8 +345,7 @@ implemented). [*Semantics]: Invokes `f` with the elements in `s` as arguments. -[heading Header] - #include +/functional/invocation/invoke_procedure.hpp> [heading Example] __vector__ v(1,2); @@ -405,8 +402,7 @@ arguments. [*Semantics]: Invokes `f` with the elements in `s` as arguments and returns the result of the call expression. -[heading Header] - #include +/functional/invocation/invoke_function_object.hpp> [heading Example] struct sub @@ -548,8 +544,7 @@ 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_call__). -[heading Header] - #include +/functional/adapter/fused.hpp> [heading Synopsis] template @@ -625,8 +620,7 @@ The target function must not be a pointer to a member object (dereferencing such a pointer without returning anything does not make sense, so this case is not implemented). -[heading Header] - #include +/functional/adapter/fused_procedure.hpp> [heading Synopsis] template @@ -699,8 +693,7 @@ reference. Const qualification is preserved and propagated appropriately target function object that is const or, if the target function object is held by value, the adapter is const). -[heading Header] - #include +/functional/adapter/fused_function_object.hpp> [heading Synopsis] template @@ -799,8 +792,7 @@ reference. Const qualification is preserved and propagated appropriately the target function object is const - or, in case the target function object is held by value, the adapter is const). -[heading Header] - #include +/functional/adapter/unfused_generic.hpp> [heading Synopsis] template @@ -907,8 +899,7 @@ reference. Const qualification is preserved and propagated appropriately the target function object is const - or, in case the target function object is held by value, the adapter is const). -[heading Header] - #include +/functional/adapter/unfused_lvalue_args.hpp> [heading Synopsis] template @@ -989,8 +980,7 @@ reference. Const qualification is preserved and propagated appropriately the target function object is const - or, in case the target function object is held by value, the adapter is const). -[heading Header] - #include +/functional/adapter/unfused_rvalue_args.hpp> [heading Synopsis] template @@ -1081,8 +1071,7 @@ Therefore the adapter is always treated as if it was const. ] non-reference elements, the element is copied only once - the call operator's signature is optimized automatically to avoid by-value parameters.] -[heading Header] - #include +/functional/adapter/unfused_typed.hpp> [heading Synopsis] template @@ -1231,6 +1220,7 @@ __element_conversion__ is applied to the target function. [heading Header] #include + #include [heading Example] float sub(float a, float b) { return a - b; } @@ -1279,6 +1269,7 @@ The usual __element_conversion__ applied to the target function. [heading Header] #include + #include [heading Example] __vector__ v(1,2,3); @@ -1321,6 +1312,7 @@ The usual __element_conversion__ is applied to the target function. [heading Header] #include + #include [heading Example] struct sub @@ -1382,6 +1374,7 @@ The usual __element_conversion__ is applied to the target function. [heading Header] #include + #include [heading Example] struct bottles_song @@ -1450,6 +1443,7 @@ The usual __element_conversion__ is applied to the target function. [heading Header] #include + #include [heading Example] struct fused_incrementer @@ -1509,6 +1503,7 @@ The usual __element_conversion__ is applied to the target function. [heading Header] #include + #include [heading Example] struct sequence_printer @@ -1551,6 +1546,7 @@ Returns the result type of __make_fused__. [heading Header] #include + #include [heading Synopsis] namespace result_of @@ -1575,6 +1571,7 @@ Returns the result type of __make_fused_procedure__. [heading Header] #include + #include [heading Synopsis] namespace result_of @@ -1599,6 +1596,7 @@ Returns the result type of __make_fused_function_object__. [heading Header] #include + #include [heading Synopsis] namespace result_of @@ -1623,6 +1621,7 @@ Returns the result type of __make_unfused_generic__. [heading Header] #include + #include [heading Synopsis] namespace result_of @@ -1647,6 +1646,7 @@ Returns the result type of __make_unfused_lvalue_args__. [heading Header] #include + #include [heading Synopsis] namespace result_of @@ -1671,6 +1671,7 @@ Returns the result type of __make_unfused_rvalue_args__. [heading Header] #include + #include [heading Synopsis] namespace result_of diff --git a/doc/fusion.qbk b/doc/fusion.qbk index 43c7234b..8425149b 100644 --- a/doc/fusion.qbk +++ b/doc/fusion.qbk @@ -65,189 +65,189 @@ [def __pair__ [link fusion.support.pair `pair`]] [def __fusion_make_pair__ [link fusion.support.pair `make_pair`]] -[def __iterator__ [link fusion.iterators Iterator]] -[def __iterator_concepts__ [link fusion.iterators.concepts Iterator Concepts]] -[def __forward_iterator__ [link fusion.iterators.concepts.forward_iterator Forward Iterator]] -[def __bidirectional_iterator__ [link fusion.iterators.concepts.bidirectional_iterator Bidirectional Iterator]] -[def __random_access_iterator__ [link fusion.iterators.concepts.random_access_iterator Random Access Iterator]] +[def __iterator__ [link fusion.iterator Iterator]] +[def __iterator_concepts__ [link fusion.iterator.concepts Iterator Concepts]] +[def __forward_iterator__ [link fusion.iterator.concepts.forward_iterator Forward Iterator]] +[def __bidirectional_iterator__ [link fusion.iterator.concepts.bidirectional_iterator Bidirectional Iterator]] +[def __random_access_iterator__ [link fusion.iterator.concepts.random_access_iterator Random Access Iterator]] -[def __next__ [link fusion.iterators.functions.next `next`]] -[def __prior__ [link fusion.iterators.functions.prior `prior`]] -[def __advance__ [link fusion.iterators.functions.advance `advance`]] -[def __advance_c__ [link fusion.iterators.functions.advance_c `advance_c`]] -[def __distance__ [link fusion.iterators.functions.distance `distance`]] -[def __deref__ [link fusion.iterators.functions.deref `deref`]] +[def __next__ [link fusion.iterator.functions.next `next`]] +[def __prior__ [link fusion.iterator.functions.prior `prior`]] +[def __advance__ [link fusion.iterator.functions.advance `advance`]] +[def __advance_c__ [link fusion.iterator.functions.advance_c `advance_c`]] +[def __distance__ [link fusion.iterator.functions.distance `distance`]] +[def __deref__ [link fusion.iterator.functions.deref `deref`]] -[def __result_of_next__ [link fusion.iterators.metafunctions.next `result_of::next`]] -[def __result_of_prior__ [link fusion.iterators.metafunctions.prior `result_of::prior`]] -[def __result_of_equal_to__ [link fusion.iterators.metafunctions.equal_to `result_of::equal_to`]] -[def __result_of_advance__ [link fusion.iterators.metafunctions.advance `result_of::advance`]] -[def __result_of_advance_c__ [link fusion.iterators.metafunctions.advance_c `result_of::advance_c`]] -[def __result_of_distance__ [link fusion.iterators.metafunctions.distance `result_of::distance`]] -[def __result_of_deref__ [link fusion.iterators.metafunctions.deref `result_of::deref`]] -[def __result_of_value_of__ [link fusion.iterators.metafunctions.value_of `result_of::value_of`]] -[def __value_of__ [link fusion.iterators.metafunctions.value_of `value_of`]] +[def __result_of_next__ [link fusion.iterator.metafunctions.next `result_of::next`]] +[def __result_of_prior__ [link fusion.iterator.metafunctions.prior `result_of::prior`]] +[def __result_of_equal_to__ [link fusion.iterator.metafunctions.equal_to `result_of::equal_to`]] +[def __result_of_advance__ [link fusion.iterator.metafunctions.advance `result_of::advance`]] +[def __result_of_advance_c__ [link fusion.iterator.metafunctions.advance_c `result_of::advance_c`]] +[def __result_of_distance__ [link fusion.iterator.metafunctions.distance `result_of::distance`]] +[def __result_of_deref__ [link fusion.iterator.metafunctions.deref `result_of::deref`]] +[def __result_of_value_of__ [link fusion.iterator.metafunctions.value_of `result_of::value_of`]] +[def __value_of__ [link fusion.iterator.metafunctions.value_of `value_of`]] -[def __sequence__ [link fusion.sequences Sequence]] -[def __sequence_concepts__ [link fusion.sequences.concepts Sequence Concepts]] -[def __traversal_concept__ [link fusion.sequences.concepts.traversal Sequence Traversal Concept]] -[def __associativity_concept__ [link fusion.sequences.concepts.associativity Sequence Associativity Concept]] -[def __forward_sequence__ [link fusion.sequences.concepts.forward_sequence Forward Sequence]] -[def __bidirectional_sequence__ [link fusion.sequences.concepts.bidirectional_sequence Bidirectional Sequence]] -[def __random_access_sequence__ [link fusion.sequences.concepts.random_access_sequence Random Access Sequence]] -[def __associative_sequence__ [link fusion.sequences.concepts.associative_sequence Associative Sequence]] +[def __sequence__ [link fusion.sequence Sequence]] +[def __sequence_concepts__ [link fusion.sequence.concepts Sequence Concepts]] +[def __traversal_concept__ [link fusion.sequence.concepts.traversal Sequence Traversal Concept]] +[def __associativity_concept__ [link fusion.sequence.concepts.associativity Sequence Associativity Concept]] +[def __forward_sequence__ [link fusion.sequence.concepts.forward_sequence Forward Sequence]] +[def __bidirectional_sequence__ [link fusion.sequence.concepts.bidirectional_sequence Bidirectional Sequence]] +[def __random_access_sequence__ [link fusion.sequence.concepts.random_access_sequence Random Access Sequence]] +[def __associative_sequence__ [link fusion.sequence.concepts.associative_sequence Associative Sequence]] -[def __containers__ [link fusion.sequences.containers Containers]] -[def __vector__ [link fusion.sequences.containers.vector `vector`]] -[def __cons__ [link fusion.sequences.containers.cons `cons`]] -[def __list__ [link fusion.sequences.containers.list `list`]] -[def __set__ [link fusion.sequences.containers.set `set`]] -[def __map__ [link fusion.sequences.containers.map `map`]] +[def __containers__ [link fusion.container Container]] +[def __vector__ [link fusion.container.vector `vector`]] +[def __cons__ [link fusion.container.cons `cons`]] +[def __list__ [link fusion.container.list `list`]] +[def __set__ [link fusion.container.set `set`]] +[def __map__ [link fusion.container.map `map`]] -[def __view__ [link fusion.sequences.views View]] -[def __views__ [link fusion.sequences.views Views]] -[def __single_view__ [link fusion.sequences.views.single_view `single_view`]] -[def __filter_view__ [link fusion.sequences.views.filter_view `filter_view`]] -[def __iterator_range__ [link fusion.sequences.views.iterator_range `iterator_range`]] -[def __joint_view__ [link fusion.sequences.views.joint_view `joint_view`]] -[def __transform_view__ [link fusion.sequences.views.transform_view `transform_view`]] -[def __reverse_view__ [link fusion.sequences.views.reverse_view `reverse_view`]] -[def __zip_view__ [link fusion.sequences.views.zip_view `zip_view`]] +[def __view__ [link fusion.view View]] +[def __views__ [link fusion.view Views]] +[def __single_view__ [link fusion.view.single_view `single_view`]] +[def __filter_view__ [link fusion.view.filter_view `filter_view`]] +[def __iterator_range__ [link fusion.view.iterator_range `iterator_range`]] +[def __joint_view__ [link fusion.view.joint_view `joint_view`]] +[def __transform_view__ [link fusion.view.transform_view `transform_view`]] +[def __reverse_view__ [link fusion.view.reverse_view `reverse_view`]] +[def __zip_view__ [link fusion.view.zip_view `zip_view`]] -[def __std_pair__ [link fusion.sequences.adapted.std__pair `std::pair`]] -[def __boost_array__ [link fusion.sequences.adapted.boost__array `boost::array`]] -[def __mpl_sequence__ [link fusion.sequences.adapted.mpl_sequence mpl sequence]] +[def __std_pair__ [link fusion.adapted.std__pair `std::pair`]] +[def __boost_array__ [link fusion.adapted.boost__array `boost::array`]] +[def __mpl_sequence__ [link fusion.adapted.mpl_sequence mpl sequence]] -[def __intrinsic__ [link fusion.sequences.intrinsics Intrinsic]] -[def __intrinsics__ [link fusion.sequences.intrinsics Intrinsics]] -[def __begin__ [link fusion.sequences.intrinsics.functions.begin `begin`]] -[def __result_of_begin__ [link fusion.sequences.intrinsics.metafunctions.begin `result_of::begin`]] -[def __end__ [link fusion.sequences.intrinsics.functions.end `end`]] -[def __result_of_end__ [link fusion.sequences.intrinsics.metafunctions.end `result_of::end`]] -[def __size__ [link fusion.sequences.intrinsics.functions.size `size`]] -[def __result_of_size__ [link fusion.sequences.intrinsics.metafunctions.size `result_of::size`]] -[def __empty__ [link fusion.sequences.intrinsics.functions.empty `empty`]] -[def __result_of_empty__ [link fusion.sequences.intrinsics.metafunctions.empty `result_of::empty`]] -[def __front__ [link fusion.sequences.intrinsics.functions.front `front`]] -[def __result_of_front__ [link fusion.sequences.intrinsics.metafunctions.front `result_of::front`]] -[def __back__ [link fusion.sequences.intrinsics.functions.back `back`]] -[def __result_of_back__ [link fusion.sequences.intrinsics.metafunctions.back `result_of::back`]] -[def __at__ [link fusion.sequences.intrinsics.functions.at `at`]] -[def __result_of_at__ [link fusion.sequences.intrinsics.metafunctions.at `result_of::at`]] -[def __at_c__ [link fusion.sequences.intrinsics.functions.at_c `at_c`]] -[def __result_of_at_c__ [link fusion.sequences.intrinsics.metafunctions.at_c `result_of::at_c`]] -[def __at_key__ [link fusion.sequences.intrinsics.functions.at_key `at_key`]] -[def __result_of_at_key__ [link fusion.sequences.intrinsics.metafunctions.at_key `result_of::at_key`]] -[def __has_key__ [link fusion.sequences.intrinsics.functions.has_key `has_key`]] -[def __result_of_has_key__ [link fusion.sequences.intrinsics.metafunctions.has_key `result_of::has_key`]] -[def __value_at_key__ [link fusion.sequences.intrinsics.metafunctions.value_at_key `value_at_key`]] -[def __result_of_value_at__ [link fusion.sequences.intrinsics.metafunctions.value_at `result_of::value_at`]] -[def __result_of_value_at_c__ [link fusion.sequences.intrinsics.metafunctions.value_at_c `result_of::value_at_c`]] -[def __result_of_value_at_key__ [link fusion.sequences.intrinsics.metafunctions.value_at_key `result_of::value_at_key`]] +[def __intrinsic__ [link fusion.sequence.intrinsic Intrinsic]] +[def __intrinsics__ [link fusion.sequence.intrinsic Intrinsics]] +[def __begin__ [link fusion.sequence.intrinsic.functions.begin `begin`]] +[def __result_of_begin__ [link fusion.sequence.intrinsic.metafunctions.begin `result_of::begin`]] +[def __end__ [link fusion.sequence.intrinsic.functions.end `end`]] +[def __result_of_end__ [link fusion.sequence.intrinsic.metafunctions.end `result_of::end`]] +[def __size__ [link fusion.sequence.intrinsic.functions.size `size`]] +[def __result_of_size__ [link fusion.sequence.intrinsic.metafunctions.size `result_of::size`]] +[def __empty__ [link fusion.sequence.intrinsic.functions.empty `empty`]] +[def __result_of_empty__ [link fusion.sequence.intrinsic.metafunctions.empty `result_of::empty`]] +[def __front__ [link fusion.sequence.intrinsic.functions.front `front`]] +[def __result_of_front__ [link fusion.sequence.intrinsic.metafunctions.front `result_of::front`]] +[def __back__ [link fusion.sequence.intrinsic.functions.back `back`]] +[def __result_of_back__ [link fusion.sequence.intrinsic.metafunctions.back `result_of::back`]] +[def __at__ [link fusion.sequence.intrinsic.functions.at `at`]] +[def __result_of_at__ [link fusion.sequence.intrinsic.metafunctions.at `result_of::at`]] +[def __at_c__ [link fusion.sequence.intrinsic.functions.at_c `at_c`]] +[def __result_of_at_c__ [link fusion.sequence.intrinsic.metafunctions.at_c `result_of::at_c`]] +[def __at_key__ [link fusion.sequence.intrinsic.functions.at_key `at_key`]] +[def __result_of_at_key__ [link fusion.sequence.intrinsic.metafunctions.at_key `result_of::at_key`]] +[def __has_key__ [link fusion.sequence.intrinsic.functions.has_key `has_key`]] +[def __result_of_has_key__ [link fusion.sequence.intrinsic.metafunctions.has_key `result_of::has_key`]] +[def __value_at_key__ [link fusion.sequence.intrinsic.metafunctions.value_at_key `value_at_key`]] +[def __result_of_value_at__ [link fusion.sequence.intrinsic.metafunctions.value_at `result_of::value_at`]] +[def __result_of_value_at_c__ [link fusion.sequence.intrinsic.metafunctions.value_at_c `result_of::value_at_c`]] +[def __result_of_value_at_key__ [link fusion.sequence.intrinsic.metafunctions.value_at_key `result_of::value_at_key`]] -[def __conversion__ [link fusion.sequences.conversion.functions Conversion]] -[def __result_of_conversion__ [link fusion.sequences.conversion.metafunctions Conversion Metafunctions]] -[def __as_vector__ [link fusion.sequences.conversion.functions.as_vector `as_vector`]] -[def __result_of_as_vector__ [link fusion.sequences.conversion.metafunctions.as_vector `result_of::as_vector`]] -[def __as_list__ [link fusion.sequences.conversion.functions.as_list `as_list`]] -[def __result_of_as_list__ [link fusion.sequences.conversion.metafunctions.as_list `result_of::as_list`]] -[def __as_set__ [link fusion.sequences.conversion.functions.as_set `as_set`]] -[def __result_of_as_set__ [link fusion.sequences.conversion.metafunctions.as_set `result_of::as_set`]] -[def __as_map__ [link fusion.sequences.conversion.functions.as_map `as_map`]] -[def __result_of_as_map__ [link fusion.sequences.conversion.metafunctions.as_map `result_of::as_map`]] +[def __conversion__ [link fusion.container.conversion.functions Conversion]] +[def __result_of_conversion__ [link fusion.container.conversion.metafunctions Conversion Metafunctions]] +[def __as_vector__ [link fusion.container.conversion.functions.as_vector `as_vector`]] +[def __result_of_as_vector__ [link fusion.container.conversion.metafunctions.as_vector `result_of::as_vector`]] +[def __as_list__ [link fusion.container.conversion.functions.as_list `as_list`]] +[def __result_of_as_list__ [link fusion.container.conversion.metafunctions.as_list `result_of::as_list`]] +[def __as_set__ [link fusion.container.conversion.functions.as_set `as_set`]] +[def __result_of_as_set__ [link fusion.container.conversion.metafunctions.as_set `result_of::as_set`]] +[def __as_map__ [link fusion.container.conversion.functions.as_map `as_map`]] +[def __result_of_as_map__ [link fusion.container.conversion.metafunctions.as_map `result_of::as_map`]] -[def __generation__ [link fusion.sequences.generation.functions Generation]] -[def __result_of_generation__ [link fusion.sequences.generation.metafunctions Generation Metafunctions]] -[def __make_vector__ [link fusion.sequences.generation.functions.make_vector `make_vector`]] -[def __result_of_make_vector__ [link fusion.sequences.generation.metafunctions.make_vector `result_of::make_vector`]] -[def __vector_tie__ [link fusion.sequences.generation.functions.vector_tie `vector_tie`]] -[def __map_tie__ [link fusion.sequences.generation.functions.vector_tie `map_tie`]] -[def __result_of_vector_tie__ [link fusion.sequences.generation.metafunctions.vector_tie `result_of::vector_tie`]] -[def __make_vector__ [link fusion.sequences.generation.functions.make_vector `make_vector`]] -[def __result_of_make_vector__ [link fusion.sequences.generation.metafunctions.make_vector `result_of::make_vector`]] -[def __make_cons__ [link fusion.sequences.generation.functions.make_cons `make_cons`]] -[def __result_of_make_cons__ [link fusion.sequences.generation.metafunctions.make_cons `result_of::make_cons`]] -[def __make_list__ [link fusion.sequences.generation.functions.make_list `make_list`]] -[def __result_of_make_list__ [link fusion.sequences.generation.metafunctions.make_list `result_of::make_list`]] -[def __make_set__ [link fusion.sequences.generation.functions.make_set `make_set`]] -[def __result_of_make_set__ [link fusion.sequences.generation.metafunctions.make_set `result_of::make_set`]] -[def __make_map__ [link fusion.sequences.generation.functions.make_map `make_map`]] -[def __result_of_make_map__ [link fusion.sequences.generation.metafunctions.make_map `result_of::make_map`]] -[def __list_tie__ [link fusion.sequences.generation.functions.list_tie `list_tie`]] -[def __result_of_list_tie__ [link fusion.sequences.generation.metafunctions.list_tie `result_of::list_tie`]] +[def __generation__ [link fusion.container.generation.functions Generation]] +[def __result_of_generation__ [link fusion.container.generation.metafunctions Generation Metafunctions]] +[def __make_vector__ [link fusion.container.generation.functions.make_vector `make_vector`]] +[def __result_of_make_vector__ [link fusion.container.generation.metafunctions.make_vector `result_of::make_vector`]] +[def __vector_tie__ [link fusion.container.generation.functions.vector_tie `vector_tie`]] +[def __map_tie__ [link fusion.container.generation.functions.vector_tie `map_tie`]] +[def __result_of_vector_tie__ [link fusion.container.generation.metafunctions.vector_tie `result_of::vector_tie`]] +[def __make_vector__ [link fusion.container.generation.functions.make_vector `make_vector`]] +[def __result_of_make_vector__ [link fusion.container.generation.metafunctions.make_vector `result_of::make_vector`]] +[def __make_cons__ [link fusion.container.generation.functions.make_cons `make_cons`]] +[def __result_of_make_cons__ [link fusion.container.generation.metafunctions.make_cons `result_of::make_cons`]] +[def __make_list__ [link fusion.container.generation.functions.make_list `make_list`]] +[def __result_of_make_list__ [link fusion.container.generation.metafunctions.make_list `result_of::make_list`]] +[def __make_set__ [link fusion.container.generation.functions.make_set `make_set`]] +[def __result_of_make_set__ [link fusion.container.generation.metafunctions.make_set `result_of::make_set`]] +[def __make_map__ [link fusion.container.generation.functions.make_map `make_map`]] +[def __result_of_make_map__ [link fusion.container.generation.metafunctions.make_map `result_of::make_map`]] +[def __list_tie__ [link fusion.container.generation.functions.list_tie `list_tie`]] +[def __result_of_list_tie__ [link fusion.container.generation.metafunctions.list_tie `result_of::list_tie`]] -[def __out__ [link fusion.sequences.operators.i_o.out out]] -[def __in__ [link fusion.sequences.operators.i_o.in in]] -[def __eq__ [link fusion.sequences.operators.comparison.equal equal]] -[def __neq__ [link fusion.sequences.operators.comparison.not_equal not equal]] -[def __lt__ [link fusion.sequences.operators.comparison.less_than less than]] -[def __lte__ [link fusion.sequences.operators.comparison.less_than_equal less than equal]] -[def __gt__ [link fusion.sequences.operators.comparison.greater_than greater than]] -[def __gte__ [link fusion.sequences.operators.comparison.greater_than_equal greater than equal]] +[def __out__ [link fusion.sequence.operator.i_o.out out]] +[def __in__ [link fusion.sequence.operator.i_o.in in]] +[def __eq__ [link fusion.sequence.operator.comparison.equal equal]] +[def __neq__ [link fusion.sequence.operator.comparison.not_equal not equal]] +[def __lt__ [link fusion.sequence.operator.comparison.less_than less than]] +[def __lte__ [link fusion.sequence.operator.comparison.less_than_equal less than equal]] +[def __gt__ [link fusion.sequence.operator.comparison.greater_than greater than]] +[def __gte__ [link fusion.sequence.operator.comparison.greater_than_equal greater than equal]] -[def __algorithm__ [link fusion.algorithms Algorithm]] -[def __algorithms__ [link fusion.algorithms Algorithms]] -[def __fold__ [link fusion.algorithms.iteration.functions.fold `fold`]] -[def __result_of_fold__ [link fusion.algorithms.iteration.metafunctions.fold `result_of::fold`]] -[def __accumulate__ [link fusion.algorithms.iteration.functions.accumulate `accumulate`]] -[def __result_of_accumulate__ [link fusion.algorithms.iteration.metafunctions.accumulate `result_of::accumulate`]] -[def __for_each__ [link fusion.algorithms.iteration.functions.for_each `for_each`]] -[def __result_of_for_each__ [link fusion.algorithms.iteration.metafunctions.for_each `result_of::for_each`]] -[def __any__ [link fusion.algorithms.query.functions.any `any`]] -[def __result_of_any__ [link fusion.algorithms.query.metafunctions.any `result_of::any`]] -[def __all__ [link fusion.algorithms.query.functions.all `all`]] -[def __result_of_all__ [link fusion.algorithms.query.metafunctions.all `result_of::all`]] -[def __none__ [link fusion.algorithms.query.functions.none `none`]] -[def __result_of_none__ [link fusion.algorithms.query.metafunctions.none `result_of::none`]] -[def __find__ [link fusion.algorithms.query.functions.find `find`]] -[def __result_of_find__ [link fusion.algorithms.query.metafunctions.find `result_of::find`]] -[def __find_if__ [link fusion.algorithms.query.functions.find_if `find_if`]] -[def __result_of_find_if__ [link fusion.algorithms.query.metafunctions.find_if `result_of::find_if`]] -[def __count__ [link fusion.algorithms.query.functions.count `count`]] -[def __result_of_count__ [link fusion.algorithms.query.metafunctions.count `result_of::count`]] -[def __count_if__ [link fusion.algorithms.query.functions.count_if `count_if`]] -[def __result_of_count_if__ [link fusion.algorithms.query.metafunctions.count_if `result_of::count_if`]] -[def __filter__ [link fusion.algorithms.transformation.functions.filter `filter`]] -[def __result_of_filter__ [link fusion.algorithms.transformation.metafunctions.filter `result_of::filter`]] -[def __filter_if__ [link fusion.algorithms.transformation.functions.filter_if `filter_if`]] -[def __result_of_filter_if__ [link fusion.algorithms.transformation.metafunctions.filter_if `result_of::filter_if`]] -[def __transform__ [link fusion.algorithms.transformation.functions.transform `transform`]] -[def __result_of_transform__ [link fusion.algorithms.transformation.metafunctions.transform `result_of::transform`]] -[def __replace__ [link fusion.algorithms.transformation.functions.replace `replace`]] -[def __result_of_replace__ [link fusion.algorithms.transformation.metafunctions.replace `result_of::replace`]] -[def __replace_if__ [link fusion.algorithms.transformation.functions.replace_if `replace_if`]] -[def __result_of_replace_if__ [link fusion.algorithms.transformation.metafunctions.replace_if `result_of::replace_if`]] -[def __remove__ [link fusion.algorithms.transformation.functions.remove `remove`]] -[def __result_of_remove__ [link fusion.algorithms.transformation.metafunctions.remove `result_of::remove`]] -[def __remove_if__ [link fusion.algorithms.transformation.functions.remove_if `remove_if`]] -[def __result_of_remove_if__ [link fusion.algorithms.transformation.metafunctions.remove_if `result_of::remove_if`]] -[def __reverse__ [link fusion.algorithms.transformation.functions.reverse `reverse`]] -[def __result_of_reverse__ [link fusion.algorithms.transformation.metafunctions.reverse `result_of::reverse`]] -[def __clear__ [link fusion.algorithms.transformation.functions.clear `clear`]] -[def __result_of_clear__ [link fusion.algorithms.transformation.metafunctions.clear `result_of::clear`]] -[def __erase__ [link fusion.algorithms.transformation.functions.erase `erase`]] -[def __result_of_erase__ [link fusion.algorithms.transformation.metafunctions.erase `result_of::erase`]] -[def __erase_key__ [link fusion.algorithms.transformation.functions.erase_key `erase_key`]] -[def __result_of_erase_key__ [link fusion.algorithms.transformation.metafunctions.erase_key `result_of::erase_key`]] -[def __insert__ [link fusion.algorithms.transformation.functions.insert `insert`]] -[def __result_of_insert__ [link fusion.algorithms.transformation.metafunctions.insert `result_of::insert`]] -[def __insert_range__ [link fusion.algorithms.transformation.functions.insert_range `insert_range`]] -[def __result_of_insert_range__ [link fusion.algorithms.transformation.metafunctions.insert_range `result_of::insert_range`]] -[def __join__ [link fusion.algorithms.transformation.functions.join `join`]] -[def __result_of_join__ [link fusion.algorithms.transformation.metafunctions.join `result_of::join`]] -[def __zip__ [link fusion.algorithms.transformation.functions.zip `zip`]] -[def __result_of_zip__ [link fusion.algorithms.transformation.metafunctions.zip `result_of::zip`]] -[def __pop_back__ [link fusion.algorithms.transformation.functions.pop_back `pop_back`]] -[def __result_of_pop_back__ [link fusion.algorithms.transformation.metafunctions.pop_back `result_of::pop_back`]] -[def __pop_front__ [link fusion.algorithms.transformation.functions.pop_front `pop_front`]] -[def __result_of_pop_front__ [link fusion.algorithms.transformation.metafunctions.pop_front `result_of::pop_front`]] -[def __push_back__ [link fusion.algorithms.transformation.functions.push_back `push_back`]] -[def __result_of_push_back__ [link fusion.algorithms.transformation.metafunctions.push_back `result_of::push_back`]] -[def __push_front__ [link fusion.algorithms.transformation.functions.push_front `push_front`]] -[def __result_of_push_front__ [link fusion.algorithms.transformation.metafunctions.push_front `result_of::push_front`]] +[def __algorithm__ [link fusion.algorithm Algorithm]] +[def __algorithms__ [link fusion.algorithm Algorithms]] +[def __fold__ [link fusion.algorithm.iteration.functions.fold `fold`]] +[def __result_of_fold__ [link fusion.algorithm.iteration.metafunctions.fold `result_of::fold`]] +[def __accumulate__ [link fusion.algorithm.iteration.functions.accumulate `accumulate`]] +[def __result_of_accumulate__ [link fusion.algorithm.iteration.metafunctions.accumulate `result_of::accumulate`]] +[def __for_each__ [link fusion.algorithm.iteration.functions.for_each `for_each`]] +[def __result_of_for_each__ [link fusion.algorithm.iteration.metafunctions.for_each `result_of::for_each`]] +[def __any__ [link fusion.algorithm.query.functions.any `any`]] +[def __result_of_any__ [link fusion.algorithm.query.metafunctions.any `result_of::any`]] +[def __all__ [link fusion.algorithm.query.functions.all `all`]] +[def __result_of_all__ [link fusion.algorithm.query.metafunctions.all `result_of::all`]] +[def __none__ [link fusion.algorithm.query.functions.none `none`]] +[def __result_of_none__ [link fusion.algorithm.query.metafunctions.none `result_of::none`]] +[def __find__ [link fusion.algorithm.query.functions.find `find`]] +[def __result_of_find__ [link fusion.algorithm.query.metafunctions.find `result_of::find`]] +[def __find_if__ [link fusion.algorithm.query.functions.find_if `find_if`]] +[def __result_of_find_if__ [link fusion.algorithm.query.metafunctions.find_if `result_of::find_if`]] +[def __count__ [link fusion.algorithm.query.functions.count `count`]] +[def __result_of_count__ [link fusion.algorithm.query.metafunctions.count `result_of::count`]] +[def __count_if__ [link fusion.algorithm.query.functions.count_if `count_if`]] +[def __result_of_count_if__ [link fusion.algorithm.query.metafunctions.count_if `result_of::count_if`]] +[def __filter__ [link fusion.algorithm.transformation.functions.filter `filter`]] +[def __result_of_filter__ [link fusion.algorithm.transformation.metafunctions.filter `result_of::filter`]] +[def __filter_if__ [link fusion.algorithm.transformation.functions.filter_if `filter_if`]] +[def __result_of_filter_if__ [link fusion.algorithm.transformation.metafunctions.filter_if `result_of::filter_if`]] +[def __transform__ [link fusion.algorithm.transformation.functions.transform `transform`]] +[def __result_of_transform__ [link fusion.algorithm.transformation.metafunctions.transform `result_of::transform`]] +[def __replace__ [link fusion.algorithm.transformation.functions.replace `replace`]] +[def __result_of_replace__ [link fusion.algorithm.transformation.metafunctions.replace `result_of::replace`]] +[def __replace_if__ [link fusion.algorithm.transformation.functions.replace_if `replace_if`]] +[def __result_of_replace_if__ [link fusion.algorithm.transformation.metafunctions.replace_if `result_of::replace_if`]] +[def __remove__ [link fusion.algorithm.transformation.functions.remove `remove`]] +[def __result_of_remove__ [link fusion.algorithm.transformation.metafunctions.remove `result_of::remove`]] +[def __remove_if__ [link fusion.algorithm.transformation.functions.remove_if `remove_if`]] +[def __result_of_remove_if__ [link fusion.algorithm.transformation.metafunctions.remove_if `result_of::remove_if`]] +[def __reverse__ [link fusion.algorithm.transformation.functions.reverse `reverse`]] +[def __result_of_reverse__ [link fusion.algorithm.transformation.metafunctions.reverse `result_of::reverse`]] +[def __clear__ [link fusion.algorithm.transformation.functions.clear `clear`]] +[def __result_of_clear__ [link fusion.algorithm.transformation.metafunctions.clear `result_of::clear`]] +[def __erase__ [link fusion.algorithm.transformation.functions.erase `erase`]] +[def __result_of_erase__ [link fusion.algorithm.transformation.metafunctions.erase `result_of::erase`]] +[def __erase_key__ [link fusion.algorithm.transformation.functions.erase_key `erase_key`]] +[def __result_of_erase_key__ [link fusion.algorithm.transformation.metafunctions.erase_key `result_of::erase_key`]] +[def __insert__ [link fusion.algorithm.transformation.functions.insert `insert`]] +[def __result_of_insert__ [link fusion.algorithm.transformation.metafunctions.insert `result_of::insert`]] +[def __insert_range__ [link fusion.algorithm.transformation.functions.insert_range `insert_range`]] +[def __result_of_insert_range__ [link fusion.algorithm.transformation.metafunctions.insert_range `result_of::insert_range`]] +[def __join__ [link fusion.algorithm.transformation.functions.join `join`]] +[def __result_of_join__ [link fusion.algorithm.transformation.metafunctions.join `result_of::join`]] +[def __zip__ [link fusion.algorithm.transformation.functions.zip `zip`]] +[def __result_of_zip__ [link fusion.algorithm.transformation.metafunctions.zip `result_of::zip`]] +[def __pop_back__ [link fusion.algorithm.transformation.functions.pop_back `pop_back`]] +[def __result_of_pop_back__ [link fusion.algorithm.transformation.metafunctions.pop_back `result_of::pop_back`]] +[def __pop_front__ [link fusion.algorithm.transformation.functions.pop_front `pop_front`]] +[def __result_of_pop_front__ [link fusion.algorithm.transformation.metafunctions.pop_front `result_of::pop_front`]] +[def __push_back__ [link fusion.algorithm.transformation.functions.push_back `push_back`]] +[def __result_of_push_back__ [link fusion.algorithm.transformation.metafunctions.push_back `result_of::push_back`]] +[def __push_front__ [link fusion.algorithm.transformation.functions.push_front `push_front`]] +[def __result_of_push_front__ [link fusion.algorithm.transformation.metafunctions.push_front `result_of::push_front`]] -[def __tr1_tuple_pair__ [link fusion.tuples.pairs `TR1 and std::pair`]] -[def __tuple_get__ [link fusion.tuples.class_template_tuple.element_access `get`]] +[def __tr1_tuple_pair__ [link fusion.tuple.pairs `TR1 and std::pair`]] +[def __tuple_get__ [link fusion.tuple.class_template_tuple.element_access `get`]] [def __callable_obj__ [link fusion.functional.concepts.callable Callable Object]] [def __def_callable_obj__ [link fusion.functional.concepts.def_callable Deferred Callable Object]] @@ -290,18 +290,21 @@ [def __quick_start__ [link fusion.quick_start Quick Start]] [def __organization__ [link fusion.organization Orgainization]] [def __extension__ [link fusion.extension Extension]] -[def __sequence_fascade__ [link fusion.extension.sequence_fascade `sequence_fascade`]] -[def __iterator_fascade__ [link fusion.extension.iterator_fascade `iterator_fascade`]] +[def __sequence_facade__ [link fusion.extension.sequence_facade `sequence_facade`]] +[def __iterator_facade__ [link fusion.extension.iterator_facade `iterator_facade`]] [include preface.qbk] [include introduction.qbk] [include quick_start.qbk] [include organization.qbk] [include support.qbk] -[include iterators.qbk] -[include sequences.qbk] -[include algorithms.qbk] -[include tuples.qbk] +[include iterator.qbk] +[include sequence.qbk] +[include container.qbk] +[include view.qbk] +[include adapted.qbk] +[include algorithm.qbk] +[include tuple.qbk] [include extension.qbk] [include functional.qbk] [include notes.qbk] diff --git a/doc/html/fusion/adapted.html b/doc/html/fusion/adapted.html new file mode 100644 index 00000000..c8c459c3 --- /dev/null +++ b/doc/html/fusion/adapted.html @@ -0,0 +1,73 @@ + + + +Adapted + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ + +

+ 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. + 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 + [13] + . +

+

+ + Header +

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

+

[13] + Fusion sequences may also be adapted as fully conforming MPL + sequences (see Intrinsics). + That way, we can have 2-way adaptation to and from MPL + and Fusion +

+
+
+ + + +
Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/fusion/adapted/boost__array.html b/doc/html/fusion/adapted/boost__array.html new file mode 100644 index 00000000..c3652c33 --- /dev/null +++ b/doc/html/fusion/adapted/boost__array.html @@ -0,0 +1,81 @@ + + + +boost::array + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +

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

+

+ + Header +

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

+ + Model of +

+ +

+ + 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;
+
+

+ + See also +

+

+ Boost.Array Library +

+
+ + + +
Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/fusion/adapted/boost__tuple.html b/doc/html/fusion/adapted/boost__tuple.html new file mode 100644 index 00000000..ea69f1a0 --- /dev/null +++ b/doc/html/fusion/adapted/boost__tuple.html @@ -0,0 +1,77 @@ + + + +boost::tuple + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +

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

+

+ + Header +

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

+ + 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 +

+

+ Boost.Tuple + Library +

+
+ + + +
Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/fusion/adapted/boost__variant.html b/doc/html/fusion/adapted/boost__variant.html new file mode 100644 index 00000000..e20f4a8b --- /dev/null +++ b/doc/html/fusion/adapted/boost__variant.html @@ -0,0 +1,80 @@ + + + +boost::variant + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +

+ This module provides adapters for boost::variant. + Including the module header makes boost::variant + a fully conforming Forward + Sequence. The variant acts as a sequence of the types that can be + contained in the variant. Accessing types not currently stored int the variant + will lead to the variant being populated with a default constructed value + of that type. +

+

+ + Header +

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

+ + Model of +

+ +

+ + Example +

+
+boost::variant<int,std::string> example_variant = 101;
+std::cout << example_variant << '\n';
+*boost::fusion::find<std::string>(example_variant) = "hello";
+std::cout << example_variant << '\n';
+
+

+ + See also +

+

+ Boost.Variant Library +

+
+ + + +
Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/fusion/adapted/mpl_sequence.html b/doc/html/fusion/adapted/mpl_sequence.html new file mode 100644 index 00000000..bc04ce51 --- /dev/null +++ b/doc/html/fusion/adapted/mpl_sequence.html @@ -0,0 +1,97 @@ + + + +mpl sequence + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +

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

+

+ + Header +

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

+ + Model of +

+
+

+ + Example +

+
+mpl::vector_c<int, 123, 456> vec_c;
+fusion::vector2<int, long> v(vec_c);
+std::cout << at_c<0>(v) << std::endl;
+std::cout << at_c<1>(v) << std::endl;
+
+v = mpl::vector_c<int, 456, 789>();
+std::cout << at_c<0>(v) << std::endl;
+std::cout << at_c<1>(v) << std::endl;
+
+

+ + See also +

+

+ MPL +

+
+ + + +
Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/fusion/adapted/std__pair.html b/doc/html/fusion/adapted/std__pair.html new file mode 100644 index 00000000..a2847552 --- /dev/null +++ b/doc/html/fusion/adapted/std__pair.html @@ -0,0 +1,80 @@ + + + +std::pair + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +

+ This module provides adapters for std::pair. + Including the module header makes std::pair + a fully conforming Random + Access Sequence. +

+

+ + Header +

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

+ + Model of +

+ +

+ + Example +

+
+std::pair<int, std::string> p(123, "Hola!!!");
+std::cout << at_c<0>(p) << std::endl;
+std::cout << at_c<1>(p) << std::endl;
+std::cout << p << std::endl;
+
+

+ + See also +

+

+ std::pair, + TR1 + and std::pair +

+
+ + + +
Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/fusion/algorithm.html b/doc/html/fusion/algorithm.html new file mode 100644 index 00000000..1f77ce00 --- /dev/null +++ b/doc/html/fusion/algorithm.html @@ -0,0 +1,110 @@ + + + +Algorithm + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ + +

+ + Lazy Evaluation +

+

+ Unlike MPL, Fusion + algorithms are lazy and non sequence-type preserving. What does that mean? + It means that when you operate on a sequence through a Fusion algorithm that + returns a sequence, the sequence returned may not be of the same class as the + original. This is by design. Runtime efficiency is given a high priority. Like + MPL, and unlike + STL, + 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 + reference to the original sequence plus the transform function. Iteration over + 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 +

+

+ 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 + functions to convert back to the original sequence type. +

+

+ + Header +

+
+#include <boost/fusion/algorithm.hpp>
+#include <boost/fusion/include/algorithm.hpp>
+
+
+ + + +
Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/fusion/algorithms/iteration.html b/doc/html/fusion/algorithm/iteration.html similarity index 57% rename from doc/html/fusion/algorithms/iteration.html rename to doc/html/fusion/algorithm/iteration.html index 2183865c..9ae123ff 100644 --- a/doc/html/fusion/algorithms/iteration.html +++ b/doc/html/fusion/algorithm/iteration.html @@ -5,8 +5,8 @@ - - + + @@ -20,11 +20,11 @@
-PrevUpHomeNext +PrevUpHomeNext
Functions
Metafunctions
@@ -33,12 +33,13 @@ 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>
 
@@ -48,7 +49,7 @@

-PrevUpHomeNext +PrevUpHomeNext
diff --git a/doc/html/fusion/algorithms/iteration/functions.html b/doc/html/fusion/algorithm/iteration/functions.html similarity index 95% rename from doc/html/fusion/algorithms/iteration/functions.html rename to doc/html/fusion/algorithm/iteration/functions.html index 2efb8e1e..539e8c60 100644 --- a/doc/html/fusion/algorithms/iteration/functions.html +++ b/doc/html/fusion/algorithm/iteration/functions.html @@ -24,7 +24,7 @@
fold
accumulate
diff --git a/doc/html/fusion/algorithms/iteration/functions/accumulate.html b/doc/html/fusion/algorithm/iteration/functions/accumulate.html similarity index 80% rename from doc/html/fusion/algorithms/iteration/functions/accumulate.html rename to doc/html/fusion/algorithm/iteration/functions/accumulate.html index 424e78e1..5945831d 100644 --- a/doc/html/fusion/algorithms/iteration/functions/accumulate.html +++ b/doc/html/fusion/algorithm/iteration/functions/accumulate.html @@ -24,10 +24,10 @@
+
+ + Description

For a sequence Seq, initial @@ -36,9 +36,9 @@ to each element of Seq and the previous state.

-
- - Synopsis +
+ + Synopsis
 template<
@@ -50,7 +50,7 @@
     Sequence& seq, State const& initial_state, F const& f);
 
-

Table 1.34. Parameters

+

Table 1.34. Parameters

@@ -83,7 +83,7 @@

- A model of Forward Sequence, f(eN ....f(e2,f(e1,initial_state))) must be a valid expression for @@ -136,9 +136,9 @@

-
- - Expression +
+ + Expression Semantics
@@ -151,23 +151,24 @@
             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
@@ -181,7 +182,7 @@
     }
 };
 ...
-const vector<int,int> vec(1,2);
+const vector<int,int> vec(1,2);
 assert(accumulate(vec,std::string(""), make_string()) == "12");
 
diff --git a/doc/html/fusion/algorithms/iteration/functions/fold.html b/doc/html/fusion/algorithm/iteration/functions/fold.html similarity index 81% rename from doc/html/fusion/algorithms/iteration/functions/fold.html rename to doc/html/fusion/algorithm/iteration/functions/fold.html index e1e2f911..a41528b7 100644 --- a/doc/html/fusion/algorithms/iteration/functions/fold.html +++ b/doc/html/fusion/algorithm/iteration/functions/fold.html @@ -24,10 +24,10 @@ +
+ + Description

For a sequence Seq, initial @@ -36,9 +36,9 @@ to each element of Seq and the previous state.

-
- - Synopsis +
+ + Synopsis
 template<
@@ -50,7 +50,7 @@
     Sequence& seq, State const& initial_state, F const& f);
 
-

Table 1.33. Parameters

+

Table 1.33. Parameters

@@ -83,7 +83,7 @@

- A model of Forward Sequence,f(e,s) must be a valid expression for each element e @@ -136,9 +136,9 @@

-
- - Expression +
+ + Expression Semantics
@@ -151,23 +151,24 @@
             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
@@ -181,7 +182,7 @@
     }
 };
 ...
-const vector<int,int> vec(1,2);
+const vector<int,int> vec(1,2);
 assert(fold(vec,std::string(""), make_string()) == "12");
 
diff --git a/doc/html/fusion/algorithms/iteration/functions/for_each.html b/doc/html/fusion/algorithm/iteration/functions/for_each.html similarity index 74% rename from doc/html/fusion/algorithms/iteration/functions/for_each.html rename to doc/html/fusion/algorithm/iteration/functions/for_each.html index 013ff685..2a8c0ba8 100644 --- a/doc/html/fusion/algorithms/iteration/functions/for_each.html +++ b/doc/html/fusion/algorithm/iteration/functions/for_each.html @@ -24,17 +24,17 @@ +
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template<
@@ -45,7 +45,7 @@
     Sequence& seq, F const& f);
 
-

Table 1.35. Parameters

+

Table 1.35. Parameters

@@ -78,7 +78,7 @@

- A model of Forward Sequence, f(e) must be a valid expression for each element e @@ -113,9 +113,9 @@

-
- - Expression +
+ + Expression Semantics
@@ -128,23 +128,24 @@
             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
@@ -156,9 +157,9 @@
     }
 };
 ...
-vector<int,int> vec(1,2);
+vector<int,int> vec(1,2);
 for_each(vec, increment());
-assert(vec == make_vector(2,3));
+assert(vec == make_vector(2,3));
 
diff --git a/doc/html/fusion/algorithms/iteration/metafunctions.html b/doc/html/fusion/algorithm/iteration/metafunctions.html similarity index 95% rename from doc/html/fusion/algorithms/iteration/metafunctions.html rename to doc/html/fusion/algorithm/iteration/metafunctions.html index fd27f8a8..2f831a68 100644 --- a/doc/html/fusion/algorithms/iteration/metafunctions.html +++ b/doc/html/fusion/algorithm/iteration/metafunctions.html @@ -24,7 +24,7 @@
fold
accumulate
diff --git a/doc/html/fusion/algorithms/iteration/metafunctions/accumulate.html b/doc/html/fusion/algorithm/iteration/metafunctions/accumulate.html similarity index 78% rename from doc/html/fusion/algorithms/iteration/metafunctions/accumulate.html rename to doc/html/fusion/algorithm/iteration/metafunctions/accumulate.html index b3a5db47..b1fcf801 100644 --- a/doc/html/fusion/algorithms/iteration/metafunctions/accumulate.html +++ b/doc/html/fusion/algorithm/iteration/metafunctions/accumulate.html @@ -24,17 +24,17 @@
+
+ + Description

Returns the result type of accumulate.

-
- - Synopsis +
+ + Synopsis
 template<
@@ -47,7 +47,7 @@
 };
 
-

Table 1.37. Parameters

+

Table 1.37. Parameters

@@ -80,7 +80,7 @@

- A model of Forward Sequence

@@ -130,9 +130,9 @@
-
- - Expression +
+ + Expression Semantics
@@ -148,19 +148,20 @@
             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/algorithms/iteration/metafunctions/fold.html b/doc/html/fusion/algorithm/iteration/metafunctions/fold.html similarity index 79% rename from doc/html/fusion/algorithms/iteration/metafunctions/fold.html rename to doc/html/fusion/algorithm/iteration/metafunctions/fold.html index a319ac39..ae04bf29 100644 --- a/doc/html/fusion/algorithms/iteration/metafunctions/fold.html +++ b/doc/html/fusion/algorithm/iteration/metafunctions/fold.html @@ -24,17 +24,17 @@ +
+ + Description

Returns the result type of fold.

-
- - Synopsis +
+ + Synopsis
 template<
@@ -47,7 +47,7 @@
 };
 
-

Table 1.36. Parameters

+

Table 1.36. Parameters

@@ -80,7 +80,7 @@

- A model of Forward Sequence

@@ -130,9 +130,9 @@
-
- - Expression +
+ + Expression Semantics
@@ -148,19 +148,20 @@
             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/algorithms/iteration/metafunctions/for_each.html b/doc/html/fusion/algorithm/iteration/metafunctions/for_each.html similarity index 78% rename from doc/html/fusion/algorithms/iteration/metafunctions/for_each.html rename to doc/html/fusion/algorithm/iteration/metafunctions/for_each.html index 09b24b77..08bcefc9 100644 --- a/doc/html/fusion/algorithms/iteration/metafunctions/for_each.html +++ b/doc/html/fusion/algorithm/iteration/metafunctions/for_each.html @@ -24,18 +24,18 @@

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<
@@ -48,7 +48,7 @@
 };
 
-

Table 1.38. Parameters

+

Table 1.38. Parameters

@@ -81,7 +81,7 @@

- A model of Forward Sequence

@@ -112,9 +112,9 @@
-
- - Expression +
+ + Expression Semantics
@@ -130,19 +130,20 @@
             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/algorithms/query.html b/doc/html/fusion/algorithm/query.html similarity index 64% rename from doc/html/fusion/algorithms/query.html rename to doc/html/fusion/algorithm/query.html index 41aea719..526857b1 100644 --- a/doc/html/fusion/algorithms/query.html +++ b/doc/html/fusion/algorithm/query.html @@ -5,7 +5,7 @@ - + @@ -20,11 +20,11 @@

-PrevUpHomeNext +PrevUpHomeNext
Functions
Metafunctions
@@ -32,12 +32,13 @@

The query algorithms provide support for searching and analyzing sequences.

-

- - Header +

+ + Header

 #include <boost/fusion/algorithm/query.hpp>
+#include <boost/fusion/include/query.hpp>
 
@@ -47,7 +48,7 @@

-PrevUpHomeNext +PrevUpHomeNext
diff --git a/doc/html/fusion/algorithms/query/functions.html b/doc/html/fusion/algorithm/query/functions.html similarity index 95% rename from doc/html/fusion/algorithms/query/functions.html rename to doc/html/fusion/algorithm/query/functions.html index b09e34a4..eab586fc 100644 --- a/doc/html/fusion/algorithms/query/functions.html +++ b/doc/html/fusion/algorithm/query/functions.html @@ -24,7 +24,7 @@
any
all
diff --git a/doc/html/fusion/algorithms/query/functions/all.html b/doc/html/fusion/algorithm/query/functions/all.html similarity index 80% rename from doc/html/fusion/algorithms/query/functions/all.html rename to doc/html/fusion/algorithm/query/functions/all.html index 52dbfb06..b89e8094 100644 --- a/doc/html/fusion/algorithms/query/functions/all.html +++ b/doc/html/fusion/algorithm/query/functions/all.html @@ -24,10 +24,10 @@
+
+ + Description

For a sequence seq and @@ -36,9 +36,9 @@ f returns true for every element of seq.

-
- - Synopsis +
+ + Synopsis
 template<
@@ -49,7 +49,7 @@
     Sequence const& seq, F f);
 
-

Table 1.40. Parameters

+

Table 1.40. Parameters

@@ -82,7 +82,7 @@

- A model of Forward Sequence, f(e) is a valid expression, convertible to bool, for every @@ -115,9 +115,9 @@

-
- - Expression +
+ + Expression Semantics
@@ -132,23 +132,24 @@
             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
@@ -160,8 +161,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/algorithms/query/functions/any.html b/doc/html/fusion/algorithm/query/functions/any.html similarity index 80% rename from doc/html/fusion/algorithms/query/functions/any.html rename to doc/html/fusion/algorithm/query/functions/any.html index 4ab9512a..becbf976 100644 --- a/doc/html/fusion/algorithms/query/functions/any.html +++ b/doc/html/fusion/algorithm/query/functions/any.html @@ -24,10 +24,10 @@ +
+ + Description

For a sequence seq and @@ -36,9 +36,9 @@ f returns true for at least one element of seq.

-
- - Synopsis +
+ + Synopsis
 template<
@@ -49,7 +49,7 @@
     Sequence const& seq, F f);
 
-

Table 1.39. Parameters

+

Table 1.39. Parameters

@@ -82,7 +82,7 @@

- A model of Forward Sequence, f(e) must be a valid expression, convertible to bool, for each @@ -115,9 +115,9 @@

-
- - Expression +
+ + Expression semantics
@@ -132,23 +132,24 @@
             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
@@ -160,8 +161,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/algorithms/query/functions/count.html b/doc/html/fusion/algorithm/query/functions/count.html similarity index 72% rename from doc/html/fusion/algorithms/query/functions/count.html rename to doc/html/fusion/algorithm/query/functions/count.html index 8d520d6d..c40b5bbc 100644 --- a/doc/html/fusion/algorithms/query/functions/count.html +++ b/doc/html/fusion/algorithm/query/functions/count.html @@ -24,17 +24,17 @@ +
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template<
@@ -45,7 +45,7 @@
     Sequence const& seq, T const& t);
 
-

Table 1.44. Parameters

+

Table 1.44. Parameters

@@ -78,7 +78,7 @@

- A model of Forward Sequence, e == t must be a valid expression, convertible to bool, @@ -112,9 +112,9 @@

-
- - Expression +
+ + Expression Semantics
@@ -128,26 +128,27 @@
             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);
+const vector<double,int,int> vec(1.0,2,3);
 assert(count(vec,2) == 1);
 
diff --git a/doc/html/fusion/algorithms/query/functions/count_if.html b/doc/html/fusion/algorithm/query/functions/count_if.html similarity index 72% rename from doc/html/fusion/algorithms/query/functions/count_if.html rename to doc/html/fusion/algorithm/query/functions/count_if.html index e34b696f..0d56e05b 100644 --- a/doc/html/fusion/algorithms/query/functions/count_if.html +++ b/doc/html/fusion/algorithm/query/functions/count_if.html @@ -24,18 +24,18 @@ +
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template<
@@ -46,7 +46,7 @@
     Sequence const& seq, F f);
 
-

Table 1.45. Parameters

+

Table 1.45. Parameters

@@ -79,7 +79,7 @@

- A model of Forward Sequence, f(e) is a valid expression, convertible to bool, for each @@ -112,9 +112,9 @@

-
- - Expression +
+ + Expression Semantics
@@ -127,26 +127,27 @@
             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);
+const vector<int,int,int> vec(1,2,3);
 assert(count_if(vec,odd()) == 2);
 
diff --git a/doc/html/fusion/algorithms/query/functions/find.html b/doc/html/fusion/algorithm/query/functions/find.html similarity index 71% rename from doc/html/fusion/algorithms/query/functions/find.html rename to doc/html/fusion/algorithm/query/functions/find.html index ec889050..9c81db27 100644 --- a/doc/html/fusion/algorithms/query/functions/find.html +++ b/doc/html/fusion/algorithm/query/functions/find.html @@ -24,17 +24,17 @@ +
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template<
@@ -50,7 +50,7 @@
 unspecified find(Sequence& seq);
 
-

Table 1.42. Parameters

+

Table 1.42. Parameters

@@ -83,7 +83,7 @@

- A model of Forward Sequence

@@ -114,9 +114,9 @@
-
- - Expression +
+ + Expression Semantics
@@ -129,31 +129,32 @@
 

Semantics: Returns an iterator to the first element of seq - of type T, or end(seq) if there is no such element. Equivalent + 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');
+const vector<char,int> vec('a','0');
 assert(*find<int>(vec) == '0');
-assert(find<double>(vec) == end(vec));
+assert(find<double>(vec) == end(vec));
 
diff --git a/doc/html/fusion/algorithms/query/functions/find_if.html b/doc/html/fusion/algorithm/query/functions/find_if.html similarity index 70% rename from doc/html/fusion/algorithms/query/functions/find_if.html rename to doc/html/fusion/algorithm/query/functions/find_if.html index 7c237c4e..c2c4a8b3 100644 --- a/doc/html/fusion/algorithms/query/functions/find_if.html +++ b/doc/html/fusion/algorithm/query/functions/find_if.html @@ -24,19 +24,19 @@

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

-
- - Description +
+ + Description
-
- - Synopsis +
+ + Synopsis
 template<
@@ -52,7 +52,7 @@
 unspecified find_if(Sequence& seq);
 
-

Table 1.43. Parameters

+

Table 1.43. Parameters

@@ -85,7 +85,7 @@

- A model of Forward Sequence

@@ -117,9 +117,9 @@
-
- - Expression +
+ + Expression Semantics
@@ -133,31 +133,27 @@
             Semantics: Returns the first element
             of seq for which MPL
             Lambda Expression F
-            evaluates to boost::mpl::true_, or end(seq)
+            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.

-
- - Header +

+ /algorithm/query/find_if.hpp> +

+
+ + Example
-#include <boost/fusion/algorithm/query/find_if.hpp>
-
-
- - Example -
-
-const vector<double,int> vec(1.0,2);
+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));
+assert(find_if<is_class<mpl::_> >(vec) == end(vec));
 
diff --git a/doc/html/fusion/algorithms/query/functions/none.html b/doc/html/fusion/algorithm/query/functions/none.html similarity index 80% rename from doc/html/fusion/algorithms/query/functions/none.html rename to doc/html/fusion/algorithm/query/functions/none.html index c99c944a..3ad05216 100644 --- a/doc/html/fusion/algorithms/query/functions/none.html +++ b/doc/html/fusion/algorithm/query/functions/none.html @@ -24,10 +24,10 @@ +
+ + Description

For a sequence seq and @@ -36,9 +36,9 @@ f returns false for every element of seq.

-
- - Synopsis +
+ + Synopsis
 template<
@@ -49,7 +49,7 @@
     Sequence const& seq, F f);
 
-

Table 1.41. Parameters

+

Table 1.41. Parameters

@@ -82,7 +82,7 @@

- A model of Forward Sequence, f(e) is a valid expression, convertible to bool, for every @@ -115,9 +115,9 @@

-
- - Expression +
+ + Expression Semantics
@@ -132,23 +132,24 @@
             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
@@ -160,8 +161,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/algorithms/query/metafunctions.html b/doc/html/fusion/algorithm/query/metafunctions.html similarity index 95% rename from doc/html/fusion/algorithms/query/metafunctions.html rename to doc/html/fusion/algorithm/query/metafunctions.html index be03b74c..12f034c5 100644 --- a/doc/html/fusion/algorithms/query/metafunctions.html +++ b/doc/html/fusion/algorithm/query/metafunctions.html @@ -24,7 +24,7 @@
any
all
diff --git a/doc/html/fusion/algorithms/query/metafunctions/all.html b/doc/html/fusion/algorithm/query/metafunctions/all.html similarity index 79% rename from doc/html/fusion/algorithms/query/metafunctions/all.html rename to doc/html/fusion/algorithm/query/metafunctions/all.html index 394d74f6..7a41c3e2 100644 --- a/doc/html/fusion/algorithms/query/metafunctions/all.html +++ b/doc/html/fusion/algorithm/query/metafunctions/all.html @@ -24,17 +24,17 @@
+
+ + Description

A metafunction returning the result type of all.

-
- - Synopsis +
+ + Synopsis
 template<
@@ -47,7 +47,7 @@
 };
 
-

Table 1.47. Parameters

+

Table 1.47. Parameters

@@ -80,7 +80,7 @@

- A model of Forward Sequence

@@ -113,9 +113,9 @@
-
- - Expression +
+ + Expression Semantics
@@ -133,19 +133,20 @@
             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/algorithms/query/metafunctions/any.html b/doc/html/fusion/algorithm/query/metafunctions/any.html similarity index 80% rename from doc/html/fusion/algorithms/query/metafunctions/any.html rename to doc/html/fusion/algorithm/query/metafunctions/any.html index 79b3c1ab..b59fc624 100644 --- a/doc/html/fusion/algorithms/query/metafunctions/any.html +++ b/doc/html/fusion/algorithm/query/metafunctions/any.html @@ -24,17 +24,17 @@ +
+ + Description

A metafunction returning the result type of any.

-
- - Synopsis +
+ + Synopsis
 template<
@@ -47,7 +47,7 @@
 };
 
-

Table 1.46. Parameters

+

Table 1.46. Parameters

@@ -80,7 +80,7 @@

- A model of Forward Sequence

@@ -113,9 +113,9 @@
-
- - Expression +
+ + Expression Semantics
@@ -133,19 +133,20 @@
             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/algorithms/query/metafunctions/count.html b/doc/html/fusion/algorithm/query/metafunctions/count.html similarity index 78% rename from doc/html/fusion/algorithms/query/metafunctions/count.html rename to doc/html/fusion/algorithm/query/metafunctions/count.html index f5992e7c..2b1aa0cb 100644 --- a/doc/html/fusion/algorithms/query/metafunctions/count.html +++ b/doc/html/fusion/algorithm/query/metafunctions/count.html @@ -24,18 +24,18 @@ +
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template<
@@ -48,7 +48,7 @@
 };
 
-

Table 1.51. Parameters

+

Table 1.51. Parameters

@@ -81,7 +81,7 @@

- A model of Forward Sequence

@@ -112,9 +112,9 @@
-
- - Expression +
+ + Expression Semantics
@@ -128,19 +128,20 @@
             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/algorithms/query/metafunctions/count_if.html b/doc/html/fusion/algorithm/query/metafunctions/count_if.html similarity index 77% rename from doc/html/fusion/algorithms/query/metafunctions/count_if.html rename to doc/html/fusion/algorithm/query/metafunctions/count_if.html index 35badef9..8ac2b14a 100644 --- a/doc/html/fusion/algorithms/query/metafunctions/count_if.html +++ b/doc/html/fusion/algorithm/query/metafunctions/count_if.html @@ -24,18 +24,18 @@ +
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template<
@@ -48,7 +48,7 @@
 };
 
-

Table 1.52. Parameters

+

Table 1.52. Parameters

@@ -81,7 +81,7 @@

- A model of Forward Sequence

@@ -112,9 +112,9 @@
-
- - Expression +
+ + Expression Semantics
@@ -128,19 +128,20 @@
             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/algorithms/query/metafunctions/find.html b/doc/html/fusion/algorithm/query/metafunctions/find.html similarity index 72% rename from doc/html/fusion/algorithms/query/metafunctions/find.html rename to doc/html/fusion/algorithm/query/metafunctions/find.html index da040e90..faefad9e 100644 --- a/doc/html/fusion/algorithms/query/metafunctions/find.html +++ b/doc/html/fusion/algorithm/query/metafunctions/find.html @@ -24,18 +24,18 @@ +
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template<
@@ -48,7 +48,7 @@
 };
 
-

Table 1.49. Parameters

+

Table 1.49. Parameters

@@ -81,7 +81,7 @@

- Model of Forward Sequence

@@ -112,9 +112,9 @@
-
- - Expression +
+ + Expression Semantics
@@ -127,21 +127,23 @@
 

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. + 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/algorithms/query/metafunctions/find_if.html b/doc/html/fusion/algorithm/query/metafunctions/find_if.html similarity index 72% rename from doc/html/fusion/algorithms/query/metafunctions/find_if.html rename to doc/html/fusion/algorithm/query/metafunctions/find_if.html index 8e41a749..f03e46ff 100644 --- a/doc/html/fusion/algorithms/query/metafunctions/find_if.html +++ b/doc/html/fusion/algorithm/query/metafunctions/find_if.html @@ -24,18 +24,18 @@ +
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template<
@@ -48,7 +48,7 @@
 };
 
-

Table 1.50. Parameters

+

Table 1.50. Parameters

@@ -81,7 +81,7 @@

- A model of Forward Sequence

@@ -113,9 +113,9 @@
-
- - Expression +
+ + Expression Semantics
@@ -129,21 +129,22 @@
             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.
+            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/algorithms/query/metafunctions/none.html b/doc/html/fusion/algorithm/query/metafunctions/none.html similarity index 75% rename from doc/html/fusion/algorithms/query/metafunctions/none.html rename to doc/html/fusion/algorithm/query/metafunctions/none.html index 9e8e0644..81da251b 100644 --- a/doc/html/fusion/algorithms/query/metafunctions/none.html +++ b/doc/html/fusion/algorithm/query/metafunctions/none.html @@ -24,17 +24,17 @@ +
+ + Description

A metafunction returning the result type of none.

-
- - Synopsis +
+ + Synopsis
 template<
@@ -47,7 +47,7 @@
 };
 
-

Table 1.48. Parameters

+

Table 1.48. Parameters

@@ -80,7 +80,7 @@

- A model of Forward Sequence

@@ -113,9 +113,9 @@
-
- - Expression +
+ + Expression Semantics
@@ -126,26 +126,27 @@
           

Semantics: Returns the return type of - none given a sequence of type - Sequence and a unary - Polymorphic Function - Object of type F. + 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/algorithms/transformation.html b/doc/html/fusion/algorithm/transformation.html similarity index 68% rename from doc/html/fusion/algorithms/transformation.html rename to doc/html/fusion/algorithm/transformation.html index c7da6318..06f78fec 100644 --- a/doc/html/fusion/algorithms/transformation.html +++ b/doc/html/fusion/algorithm/transformation.html @@ -5,7 +5,7 @@ - + @@ -20,11 +20,11 @@

-PrevUpHomeNext +PrevUpHomeNext
Functions
Metafunctions
@@ -45,12 +45,13 @@ the period during which you wish to use the results.

-

- - Header +

+ + Header

 #include <boost/fusion/algorithm/transformation.hpp>
+#include <boost/fusion/include/transformation.hpp>
 
@@ -60,7 +61,7 @@

-PrevUpHomeNext +PrevUpHomeNext
diff --git a/doc/html/fusion/algorithms/transformation/functions.html b/doc/html/fusion/algorithm/transformation/functions.html similarity index 96% rename from doc/html/fusion/algorithms/transformation/functions.html rename to doc/html/fusion/algorithm/transformation/functions.html index 225bfb0b..8519230a 100644 --- a/doc/html/fusion/algorithms/transformation/functions.html +++ b/doc/html/fusion/algorithm/transformation/functions.html @@ -24,7 +24,7 @@
filter
filter_if
diff --git a/doc/html/fusion/algorithms/transformation/functions/clear.html b/doc/html/fusion/algorithm/transformation/functions/clear.html similarity index 74% rename from doc/html/fusion/algorithms/transformation/functions/clear.html rename to doc/html/fusion/algorithm/transformation/functions/clear.html index 8f351169..518736b1 100644 --- a/doc/html/fusion/algorithms/transformation/functions/clear.html +++ b/doc/html/fusion/algorithm/transformation/functions/clear.html @@ -24,17 +24,17 @@
+
+ + Description

clear returns an empty sequence.

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

Table 1.62. Parameters

+

Table 1.62. Parameters

@@ -75,7 +75,7 @@

- A model of Forward Sequence

@@ -88,16 +88,16 @@
-
- - Expression +
+ + Expression Semantics
 clear(seq);
 

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

@@ -105,26 +105,27 @@ 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/algorithms/transformation/functions/erase.html b/doc/html/fusion/algorithm/transformation/functions/erase.html similarity index 68% rename from doc/html/fusion/algorithms/transformation/functions/erase.html rename to doc/html/fusion/algorithm/transformation/functions/erase.html index 484fab77..e53ae9f2 100644 --- a/doc/html/fusion/algorithms/transformation/functions/erase.html +++ b/doc/html/fusion/algorithm/transformation/functions/erase.html @@ -24,18 +24,18 @@ +
+ + 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<
@@ -54,7 +54,7 @@
     Sequence const& seq, First const& it1, Last const& it2);
 
-

Table 1.63. Parameters

+

Table 1.63. Parameters

@@ -87,7 +87,7 @@

- A model of Forward Sequence

@@ -106,7 +106,7 @@

- A model of Forward Iterator

@@ -125,7 +125,7 @@

- A model of Forward Iterator

@@ -140,16 +140,16 @@
-
- - Expression +
+ + Expression Semantics
 erase(seq, pos);
 

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

@@ -162,7 +162,7 @@ erase(seq, first, last);

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

@@ -171,28 +171,29 @@ 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/algorithms/transformation/functions/erase_key.html b/doc/html/fusion/algorithm/transformation/functions/erase_key.html similarity index 75% rename from doc/html/fusion/algorithms/transformation/functions/erase_key.html rename to doc/html/fusion/algorithm/transformation/functions/erase_key.html index b9ad0b0e..5a0f4848 100644 --- a/doc/html/fusion/algorithms/transformation/functions/erase_key.html +++ b/doc/html/fusion/algorithm/transformation/functions/erase_key.html @@ -24,23 +24,23 @@ +
+ + Description

- 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<
@@ -50,7 +50,7 @@
 typename result_of::erase_key<Sequence const, Key>::type erase_key(Sequence const& seq);
 
-

Table 1.64. Parameters

+

Table 1.64. Parameters

@@ -83,7 +83,7 @@

- A model of Associative Sequence

@@ -114,16 +114,16 @@
-
- - Expression +
+ + Expression Semantics
 erase_key<Key>(seq);
 

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

@@ -132,26 +132,27 @@ 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/algorithms/transformation/functions/filter.html b/doc/html/fusion/algorithm/transformation/functions/filter.html similarity index 72% rename from doc/html/fusion/algorithms/transformation/functions/filter.html rename to doc/html/fusion/algorithm/transformation/functions/filter.html index 02bf4eae..8e44f666 100644 --- a/doc/html/fusion/algorithms/transformation/functions/filter.html +++ b/doc/html/fusion/algorithm/transformation/functions/filter.html @@ -24,18 +24,18 @@ +
+ + Description

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

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

Table 1.53. Parameters

+

Table 1.53. Parameters

@@ -78,7 +78,7 @@

- A model of Forward Sequence

@@ -109,16 +109,16 @@
-
- - Expression +
+ + Expression Semantics
 filter<T>(seq);
 

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

@@ -128,27 +128,28 @@ 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/algorithms/transformation/functions/filter_if.html b/doc/html/fusion/algorithm/transformation/functions/filter_if.html similarity index 73% rename from doc/html/fusion/algorithms/transformation/functions/filter_if.html rename to doc/html/fusion/algorithm/transformation/functions/filter_if.html index 7142a8c3..0002ef6b 100644 --- a/doc/html/fusion/algorithms/transformation/functions/filter_if.html +++ b/doc/html/fusion/algorithm/transformation/functions/filter_if.html @@ -24,19 +24,19 @@ +
+ + Description

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_.

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

Table 1.54. Parameters

+

Table 1.54. Parameters

@@ -79,7 +79,7 @@

- A model of Forward Sequence

@@ -111,16 +111,16 @@
-
- - Expression +
+ + Expression Semantics
 filter_if<Pred>(seq);
 

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

@@ -131,27 +131,28 @@ 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/algorithms/transformation/functions/insert.html b/doc/html/fusion/algorithm/transformation/functions/insert.html similarity index 67% rename from doc/html/fusion/algorithms/transformation/functions/insert.html rename to doc/html/fusion/algorithm/transformation/functions/insert.html index 812ba362..90936045 100644 --- a/doc/html/fusion/algorithms/transformation/functions/insert.html +++ b/doc/html/fusion/algorithm/transformation/functions/insert.html @@ -24,18 +24,18 @@ +
+ + 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<
@@ -46,7 +46,7 @@
 unspecified insert(Sequence const& seq, Pos const& pos, T const& t);
 
-

Table 1.65. Parameters

+

Table 1.65. Parameters

@@ -79,7 +79,7 @@

- A model of Forward Sequence

@@ -98,7 +98,7 @@

- A model of Forward Iterator

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

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

@@ -149,27 +149,28 @@ 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/algorithms/transformation/functions/insert_range.html b/doc/html/fusion/algorithm/transformation/functions/insert_range.html similarity index 66% rename from doc/html/fusion/algorithms/transformation/functions/insert_range.html rename to doc/html/fusion/algorithm/transformation/functions/insert_range.html index b117a4c9..1dd93c89 100644 --- a/doc/html/fusion/algorithms/transformation/functions/insert_range.html +++ b/doc/html/fusion/algorithm/transformation/functions/insert_range.html @@ -24,18 +24,18 @@ +
+ + Description

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

-
- - Synposis +
+ + Synposis
 template<
@@ -47,7 +47,7 @@
     Sequence const& seq, Pos const& pos, Range const& range);
 
-

Table 1.66. Parameters

+

Table 1.66. Parameters

@@ -80,7 +80,7 @@

- A model of Forward Sequence

@@ -99,7 +99,7 @@

- A model of Forward Iterator

@@ -118,7 +118,7 @@

- A model of Forward Sequence

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

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

@@ -152,27 +152,28 @@ 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/algorithms/transformation/functions/join.html b/doc/html/fusion/algorithm/transformation/functions/join.html similarity index 69% rename from doc/html/fusion/algorithms/transformation/functions/join.html rename to doc/html/fusion/algorithm/transformation/functions/join.html index 44bfe402..1fbe92f5 100644 --- a/doc/html/fusion/algorithms/transformation/functions/join.html +++ b/doc/html/fusion/algorithm/transformation/functions/join.html @@ -24,18 +24,18 @@ +
+ + Description

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

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

Table 1.67. Parameters

+

Table 1.67. Parameters

@@ -77,7 +77,7 @@

- A model of Forward Sequence

@@ -96,7 +96,7 @@

- A model of Forward Sequence

@@ -110,16 +110,16 @@
-
- - Expression +
+ + Expression Semantics
 join(lhs, rhs);
 

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

@@ -129,28 +129,29 @@ 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/algorithms/transformation/functions/pop_back.html b/doc/html/fusion/algorithm/transformation/functions/pop_back.html similarity index 74% rename from doc/html/fusion/algorithms/transformation/functions/pop_back.html rename to doc/html/fusion/algorithm/transformation/functions/pop_back.html index 58b34be5..23cf9300 100644 --- a/doc/html/fusion/algorithms/transformation/functions/pop_back.html +++ b/doc/html/fusion/algorithm/transformation/functions/pop_back.html @@ -24,17 +24,17 @@ +
+ + Description

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

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

Table 1.69. Parameters

+

Table 1.69. Parameters

@@ -75,7 +75,7 @@

- A model of Forward Sequence

@@ -88,16 +88,16 @@
-
- - Expression +
+ + Expression Semantics
 pop_back(seq);
 

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

@@ -107,26 +107,27 @@ except the last element. The elements in the new sequence 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/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/algorithms/transformation/functions/pop_front.html b/doc/html/fusion/algorithm/transformation/functions/pop_front.html similarity index 74% rename from doc/html/fusion/algorithms/transformation/functions/pop_front.html rename to doc/html/fusion/algorithm/transformation/functions/pop_front.html index 2177bbbf..6d49557a 100644 --- a/doc/html/fusion/algorithms/transformation/functions/pop_front.html +++ b/doc/html/fusion/algorithm/transformation/functions/pop_front.html @@ -24,17 +24,17 @@ +
+ + Description

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

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

Table 1.70. Parameters

+

Table 1.70. Parameters

@@ -75,7 +75,7 @@

- A model of Forward Sequence

@@ -88,16 +88,16 @@
-
- - Expression +
+ + Expression Semantics
 pop_front(seq);
 

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

@@ -107,26 +107,27 @@ except the first element. The elements in the new sequence 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/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/algorithms/transformation/functions/push_back.html b/doc/html/fusion/algorithm/transformation/functions/push_back.html similarity index 76% rename from doc/html/fusion/algorithms/transformation/functions/push_back.html rename to doc/html/fusion/algorithm/transformation/functions/push_back.html index 9d9af052..8ba636df 100644 --- a/doc/html/fusion/algorithms/transformation/functions/push_back.html +++ b/doc/html/fusion/algorithm/transformation/functions/push_back.html @@ -24,17 +24,17 @@ +
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template<
@@ -45,7 +45,7 @@
     Sequence const& seq, T const& t);
 
-

Table 1.71. Parameters

+

Table 1.71. Parameters

@@ -78,7 +78,7 @@

- A model of Forward Sequence

@@ -109,16 +109,16 @@
-
- - Expression +
+ + Expression Semantics
 push_back(seq, t);
 

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

@@ -128,26 +128,27 @@ 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/algorithms/transformation/functions/push_front.html b/doc/html/fusion/algorithm/transformation/functions/push_front.html similarity index 77% rename from doc/html/fusion/algorithms/transformation/functions/push_front.html rename to doc/html/fusion/algorithm/transformation/functions/push_front.html index 0a600437..e53e9888 100644 --- a/doc/html/fusion/algorithms/transformation/functions/push_front.html +++ b/doc/html/fusion/algorithm/transformation/functions/push_front.html @@ -24,17 +24,17 @@ +
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template<
@@ -45,7 +45,7 @@
     Sequence const& seq, T const& t);
 
-

Table 1.72. Parameters

+

Table 1.72. Parameters

@@ -78,7 +78,7 @@

- A model of Forward Sequence

@@ -109,16 +109,16 @@
-
- - Expression +
+ + Expression Semantics
 push_back(seq, t);
 

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

@@ -129,26 +129,27 @@ to the beginning. 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_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/algorithms/transformation/functions/remove.html b/doc/html/fusion/algorithm/transformation/functions/remove.html similarity index 74% rename from doc/html/fusion/algorithms/transformation/functions/remove.html rename to doc/html/fusion/algorithm/transformation/functions/remove.html index 9f6577d2..b8106e2d 100644 --- a/doc/html/fusion/algorithms/transformation/functions/remove.html +++ b/doc/html/fusion/algorithm/transformation/functions/remove.html @@ -24,18 +24,18 @@ +
+ + Description

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

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

Table 1.59. Parameters

+

Table 1.59. Parameters

@@ -78,7 +78,7 @@

- A model of Forward Sequence

@@ -109,16 +109,16 @@
-
- - Expression +
+ + Expression Semantics
 remove<T>(seq);
 

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

@@ -128,27 +128,28 @@ 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/algorithms/transformation/functions/remove_if.html b/doc/html/fusion/algorithm/transformation/functions/remove_if.html similarity index 75% rename from doc/html/fusion/algorithms/transformation/functions/remove_if.html rename to doc/html/fusion/algorithm/transformation/functions/remove_if.html index 622500ca..65952899 100644 --- a/doc/html/fusion/algorithms/transformation/functions/remove_if.html +++ b/doc/html/fusion/algorithm/transformation/functions/remove_if.html @@ -24,18 +24,18 @@ +
+ + Description

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

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

Table 1.60. Parameters

+

Table 1.60. Parameters

@@ -78,7 +78,7 @@

- A model of Forward Sequence

@@ -110,16 +110,16 @@
-
- - Expression +
+ + Expression Semantics
 remove_if<Pred>(seq);
 

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

@@ -130,27 +130,28 @@ 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/algorithms/transformation/functions/replace.html b/doc/html/fusion/algorithm/transformation/functions/replace.html similarity index 79% rename from doc/html/fusion/algorithms/transformation/functions/replace.html rename to doc/html/fusion/algorithm/transformation/functions/replace.html index 1d4e7b04..0821ceb4 100644 --- a/doc/html/fusion/algorithms/transformation/functions/replace.html +++ b/doc/html/fusion/algorithm/transformation/functions/replace.html @@ -24,18 +24,18 @@ +
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template<
@@ -46,7 +46,7 @@
     Sequence const& seq, T const& old_value, T const& new_value);
 
-

Table 1.57. Parameters

+

Table 1.57. Parameters

@@ -79,7 +79,7 @@

- A model of Forward Sequence, e == old_value is a valid expression, convertible to bool, @@ -131,16 +131,16 @@

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

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

@@ -150,26 +150,27 @@ 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/algorithms/transformation/functions/replace_if.html b/doc/html/fusion/algorithm/transformation/functions/replace_if.html similarity index 81% rename from doc/html/fusion/algorithms/transformation/functions/replace_if.html rename to doc/html/fusion/algorithm/transformation/functions/replace_if.html index e7462b27..29ac9094 100644 --- a/doc/html/fusion/algorithms/transformation/functions/replace_if.html +++ b/doc/html/fusion/algorithm/transformation/functions/replace_if.html @@ -24,19 +24,19 @@ +
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template<
@@ -47,7 +47,7 @@
     Sequence const& seq, F f, T const& new_value);
 
-

Table 1.58. Parameters

+

Table 1.58. Parameters

@@ -80,7 +80,7 @@

- A model of Forward Sequence

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

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

@@ -150,23 +150,24 @@ 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
@@ -178,7 +179,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/algorithms/transformation/functions/reverse.html b/doc/html/fusion/algorithm/transformation/functions/reverse.html similarity index 74% rename from doc/html/fusion/algorithms/transformation/functions/reverse.html rename to doc/html/fusion/algorithm/transformation/functions/reverse.html index cbe0dcde..0ea7ae3c 100644 --- a/doc/html/fusion/algorithms/transformation/functions/reverse.html +++ b/doc/html/fusion/algorithm/transformation/functions/reverse.html @@ -24,17 +24,17 @@ +
+ + Description

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

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

Table 1.61. Parameters

+

Table 1.61. Parameters

@@ -75,7 +75,7 @@

- A model of Bidirectional Sequence

@@ -88,16 +88,16 @@
-
- - Expression +
+ + Expression Semantics
 reverse(seq);
 

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

@@ -106,26 +106,27 @@ 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/algorithms/transformation/functions/transform.html b/doc/html/fusion/algorithm/transformation/functions/transform.html similarity index 84% rename from doc/html/fusion/algorithms/transformation/functions/transform.html rename to doc/html/fusion/algorithm/transformation/functions/transform.html index 081723b7..b133fc6b 100644 --- a/doc/html/fusion/algorithms/transformation/functions/transform.html +++ b/doc/html/fusion/algorithm/transformation/functions/transform.html @@ -24,10 +24,10 @@ +
+ + Description

For a sequence seq and @@ -36,9 +36,9 @@ sequence with elements created by applying f(e) to each element of e of seq.

-
- - Unary +
+ + Unary version synopsis
@@ -50,7 +50,7 @@
     Sequence const& seq, F f);
 
-

Table 1.55. Parameters

+

Table 1.55. Parameters

@@ -83,7 +83,7 @@

- A model of Forward Sequence

@@ -117,16 +117,16 @@
-
- - Expression +
+ + Expression Semantics
 transform(seq, f);
 

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

@@ -135,9 +135,9 @@ the return values of f(e) for each element e within seq.

-
- - Binary +
+ + Binary version synopsis
@@ -150,7 +150,7 @@
     Sequence1 const& seq1, Sequence2 const& seq2, F f);
 
-

Table 1.56. Parameters

+

Table 1.56. Parameters

@@ -183,7 +183,7 @@

- A model of Forward Sequence

@@ -202,7 +202,7 @@

- A model of Forward Sequence

@@ -238,7 +238,7 @@

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

@@ -247,23 +247,24 @@ 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
@@ -276,7 +277,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/algorithms/transformation/functions/zip.html b/doc/html/fusion/algorithm/transformation/functions/zip.html similarity index 73% rename from doc/html/fusion/algorithms/transformation/functions/zip.html rename to doc/html/fusion/algorithm/transformation/functions/zip.html index d4f8fa0f..7cb54a44 100644 --- a/doc/html/fusion/algorithms/transformation/functions/zip.html +++ b/doc/html/fusion/algorithm/transformation/functions/zip.html @@ -24,18 +24,18 @@ +
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template<
@@ -44,11 +44,11 @@
     ...
     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

@@ -80,7 +80,7 @@

- Each sequence is a model of Forward Sequence.

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

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

@@ -116,28 +116,29 @@ 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/algorithms/transformation/metafunctions.html b/doc/html/fusion/algorithm/transformation/metafunctions.html similarity index 96% rename from doc/html/fusion/algorithms/transformation/metafunctions.html rename to doc/html/fusion/algorithm/transformation/metafunctions.html index 0f2ff997..bb41bcab 100644 --- a/doc/html/fusion/algorithms/transformation/metafunctions.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions.html @@ -24,7 +24,7 @@
filter
filter_if
diff --git a/doc/html/fusion/algorithms/transformation/metafunctions/clear.html b/doc/html/fusion/algorithm/transformation/metafunctions/clear.html similarity index 75% rename from doc/html/fusion/algorithms/transformation/metafunctions/clear.html rename to doc/html/fusion/algorithm/transformation/metafunctions/clear.html index 848d0a47..5f73bcc4 100644 --- a/doc/html/fusion/algorithms/transformation/metafunctions/clear.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/clear.html @@ -24,18 +24,18 @@
+
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template<
@@ -47,7 +47,7 @@
 };
 
-

Table 1.82. Parameters

+

Table 1.82. Parameters

@@ -90,35 +90,36 @@
-
- - Expression +
+ + Expression Semantics
 result_of::clear<Sequence>::type
 

- Return type: A model of Return type: A model of Forward 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/algorithms/transformation/metafunctions/erase.html b/doc/html/fusion/algorithm/transformation/metafunctions/erase.html similarity index 77% rename from doc/html/fusion/algorithms/transformation/metafunctions/erase.html rename to doc/html/fusion/algorithm/transformation/metafunctions/erase.html index 31344d05..41d0ff53 100644 --- a/doc/html/fusion/algorithms/transformation/metafunctions/erase.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/erase.html @@ -24,18 +24,18 @@

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

-
- - Description +
+ + Description
-
- - Synopsis +
+ + Synopsis
 template<
@@ -48,7 +48,7 @@
 };
 
-

Table 1.83. Parameters

+

Table 1.83. Parameters

@@ -81,7 +81,7 @@

- A model of Forward Sequence

@@ -100,7 +100,7 @@

- A model of Forward Iterator

@@ -119,7 +119,7 @@

- A model of Forward Iterator

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

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

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

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

@@ -163,19 +163,20 @@ 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/algorithms/transformation/metafunctions/erase_key.html b/doc/html/fusion/algorithm/transformation/metafunctions/erase_key.html similarity index 75% rename from doc/html/fusion/algorithms/transformation/metafunctions/erase_key.html rename to doc/html/fusion/algorithm/transformation/metafunctions/erase_key.html index dd6dd245..d2adca50 100644 --- a/doc/html/fusion/algorithms/transformation/metafunctions/erase_key.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/erase_key.html @@ -24,18 +24,18 @@ +
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template<
@@ -48,7 +48,7 @@
 };
 
-

Table 1.84. Parameters

+

Table 1.84. Parameters

@@ -81,7 +81,7 @@

- A model of Associative Sequence

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

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

@@ -130,19 +130,20 @@ 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/algorithms/transformation/metafunctions/filter.html b/doc/html/fusion/algorithm/transformation/metafunctions/filter.html similarity index 78% rename from doc/html/fusion/algorithms/transformation/metafunctions/filter.html rename to doc/html/fusion/algorithm/transformation/metafunctions/filter.html index f15bf0a2..dded4bff 100644 --- a/doc/html/fusion/algorithms/transformation/metafunctions/filter.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/filter.html @@ -24,18 +24,18 @@ +
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template<
@@ -48,7 +48,7 @@
 };
 
-

Table 1.73. Parameter

+

Table 1.73. Parameter

@@ -81,7 +81,7 @@

- A model of Forward Sequence

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

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

@@ -132,19 +132,20 @@ 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/algorithms/transformation/metafunctions/filter_if.html b/doc/html/fusion/algorithm/transformation/metafunctions/filter_if.html similarity index 77% rename from doc/html/fusion/algorithms/transformation/metafunctions/filter_if.html rename to doc/html/fusion/algorithm/transformation/metafunctions/filter_if.html index 8906392b..ee65bb83 100644 --- a/doc/html/fusion/algorithms/transformation/metafunctions/filter_if.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/filter_if.html @@ -24,19 +24,19 @@ +
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template<
@@ -49,7 +49,7 @@
 };
 
-

Table 1.74. Parameter

+

Table 1.74. Parameter

@@ -82,7 +82,7 @@

- A model of Forward Sequence

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

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

@@ -133,19 +133,20 @@ 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/algorithms/transformation/metafunctions/insert.html b/doc/html/fusion/algorithm/transformation/metafunctions/insert.html similarity index 77% rename from doc/html/fusion/algorithms/transformation/metafunctions/insert.html rename to doc/html/fusion/algorithm/transformation/metafunctions/insert.html index 20a5d409..f16c2c8a 100644 --- a/doc/html/fusion/algorithms/transformation/metafunctions/insert.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/insert.html @@ -24,18 +24,18 @@ +
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template<
@@ -49,7 +49,7 @@
 };
 
-

Table 1.85. Parameters

+

Table 1.85. Parameters

@@ -82,7 +82,7 @@

- A model of Forward Sequence

@@ -101,7 +101,7 @@

- A model of Forward Iterator

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

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

@@ -151,19 +151,20 @@ 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/algorithms/transformation/metafunctions/insert_range.html b/doc/html/fusion/algorithm/transformation/metafunctions/insert_range.html similarity index 75% rename from doc/html/fusion/algorithms/transformation/metafunctions/insert_range.html rename to doc/html/fusion/algorithm/transformation/metafunctions/insert_range.html index a6482a74..2f9812ee 100644 --- a/doc/html/fusion/algorithms/transformation/metafunctions/insert_range.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/insert_range.html @@ -24,18 +24,18 @@ +
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template<
@@ -49,7 +49,7 @@
 };
 
-

Table 1.86. Parameters

+

Table 1.86. Parameters

@@ -82,7 +82,7 @@

- A model of Forward Sequence

@@ -101,7 +101,7 @@

- A model of Forward Iterator

@@ -120,7 +120,7 @@

- A model of Forward Sequence

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

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

@@ -153,19 +153,20 @@ 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/algorithms/transformation/metafunctions/join.html b/doc/html/fusion/algorithm/transformation/metafunctions/join.html similarity index 74% rename from doc/html/fusion/algorithms/transformation/metafunctions/join.html rename to doc/html/fusion/algorithm/transformation/metafunctions/join.html index 756668ab..1d216ed8 100644 --- a/doc/html/fusion/algorithms/transformation/metafunctions/join.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/join.html @@ -24,17 +24,17 @@ +
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template<
@@ -46,16 +46,16 @@
     typedef unspecified type;
 };
 
-
- - Expression +
+ + Expression Semantics
 result_of::join<LhSequence, RhSequence>::type
 

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

@@ -65,19 +65,20 @@ 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/algorithms/transformation/metafunctions/pop_back.html b/doc/html/fusion/algorithm/transformation/metafunctions/pop_back.html similarity index 74% rename from doc/html/fusion/algorithms/transformation/metafunctions/pop_back.html rename to doc/html/fusion/algorithm/transformation/metafunctions/pop_back.html index 86a05857..ebebfc19 100644 --- a/doc/html/fusion/algorithms/transformation/metafunctions/pop_back.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/pop_back.html @@ -24,18 +24,18 @@ +
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template<
@@ -47,7 +47,7 @@
 };
 
-

Table 1.87. Parameters

+

Table 1.87. Parameters

@@ -79,7 +79,7 @@

- A model of Forward Sequence

@@ -92,16 +92,16 @@
-
- - Expression +
+ + Expression Semantics
 result_of::pop_back<Sequence>::type
 

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

@@ -110,19 +110,20 @@ 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/algorithms/transformation/metafunctions/pop_front.html b/doc/html/fusion/algorithm/transformation/metafunctions/pop_front.html similarity index 70% rename from doc/html/fusion/algorithms/transformation/metafunctions/pop_front.html rename to doc/html/fusion/algorithm/transformation/metafunctions/pop_front.html index 309d7ff8..68ce7a4b 100644 --- a/doc/html/fusion/algorithms/transformation/metafunctions/pop_front.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/pop_front.html @@ -24,18 +24,18 @@ +
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template<
@@ -47,7 +47,7 @@
 };
 
-

Table 1.88. Parameters

+

Table 1.88. Parameters

@@ -79,7 +79,7 @@

- A model of Forward Sequence

@@ -92,16 +92,16 @@
-
- - Expression +
+ + Expression Semantics
 result_of::pop_front<Sequence>::type
 

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

@@ -110,20 +110,16 @@ the elements of Sequence except the first element.

-
- - Complexity +
+ + Complexity

Constant.

-
- - Header -
-
-#include <boost/fusion/algorithm/transformation/pop_front.hpp>
-
+

+ /algorithm/transformation/pop_front.hpp> +

diff --git a/doc/html/fusion/algorithms/transformation/metafunctions/push_back.html b/doc/html/fusion/algorithm/transformation/metafunctions/push_back.html similarity index 73% rename from doc/html/fusion/algorithms/transformation/metafunctions/push_back.html rename to doc/html/fusion/algorithm/transformation/metafunctions/push_back.html index 651aef5d..c5185f43 100644 --- a/doc/html/fusion/algorithms/transformation/metafunctions/push_back.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/push_back.html @@ -24,18 +24,18 @@ +
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template<
@@ -48,7 +48,7 @@
 };
 
-

Table 1.89. Parameters

+

Table 1.89. Parameters

@@ -81,7 +81,7 @@

- A model of Forward Sequence

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

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

@@ -131,20 +131,16 @@ and an element of type T added to the end.

-
- - Complexity +
+ + Complexity

Constant.

-
- - Header -
-
-#include <boost/fusion/algorithm/transformation/push_back.hpp>
-
+

+ /algorithm/transformation/push_back.hpp> +

diff --git a/doc/html/fusion/algorithms/transformation/metafunctions/push_front.html b/doc/html/fusion/algorithm/transformation/metafunctions/push_front.html similarity index 69% rename from doc/html/fusion/algorithms/transformation/metafunctions/push_front.html rename to doc/html/fusion/algorithm/transformation/metafunctions/push_front.html index ea40b769..a2d094cb 100644 --- a/doc/html/fusion/algorithms/transformation/metafunctions/push_front.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/push_front.html @@ -7,7 +7,7 @@ - +
@@ -20,22 +20,22 @@

-PrevUpHomeNext +PrevUpHomeNext
+
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template<
@@ -48,7 +48,7 @@
 };
 
-

Table 1.90. Parameters

+

Table 1.90. Parameters

@@ -81,7 +81,7 @@

- A model of Forward Sequence

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

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

@@ -131,20 +131,16 @@ and an element of type T added to the beginning.

-
- - Complexity +
+ + Complexity

Constant.

-
- - Header -
-
-#include <boost/fusion/algorithm/transformation/push_front.hpp>
-
+

+ /algorithm/transformation/push_front.hpp> +

@@ -153,7 +149,7 @@

-PrevUpHomeNext +PrevUpHomeNext
diff --git a/doc/html/fusion/algorithms/transformation/metafunctions/remove.html b/doc/html/fusion/algorithm/transformation/metafunctions/remove.html similarity index 78% rename from doc/html/fusion/algorithms/transformation/metafunctions/remove.html rename to doc/html/fusion/algorithm/transformation/metafunctions/remove.html index e7fcd282..65e693db 100644 --- a/doc/html/fusion/algorithms/transformation/metafunctions/remove.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/remove.html @@ -24,18 +24,18 @@ +
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template<
@@ -48,7 +48,7 @@
 };
 
-

Table 1.79. Parameters

+

Table 1.79. Parameters

@@ -81,7 +81,7 @@

- A model of Forward Sequence

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

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

@@ -132,19 +132,20 @@ 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/algorithms/transformation/metafunctions/remove_if.html b/doc/html/fusion/algorithm/transformation/metafunctions/remove_if.html similarity index 77% rename from doc/html/fusion/algorithms/transformation/metafunctions/remove_if.html rename to doc/html/fusion/algorithm/transformation/metafunctions/remove_if.html index c872fb81..8f4d993f 100644 --- a/doc/html/fusion/algorithms/transformation/metafunctions/remove_if.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/remove_if.html @@ -24,19 +24,19 @@ +
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template<
@@ -49,7 +49,7 @@
 };
 
-

Table 1.80. Parameters

+

Table 1.80. Parameters

@@ -82,7 +82,7 @@

- A model of Forward Sequence

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

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

@@ -133,19 +133,20 @@ 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/algorithms/transformation/metafunctions/replace.html b/doc/html/fusion/algorithm/transformation/metafunctions/replace.html similarity index 76% rename from doc/html/fusion/algorithms/transformation/metafunctions/replace.html rename to doc/html/fusion/algorithm/transformation/metafunctions/replace.html index e294e80d..abced9d0 100644 --- a/doc/html/fusion/algorithms/transformation/metafunctions/replace.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/replace.html @@ -24,18 +24,18 @@ +
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template<
@@ -48,7 +48,7 @@
 };
 
-

Table 1.77. Parameters

+

Table 1.77. Parameters

@@ -81,7 +81,7 @@

- A model of Forward Sequence

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

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

@@ -129,19 +129,20 @@ 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/algorithms/transformation/metafunctions/replace_if.html b/doc/html/fusion/algorithm/transformation/metafunctions/replace_if.html similarity index 77% rename from doc/html/fusion/algorithms/transformation/metafunctions/replace_if.html rename to doc/html/fusion/algorithm/transformation/metafunctions/replace_if.html index 11a76dd0..50f8c3ac 100644 --- a/doc/html/fusion/algorithms/transformation/metafunctions/replace_if.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/replace_if.html @@ -24,10 +24,10 @@ +
+ + Description

Returns the result type of replace_if, given the types @@ -35,9 +35,9 @@ Object">Polymorphic Function Object predicate and replacement object.

-
- - Synopsis +
+ + Synopsis
 template<
@@ -50,7 +50,7 @@
 };
 
-

Table 1.78. Parameters

+

Table 1.78. Parameters

@@ -83,7 +83,7 @@

- A model of Forward Sequence

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

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

@@ -150,19 +150,20 @@ 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/algorithms/transformation/metafunctions/reverse.html b/doc/html/fusion/algorithm/transformation/metafunctions/reverse.html similarity index 74% rename from doc/html/fusion/algorithms/transformation/metafunctions/reverse.html rename to doc/html/fusion/algorithm/transformation/metafunctions/reverse.html index 9cab050a..6c9c6e81 100644 --- a/doc/html/fusion/algorithms/transformation/metafunctions/reverse.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/reverse.html @@ -24,18 +24,18 @@ +
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template<
@@ -47,7 +47,7 @@
 };
 
-

Table 1.81. Parameters

+

Table 1.81. Parameters

@@ -79,7 +79,7 @@

- A model of Bidirectional Sequence

@@ -92,16 +92,16 @@
-
- - Expression +
+ + Expression Semantics
 result_of::reverse<Sequence>::type
 

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

@@ -109,19 +109,20 @@ 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/algorithms/transformation/metafunctions/transform.html b/doc/html/fusion/algorithm/transformation/metafunctions/transform.html similarity index 83% rename from doc/html/fusion/algorithms/transformation/metafunctions/transform.html rename to doc/html/fusion/algorithm/transformation/metafunctions/transform.html index dc21f9c4..f69f5f62 100644 --- a/doc/html/fusion/algorithms/transformation/metafunctions/transform.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/transform.html @@ -24,10 +24,10 @@ +
+ + Description

For a sequence seq and @@ -36,9 +36,9 @@ sequence with elements created by applying f(e) to each element of e of seq.

-
- - Unary +
+ + Unary version synopsis
@@ -50,7 +50,7 @@
     Sequence const& seq, F f);
 
-

Table 1.75. Parameters

+

Table 1.75. Parameters

@@ -83,7 +83,7 @@

- A model of Forward Sequence

@@ -117,16 +117,16 @@
-
- - Expression +
+ + Expression Semantics
 transform(seq, f);
 

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

@@ -135,9 +135,9 @@ the return values of f(e) for each element e within seq.

-
- - Binary +
+ + Binary version synopsis
@@ -150,7 +150,7 @@
     Sequence1 const& seq1, Sequence2 const& seq2, F f);
 
-

Table 1.76. Parameters

+

Table 1.76. Parameters

@@ -183,7 +183,7 @@

- A model of Forward Sequence

@@ -202,7 +202,7 @@

- A model of Forward Sequence

@@ -238,7 +238,7 @@

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

@@ -247,23 +247,24 @@ 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
@@ -276,7 +277,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/algorithms/transformation/metafunctions/zip.html b/doc/html/fusion/algorithm/transformation/metafunctions/zip.html similarity index 79% rename from doc/html/fusion/algorithms/transformation/metafunctions/zip.html rename to doc/html/fusion/algorithm/transformation/metafunctions/zip.html index 9a629d83..720af000 100644 --- a/doc/html/fusion/algorithms/transformation/metafunctions/zip.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/zip.html @@ -24,18 +24,18 @@ +
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template<
@@ -49,9 +49,9 @@
     typedef unspecified type;
 };
 
-
- - Expression +
+ + Expression Semantics
@@ -72,19 +72,20 @@
             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/algorithms.html b/doc/html/fusion/algorithms.html deleted file mode 100644 index 5812bdf6..00000000 --- a/doc/html/fusion/algorithms.html +++ /dev/null @@ -1,110 +0,0 @@ - - - -Algorithms - - - - - - - - -
- - - - - - -
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
-
-
-PrevUpHomeNext -
-
- - -

- - Lazy Evaluation -

-

- Unlike MPL, Fusion - algorithms are lazy and non sequence-type preserving. What does that mean? - It means that when you operate on a sequence through a Fusion algorithm that - returns a sequence, the sequence returned may not be of the same class as the - original. This is by design. Runtime efficiency is given a high priority. Like - MPL, and unlike - STL, - 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 - reference to the original sequence plus the transform function. Iteration over - 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 -

-

- 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 - functions to convert back to the original sequence type. -

-

- - Header -

-
-#include <boost/fusion/algorithm.hpp>
-
-
- - - -
Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias - Schwinger
-
-
-PrevUpHomeNext -
- - diff --git a/doc/html/fusion/algorithms/concepts.html b/doc/html/fusion/algorithms/concepts.html deleted file mode 100644 index 492017fe..00000000 --- a/doc/html/fusion/algorithms/concepts.html +++ /dev/null @@ -1,41 +0,0 @@ - - - -Concepts - - - - - - - - - - - - - - - -
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
-
-
-PrevUpHomeNext -
- - - - -
Copyright © 2001-2005 Joel de Guzman, Dan Marsden
-
-
-PrevUpHomeNext -
- - diff --git a/doc/html/fusion/algorithms/concepts/poly.html b/doc/html/fusion/algorithms/concepts/poly.html deleted file mode 100644 index cdfddca7..00000000 --- a/doc/html/fusion/algorithms/concepts/poly.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - Polymorphic Function - Object - - - - - - - - - - - - - - - -
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
-
-
-PrevUpHomeNext -
-
- -
- - Description -
-

- A type of function object with a nested metafunction result. - result returns the result - type of calling the function object, given the argument types. -

-
-

Notation

-
-
F
-
- A Polymorphic Function Object type -
-
f
-
- A Polymorphic Function Object -
-
T1 - ...TN
-
- Arbitrary types -
-
t1 - ...tN
-
- Objects with types T1 ...TN -
-
-
-
- - Expression - requirements -
-
----- - - - - - - - - - - -
ExpressionReturn TypeRuntime - Complexity
f(t1, ...tN)F::result<T1, ...TN>::typeUnspecified
-
- - - -
Copyright © 2001-2005 Joel de Guzman, Dan Marsden
-
-
-PrevUpHomeNext -
- - diff --git a/doc/html/fusion/container.html b/doc/html/fusion/container.html new file mode 100644 index 00000000..e3abd0fc --- /dev/null +++ b/doc/html/fusion/container.html @@ -0,0 +1,70 @@ + + + +Container + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ + +

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

+

+ + Header +

+
+#include <boost/fusion/container.hpp>
+#include <boost/fusion/include/container.hpp>
+
+
+ + + +
Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/fusion/container/cons.html b/doc/html/fusion/container/cons.html new file mode 100644 index 00000000..b05acca1 --- /dev/null +++ b/doc/html/fusion/container/cons.html @@ -0,0 +1,320 @@ + + + +cons + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +

+ + 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 + is constructed piecemeal (a data at a time). The runtime cost of access to + each element is peculiarly constant (see Recursive + Inlined Functions). +

+

+ + Header +

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

+ + Synopsis +

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

+ + Template parameters +

+
+++++ + + + + + + + + + + + + + + + + + +
+

+ Parameter +

+
+

+ Description +

+
+

+ Default +

+
+

+ Car +

+
+

+ Head type +

+
+

+

+
+

+ Cdr +

+
+

+ Tail type +

+
+

+ nil +

+
+

+ + Model of +

+ +
+

Notation

+
+
nil
+

+ An empty cons +

+
C
+

+ A cons type +

+
l, + l2
+

+ Instances of cons +

+
car
+

+ An arbitrary data +

+
cdr
+

+ Another cons list +

+
s
+

+ A Forward Sequence +

+
N
+

+ An MPL + Integral Constant +

+
+
+

+ + Expression Semantics +

+

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

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ Expression +

+
+

+ Semantics +

+
+

+ nil() +

+
+

+ Creates an empty list. +

+
+

+ C() +

+
+

+ Creates a cons with default constructed elements. +

+
+

+ 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(s) +

+
+

+ Copy constructs a cons 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. +

+
+ +

+ + 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;
+
+
+ + + +
Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/fusion/sequences/conversion.html b/doc/html/fusion/container/conversion.html similarity index 81% rename from doc/html/fusion/sequences/conversion.html rename to doc/html/fusion/container/conversion.html index 16a57f79..157ab607 100644 --- a/doc/html/fusion/sequences/conversion.html +++ b/doc/html/fusion/container/conversion.html @@ -5,7 +5,7 @@ - + @@ -20,25 +20,25 @@
-PrevUpHomeNext +PrevUpHomeNext

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

-

- - Header +

+ + Header

-#include <boost/fusion/sequence/conversion.hpp>
+#include <boost/fusion/include/convert.hpp>
 
@@ -48,7 +48,7 @@

-PrevUpHomeNext +PrevUpHomeNext
diff --git a/doc/html/fusion/sequences/conversion/functions.html b/doc/html/fusion/container/conversion/functions.html similarity index 97% rename from doc/html/fusion/sequences/conversion/functions.html rename to doc/html/fusion/container/conversion/functions.html index 9f4b7851..4569ee02 100644 --- a/doc/html/fusion/sequences/conversion/functions.html +++ b/doc/html/fusion/container/conversion/functions.html @@ -24,7 +24,7 @@
as_list
as_vector
diff --git a/doc/html/fusion/sequences/conversion/functions/as_list.html b/doc/html/fusion/container/conversion/functions/as_list.html similarity index 77% rename from doc/html/fusion/sequences/conversion/functions/as_list.html rename to doc/html/fusion/container/conversion/functions/as_list.html index 5f215095..59042a58 100644 --- a/doc/html/fusion/sequences/conversion/functions/as_list.html +++ b/doc/html/fusion/container/conversion/functions/as_list.html @@ -24,17 +24,17 @@
+
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template <typename Sequence>
@@ -45,9 +45,9 @@
 typename result_of::as_list<Sequence const>::type
 as_list(Sequence const& seq);
 
-
- - Parameters +
+ + Parameters
@@ -90,9 +90,9 @@
-
- - Expression +
+ + Expression Semantics
@@ -103,18 +103,19 @@
           

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

-
- - Header +
+ + Header
-#include <boost/fusion/sequence/conversion/as_list.hpp>
+#include <boost/fusion/container/list/convert.hpp>
+#include <boost/fusion/include/as_list.hpp>
 
-
- - Example +
+ + Example
 as_list(make_vector('x', 123, "hello"))
diff --git a/doc/html/fusion/sequences/conversion/functions/as_map.html b/doc/html/fusion/container/conversion/functions/as_map.html
similarity index 79%
rename from doc/html/fusion/sequences/conversion/functions/as_map.html
rename to doc/html/fusion/container/conversion/functions/as_map.html
index 01786405..c16dcfb0 100644
--- a/doc/html/fusion/sequences/conversion/functions/as_map.html
+++ b/doc/html/fusion/container/conversion/functions/as_map.html
@@ -24,17 +24,17 @@
 
 
+
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template <typename Sequence>
@@ -45,9 +45,9 @@
 typename result_of::as_map<Sequence const>::type
 as_map(Sequence const& seq);
 
-
- - Parameters +
+ + Parameters
@@ -90,9 +90,9 @@
-
- - Expression +
+ + Expression Semantics
@@ -103,23 +103,24 @@
           

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

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

-
- - Header +
+ + Header
-#include <boost/fusion/sequence/conversion/as_map.hpp>
+#include <boost/fusion/container/map/convert.hpp>
+#include <boost/fusion/include/as_map.hpp>
 
-
- - Example +
+ + Example
 as_map(make_vector(
diff --git a/doc/html/fusion/sequences/conversion/functions/as_set.html b/doc/html/fusion/container/conversion/functions/as_set.html
similarity index 78%
rename from doc/html/fusion/sequences/conversion/functions/as_set.html
rename to doc/html/fusion/container/conversion/functions/as_set.html
index 1c86ca46..e1d02f98 100644
--- a/doc/html/fusion/sequences/conversion/functions/as_set.html
+++ b/doc/html/fusion/container/conversion/functions/as_set.html
@@ -24,17 +24,17 @@
 
 
+
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template <typename Sequence>
@@ -45,9 +45,9 @@
 typename result_of::as_set<Sequence const>::type
 as_set(Sequence const& seq);
 
-
- - Parameters +
+ + Parameters
@@ -90,9 +90,9 @@
-
- - Expression +
+ + Expression Semantics
@@ -103,22 +103,23 @@
           

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

Precondition: There may be no duplicate key types.

-
- - Header +
+ + Header
-#include <boost/fusion/sequence/conversion/as_set.hpp>
+#include <boost/fusion/container/set/convert.hpp>
+#include <boost/fusion/include/as_set.hpp>
 
-
- - Example +
+ + Example
 as_set(make_vector('x', 123, "hello"))
diff --git a/doc/html/fusion/sequences/conversion/functions/as_vector.html b/doc/html/fusion/container/conversion/functions/as_vector.html
similarity index 77%
rename from doc/html/fusion/sequences/conversion/functions/as_vector.html
rename to doc/html/fusion/container/conversion/functions/as_vector.html
index 56a15e55..77ad8717 100644
--- a/doc/html/fusion/sequences/conversion/functions/as_vector.html
+++ b/doc/html/fusion/container/conversion/functions/as_vector.html
@@ -24,17 +24,17 @@
 
 
+
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template <typename Sequence>
@@ -45,9 +45,9 @@
 typename result_of::as_vector<Sequence const>::type
 as_vector(Sequence const& seq);
 
-
- - Parameters +
+ + Parameters
@@ -90,9 +90,9 @@
-
- - Expression +
+ + Expression Semantics
@@ -103,18 +103,19 @@
           

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

-
- - Header +
+ + Header
-#include <boost/fusion/sequence/conversion/as_vector.hpp>
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/include/as_vector.hpp>
 
-
- - Example +
+ + Example
 as_vector(make_list('x', 123, "hello"))
diff --git a/doc/html/fusion/sequences/conversion/metafunctions.html b/doc/html/fusion/container/conversion/metafunctions.html
similarity index 97%
rename from doc/html/fusion/sequences/conversion/metafunctions.html
rename to doc/html/fusion/container/conversion/metafunctions.html
index 52c1c0ae..b3f88c74 100644
--- a/doc/html/fusion/sequences/conversion/metafunctions.html
+++ b/doc/html/fusion/container/conversion/metafunctions.html
@@ -24,7 +24,7 @@
 
 
 
as_list
as_vector
diff --git a/doc/html/fusion/sequences/conversion/metafunctions/as_list.html b/doc/html/fusion/container/conversion/metafunctions/as_list.html similarity index 69% rename from doc/html/fusion/sequences/conversion/metafunctions/as_list.html rename to doc/html/fusion/container/conversion/metafunctions/as_list.html index b3f42288..688a16d0 100644 --- a/doc/html/fusion/sequences/conversion/metafunctions/as_list.html +++ b/doc/html/fusion/container/conversion/metafunctions/as_list.html @@ -24,25 +24,25 @@
+
+ + Description

Returns the result type of as_list.

-
- - Synopsis +
+ + Synopsis
 template <typename Sequence>
 struct as_list;
 
-
- - Parameters +
+ + Parameters
@@ -75,7 +75,7 @@

- A fusion Sequence + A fusion Sequence

@@ -85,35 +85,36 @@
-
- - Expression +
+ + Expression Semantics
 result_of::as_list<Sequence>::type;
 

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

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

-
- - Header +
+ + Header
-#include <boost/fusion/sequence/conversion/as_list.hpp>
+#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/sequences/conversion/metafunctions/as_map.html b/doc/html/fusion/container/conversion/metafunctions/as_map.html similarity index 71% rename from doc/html/fusion/sequences/conversion/metafunctions/as_map.html rename to doc/html/fusion/container/conversion/metafunctions/as_map.html index 9d98539e..eb6c56b9 100644 --- a/doc/html/fusion/sequences/conversion/metafunctions/as_map.html +++ b/doc/html/fusion/container/conversion/metafunctions/as_map.html @@ -7,7 +7,7 @@ - +
@@ -20,29 +20,29 @@

-PrevUpHomeNext +PrevUpHomeNext
+
+ + Description

Returns the result type of as_map.

-
- - Synopsis +
+ + Synopsis
 template <typename Sequence>
 struct as_map;
 
-
- - Parameters +
+ + Parameters
@@ -75,7 +75,7 @@

- A fusion Sequence + A fusion Sequence

@@ -85,40 +85,41 @@
-
- - Expression +
+ + Expression Semantics
 result_of::as_map<Sequence>::type;
 

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

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

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

-
- - Header +
+ + Header
-#include <boost/fusion/sequence/conversion/as_map.hpp>
+#include <boost/fusion/container/map/convert.hpp>
+#include <boost/fusion/include/as_map.hpp>
 
-
- - Example +
+ + Example
-result_of::as_map<vector<
+result_of::as_map<vector<
     fusion::pair<int, char>
   , fusion::pair<double, std::string> > >::type
 
@@ -130,7 +131,7 @@
-PrevUpHomeNext +PrevUpHomeNext
diff --git a/doc/html/fusion/sequences/conversion/metafunctions/as_set.html b/doc/html/fusion/container/conversion/metafunctions/as_set.html similarity index 69% rename from doc/html/fusion/sequences/conversion/metafunctions/as_set.html rename to doc/html/fusion/container/conversion/metafunctions/as_set.html index eb0bc404..c1d71022 100644 --- a/doc/html/fusion/sequences/conversion/metafunctions/as_set.html +++ b/doc/html/fusion/container/conversion/metafunctions/as_set.html @@ -24,25 +24,25 @@ +
+ + Description

Returns the result type of as_set.

-
- - Synopsis +
+ + Synopsis
 template <typename Sequence>
 struct as_set;
 
-
- - Parameters +
+ + Parameters
@@ -75,7 +75,7 @@

- A fusion Sequence + A fusion Sequence

@@ -85,39 +85,40 @@
-
- - Expression +
+ + Expression Semantics
 result_of::as_set<Sequence>::type;
 

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

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

Precondition: There may be no duplicate key types.

-
- - Header +
+ + Header
-#include <boost/fusion/sequence/conversion/as_set.hpp>
+#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/sequences/conversion/metafunctions/as_vector.html b/doc/html/fusion/container/conversion/metafunctions/as_vector.html similarity index 69% rename from doc/html/fusion/sequences/conversion/metafunctions/as_vector.html rename to doc/html/fusion/container/conversion/metafunctions/as_vector.html index 289e9464..df44e0fd 100644 --- a/doc/html/fusion/sequences/conversion/metafunctions/as_vector.html +++ b/doc/html/fusion/container/conversion/metafunctions/as_vector.html @@ -24,25 +24,25 @@ +
+ + Description

Returns the result type of as_vector.

-
- - Synopsis +
+ + Synopsis
 template <typename Sequence>
 struct as_vector;
 
-
- - Parameters +
+ + Parameters
@@ -75,7 +75,7 @@

- A fusion Sequence + A fusion Sequence

@@ -85,35 +85,36 @@
-
- - Expression +
+ + Expression Semantics
 result_of::as_vector<Sequence>::type;
 

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

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

-
- - Header +
+ + Header
-#include <boost/fusion/sequence/conversion/as_vector.hpp>
+#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/sequences/generation.html b/doc/html/fusion/container/generation.html similarity index 51% rename from doc/html/fusion/sequences/generation.html rename to doc/html/fusion/container/generation.html index 78b17c4f..e5cc2e3d 100644 --- a/doc/html/fusion/sequences/generation.html +++ b/doc/html/fusion/container/generation.html @@ -5,8 +5,8 @@ - - + + @@ -20,24 +20,25 @@

-PrevUpHomeNext +PrevUpHomeNext

- These are the functions that you can use to generate various forms of Containers 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/sequence/generation.hpp>
+#include <boost/fusion/container/generation.hpp>
+#include <boost/fusion/include/generation.hpp>
 
@@ -47,7 +48,7 @@

-PrevUpHomeNext +PrevUpHomeNext
diff --git a/doc/html/fusion/sequences/generation/functions.html b/doc/html/fusion/container/generation/functions.html similarity index 98% rename from doc/html/fusion/sequences/generation/functions.html rename to doc/html/fusion/container/generation/functions.html index e9bb2325..6aae9148 100644 --- a/doc/html/fusion/sequences/generation/functions.html +++ b/doc/html/fusion/container/generation/functions.html @@ -24,7 +24,7 @@
make_list
make_cons
diff --git a/doc/html/fusion/sequences/generation/functions/list_tie.html b/doc/html/fusion/container/generation/functions/list_tie.html similarity index 73% rename from doc/html/fusion/sequences/generation/functions/list_tie.html rename to doc/html/fusion/container/generation/functions/list_tie.html index 11fdf647..5bc46124 100644 --- a/doc/html/fusion/sequences/generation/functions/list_tie.html +++ b/doc/html/fusion/container/generation/functions/list_tie.html @@ -24,21 +24,21 @@
+
+ + 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);
 

@@ -52,9 +52,9 @@

 #define FUSION_MAX_LIST_SIZE 20
 
-
- - Parameters +
+ + Parameters
@@ -99,31 +99,32 @@
-
- - 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/sequence/generation/list_tie.hpp>
+#include <boost/fusion/container/generation/list_tie.hpp>
+#include <boost/fusion/include/list_tie.hpp>
 
-
- - Example +
+ + Example
 int i = 123;
diff --git a/doc/html/fusion/sequences/generation/functions/make_cons.html b/doc/html/fusion/container/generation/functions/make_cons.html
similarity index 78%
rename from doc/html/fusion/sequences/generation/functions/make_cons.html
rename to doc/html/fusion/container/generation/functions/make_cons.html
index e537943c..b7062a2a 100644
--- a/doc/html/fusion/sequences/generation/functions/make_cons.html
+++ b/doc/html/fusion/container/generation/functions/make_cons.html
@@ -24,19 +24,19 @@
 
 
+
+ + 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>
@@ -47,9 +47,9 @@
 typename result_of::make_cons<Car, Cdr>::type
 make_cons(Car const& car, Cdr const& cdr);
 
-
- - Parameters +
+ + Parameters
@@ -111,9 +111,9 @@
-
- - Expression +
+ + Expression Semantics
@@ -123,27 +123,28 @@
             Return type: result_of::make_cons<Car, Cdr>::type or result_of::make_cons<Car>::type
           

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

-
- - Header +
+ + Header
-#include <boost/fusion/sequence/generation/make_cons.hpp>
+#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

diff --git a/doc/html/fusion/sequences/generation/functions/make_list.html b/doc/html/fusion/container/generation/functions/make_list.html similarity index 78% rename from doc/html/fusion/sequences/generation/functions/make_list.html rename to doc/html/fusion/container/generation/functions/make_list.html index af4a360d..e2f8d45a 100644 --- a/doc/html/fusion/sequences/generation/functions/make_list.html +++ b/doc/html/fusion/container/generation/functions/make_list.html @@ -24,17 +24,18 @@

+
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template <typename T0, typename T1,... typename TN>
@@ -52,9 +53,9 @@
 
 #define FUSION_MAX_LIST_SIZE 20
 
-
- - Parameters +
+ + Parameters
@@ -99,9 +100,9 @@
-
- - Expression +
+ + Expression Semantics
@@ -111,25 +112,26 @@
             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/sequence/generation/make_list.hpp>
+#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

diff --git a/doc/html/fusion/sequences/generation/functions/make_map.html b/doc/html/fusion/container/generation/functions/make_map.html similarity index 82% rename from doc/html/fusion/sequences/generation/functions/make_map.html rename to doc/html/fusion/container/generation/functions/make_map.html index 455a52e3..6b22db4f 100644 --- a/doc/html/fusion/sequences/generation/functions/make_map.html +++ b/doc/html/fusion/container/generation/functions/make_map.html @@ -24,18 +24,18 @@

+
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template <
@@ -47,7 +47,7 @@
 

The variadic function accepts 0 to FUSION_MAX_VECTOR_SIZE - [10] + [9] 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 @@ -56,9 +56,9 @@

 #define FUSION_MAX_VECTOR_SIZE 20
 
-
- - Parameters +
+ + Parameters
@@ -124,9 +124,9 @@
-
- - Expression +
+ + Expression Semantics
@@ -136,7 +136,7 @@
             Return type: result_of::make_map<K0, K0,... KN, T0, T1,... TN>::type
           

- Semantics: Create a map from K0, K1,... KN + Semantics: Create a map from K0, K1,... KN keys and x0, x1,... xN data. @@ -145,25 +145,26 @@ Precondition: There may be no duplicate key types.

-
- - Header +
+ + Header
-#include <boost/fusion/sequence/generation/make_map.hpp>
+#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"))
 
-
- - See +
+ + See also

@@ -172,7 +173,7 @@



-

[10] +

[9] map is implemented in terms of the vector. That is why we reuse FUSION_MAX_VECTOR_SIZE

diff --git a/doc/html/fusion/sequences/generation/functions/make_set.html b/doc/html/fusion/container/generation/functions/make_set.html similarity index 78% rename from doc/html/fusion/sequences/generation/functions/make_set.html rename to doc/html/fusion/container/generation/functions/make_set.html index 9651d660..4829fb3d 100644 --- a/doc/html/fusion/sequences/generation/functions/make_set.html +++ b/doc/html/fusion/container/generation/functions/make_set.html @@ -24,17 +24,18 @@
+
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template <typename T0, typename T1,... typename TN>
@@ -44,7 +45,7 @@
 

The variadic function accepts 0 to FUSION_MAX_VECTOR_SIZE - [9] + [8] 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 @@ -53,9 +54,9 @@

 #define FUSION_MAX_VECTOR_SIZE 20
 
-
- - Parameters +
+ + Parameters
@@ -100,9 +101,9 @@
-
- - Expression +
+ + Expression Semantics
@@ -112,29 +113,30 @@
             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 key types.

-
- - Header +
+ + Header
-#include <boost/fusion/sequence/generation/make_set.hpp>
+#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

@@ -142,7 +144,7 @@



-

[9] +

[8] set is implemented in terms of the vector. That is why we reuse FUSION_MAX_VECTOR_SIZE

diff --git a/doc/html/fusion/sequences/generation/functions/make_vector.html b/doc/html/fusion/container/generation/functions/make_vector.html similarity index 78% rename from doc/html/fusion/sequences/generation/functions/make_vector.html rename to doc/html/fusion/container/generation/functions/make_vector.html index 5e749791..e59516af 100644 --- a/doc/html/fusion/sequences/generation/functions/make_vector.html +++ b/doc/html/fusion/container/generation/functions/make_vector.html @@ -24,17 +24,18 @@
+
+ + Description

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

-
- - Synopsis +
+ + Synopsis
 template <typename T0, typename T1,... typename TN>
@@ -52,9 +53,9 @@
 
 #define FUSION_MAX_VECTOR_SIZE 20
 
-
- - Parameters +
+ + Parameters
@@ -99,9 +100,9 @@
-
- - Expression +
+ + Expression Semantics
@@ -111,25 +112,26 @@
             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/sequence/generation/make_vector.hpp>
+#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

diff --git a/doc/html/fusion/sequences/generation/functions/map_tie.html b/doc/html/fusion/container/generation/functions/map_tie.html similarity index 70% rename from doc/html/fusion/sequences/generation/functions/map_tie.html rename to doc/html/fusion/container/generation/functions/map_tie.html index 1560fb6a..ee1e9959 100644 --- a/doc/html/fusion/sequences/generation/functions/map_tie.html +++ b/doc/html/fusion/container/generation/functions/map_tie.html @@ -24,21 +24,21 @@

+
+ + 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);
 

@@ -52,9 +52,9 @@

 #define FUSION_MAX_MAP_SIZE 20
 
-
- - Parameters +
+ + Parameters
@@ -121,32 +121,33 @@
-
- - Expression +
+ + Expression Semantics
 map_tie<K0, K1,... KN>(x0, x1,... xN);
 

- Return type: map<pair<K0, D0&>, pair<K1, + 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/sequence/generation/map_tie.hpp>
+#include <boost/fusion/container/generation/map_tie.hpp>
+#include <boost/fusion/include/map_tie.hpp>
 
-
- - Example +
+ + Example
 struct int_key;
diff --git a/doc/html/fusion/sequences/generation/functions/tiers.html b/doc/html/fusion/container/generation/functions/tiers.html
similarity index 83%
rename from doc/html/fusion/sequences/generation/functions/tiers.html
rename to doc/html/fusion/container/generation/functions/tiers.html
index 26fe3901..ffa92797 100644
--- a/doc/html/fusion/sequences/generation/functions/tiers.html
+++ b/doc/html/fusion/container/generation/functions/tiers.html
@@ -24,7 +24,7 @@
 
 
 

Tiers are sequences, where all elements are non-const reference types. They are constructed with a call to a couple of tie @@ -46,10 +46,10 @@

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)) - [11] + 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)) + [10] .

@@ -66,9 +66,9 @@ operation like this is found for example in ML and Python. It is convenient when calling functions which return sequences.

-
- - Ignore +
+ + Ignore

There is also an object called ignore which allows @@ -82,7 +82,7 @@



-

[11] +

[10] see Boost.Ref for details about ref

diff --git a/doc/html/fusion/sequences/generation/functions/vector_tie.html b/doc/html/fusion/container/generation/functions/vector_tie.html similarity index 73% rename from doc/html/fusion/sequences/generation/functions/vector_tie.html rename to doc/html/fusion/container/generation/functions/vector_tie.html index f355a583..a7fb19ab 100644 --- a/doc/html/fusion/sequences/generation/functions/vector_tie.html +++ b/doc/html/fusion/container/generation/functions/vector_tie.html @@ -24,21 +24,21 @@
+
+ + 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);
 

@@ -52,9 +52,9 @@

 #define FUSION_MAX_VECTOR_SIZE 20
 
-
- - Parameters +
+ + Parameters
@@ -99,31 +99,32 @@
-
- - 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/sequence/generation/vector_tie.hpp>
+#include <boost/fusion/container/generation/vector_tie.hpp>
+#include <boost/fusion/include/vector_tie.hpp>
 
-
- - Example +
+ + Example
 int i = 123;
diff --git a/doc/html/fusion/sequences/generation/metafunctions.html b/doc/html/fusion/container/generation/metafunctions.html
similarity index 98%
rename from doc/html/fusion/sequences/generation/metafunctions.html
rename to doc/html/fusion/container/generation/metafunctions.html
index a1372a3a..212178a9 100644
--- a/doc/html/fusion/sequences/generation/metafunctions.html
+++ b/doc/html/fusion/container/generation/metafunctions.html
@@ -24,7 +24,7 @@
 
 
 
make_list
make_cons
diff --git a/doc/html/fusion/sequences/generation/metafunctions/list_tie.html b/doc/html/fusion/container/generation/metafunctions/list_tie.html similarity index 76% rename from doc/html/fusion/sequences/generation/metafunctions/list_tie.html rename to doc/html/fusion/container/generation/metafunctions/list_tie.html index c32664db..af38fc17 100644 --- a/doc/html/fusion/sequences/generation/metafunctions/list_tie.html +++ b/doc/html/fusion/container/generation/metafunctions/list_tie.html @@ -24,17 +24,17 @@
+
+ + Description

Returns the result type of list_tie.

-
- - Synopsis +
+ + Synopsis
 template <typename T0, typename T1,... typename TN>
@@ -51,9 +51,9 @@
 
 #define FUSION_MAX_LIST_SIZE 20
 
-
- - Parameters +
+ + Parameters
@@ -98,31 +98,32 @@
-
- - 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/sequence/generation/list_tie.hpp>
+#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/sequences/generation/metafunctions/make_cons.html b/doc/html/fusion/container/generation/metafunctions/make_cons.html
similarity index 76%
rename from doc/html/fusion/sequences/generation/metafunctions/make_cons.html
rename to doc/html/fusion/container/generation/metafunctions/make_cons.html
index 8bfb8183..ddc0a62e 100644
--- a/doc/html/fusion/sequences/generation/metafunctions/make_cons.html
+++ b/doc/html/fusion/container/generation/metafunctions/make_cons.html
@@ -24,25 +24,25 @@
 
 
+
+ + Description

Returns the result type of make_cons.

-
- - Synopsis +
+ + Synopsis
 template <typename Car, typename Cdr = nil>
 struct make_cons;
 
-
- - Parameters +
+ + Parameters
@@ -104,34 +104,35 @@
-
- - Expression +
+ + Expression Semantics
 result_of::make_cons<Car, Cdr>::type
 

- Return type: A cons with head element, Car, of type converted following the + 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 + Semantics: Create a cons from Car (head) and optional Cdr (tail).

-
- - Header +
+ + Header
-#include <boost/fusion/sequence/generation/make_cons.hpp>
+#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/sequences/generation/metafunctions/make_list.html b/doc/html/fusion/container/generation/metafunctions/make_list.html
similarity index 77%
rename from doc/html/fusion/sequences/generation/metafunctions/make_list.html
rename to doc/html/fusion/container/generation/metafunctions/make_list.html
index c74b05d0..7a8114fc 100644
--- a/doc/html/fusion/sequences/generation/metafunctions/make_list.html
+++ b/doc/html/fusion/container/generation/metafunctions/make_list.html
@@ -24,17 +24,17 @@
 
 
+
+ + Description

Returns the result type of make_list.

-
- - Synopsis +
+ + Synopsis
 template <typename T0, typename T1,... typename TN>
@@ -51,9 +51,9 @@
 
 #define FUSION_MAX_LIST_SIZE 20
 
-
- - Parameters +
+ + Parameters
@@ -98,32 +98,33 @@
-
- - Expression +
+ + Expression Semantics
 result_of::make_list<T0, T1,... TN>::type
 

- Return type: A list with elements of types + 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/sequence/generation/make_list.hpp>
+#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/sequences/generation/metafunctions/make_map.html b/doc/html/fusion/container/generation/metafunctions/make_map.html
similarity index 80%
rename from doc/html/fusion/sequences/generation/metafunctions/make_map.html
rename to doc/html/fusion/container/generation/metafunctions/make_map.html
index a563385b..c4fa9625 100644
--- a/doc/html/fusion/sequences/generation/metafunctions/make_map.html
+++ b/doc/html/fusion/container/generation/metafunctions/make_map.html
@@ -24,17 +24,17 @@
 
 
+
+ + Description

Returns the result type of make_map.

-
- - Synopsis +
+ + Synopsis
 template <
@@ -45,7 +45,7 @@
 

The variadic function accepts 0 to FUSION_MAX_VECTOR_SIZE - [13] + [12] 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 @@ -54,9 +54,9 @@

 #define FUSION_MAX_VECTOR_SIZE 20
 
-
- - Parameters +
+ + Parameters
@@ -122,9 +122,9 @@
-
- - Expression +
+ + Expression Semantics
@@ -134,7 +134,7 @@
             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 + Semantics: A map with fusion::pair elements where the second_type is converted following the rules for element conversion.

@@ -142,23 +142,24 @@ Precondition: There may be no duplicate key types.

-
- - Header +
+ + Header
-#include <boost/fusion/sequence/generation/make_map.hpp>
+#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

@@ -166,7 +167,7 @@



-

[13] +

[12] map is implemented in terms of the vector. That is why we reuse FUSION_MAX_VECTOR_SIZE

diff --git a/doc/html/fusion/sequences/generation/metafunctions/make_set.html b/doc/html/fusion/container/generation/metafunctions/make_set.html similarity index 76% rename from doc/html/fusion/sequences/generation/metafunctions/make_set.html rename to doc/html/fusion/container/generation/metafunctions/make_set.html index a73414fe..c69c4dbc 100644 --- a/doc/html/fusion/sequences/generation/metafunctions/make_set.html +++ b/doc/html/fusion/container/generation/metafunctions/make_set.html @@ -24,17 +24,17 @@
+
+ + Description

Returns the result type of make_set.

-
- - Synopsis +
+ + Synopsis
 template <typename T0, typename T1,... typename TN>
@@ -43,7 +43,7 @@
 

The variadic function accepts 0 to FUSION_MAX_VECTOR_SIZE - [12] + [11] 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 @@ -52,9 +52,9 @@

 #define FUSION_MAX_VECTOR_SIZE 20
 
-
- - Parameters +
+ + Parameters
@@ -99,43 +99,44 @@
-
- - Expression +
+ + Expression Semantics
 result_of::make_set<T0, T1,... TN>::type
 

- Return type: A set with elements of types converted + 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 key types.

-
- - Header +
+ + Header
-#include <boost/fusion/sequence/generation/make_set.hpp>
+#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
 


-

[12] +

[11] set is implemented in terms of the vector. That is why we reuse FUSION_MAX_VECTOR_SIZE

diff --git a/doc/html/fusion/sequences/generation/metafunctions/make_vector.html b/doc/html/fusion/container/generation/metafunctions/make_vector.html similarity index 77% rename from doc/html/fusion/sequences/generation/metafunctions/make_vector.html rename to doc/html/fusion/container/generation/metafunctions/make_vector.html index 31b4b56f..95c0b143 100644 --- a/doc/html/fusion/sequences/generation/metafunctions/make_vector.html +++ b/doc/html/fusion/container/generation/metafunctions/make_vector.html @@ -24,17 +24,17 @@
+
+ + Description

Returns the result type of make_vector.

-
- - Synopsis +
+ + Synopsis
 template <typename T0, typename T1,... typename TN>
@@ -51,9 +51,9 @@
 
 #define FUSION_MAX_VECTOR_SIZE 20
 
-
- - Parameters +
+ + Parameters
@@ -98,32 +98,33 @@
-
- - Expression +
+ + Expression Semantics
 result_of::make_vector<T0, T1,... TN>::type
 

- Return type: A vector with elements of types + 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/sequence/generation/make_list.hpp>
+#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/sequences/generation/metafunctions/map_tie.html b/doc/html/fusion/container/generation/metafunctions/map_tie.html
similarity index 76%
rename from doc/html/fusion/sequences/generation/metafunctions/map_tie.html
rename to doc/html/fusion/container/generation/metafunctions/map_tie.html
index d1276f4c..958bc324 100644
--- a/doc/html/fusion/sequences/generation/metafunctions/map_tie.html
+++ b/doc/html/fusion/container/generation/metafunctions/map_tie.html
@@ -24,17 +24,17 @@
 
 
+
+ + Description

Returns the result type of map_tie.

-
- - Synopsis +
+ + Synopsis
 template <typename K0, typename K1,... typename KN, typename D0, typename D1,... typename DN>
@@ -51,9 +51,9 @@
 
 #define FUSION_MAX_MAP_SIZE 20
 
-
- - Parameters +
+ + Parameters
@@ -119,32 +119,33 @@
-
- - Expression +
+ + Expression Semantics
 result_of::map_tie<K0, K1,... KN, D0, D1,... DN>::type;
 

- Return type: map<pair<K0, D0&>, pair<K1, + 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/sequence/generation/map_tie.hpp>
+#include <boost/fusion/container/generation/map_tie.hpp>
+#include <boost/fusion/include/map_tie.hpp>
 
-
- - Example +
+ + Example
 struct int_key;
diff --git a/doc/html/fusion/sequences/generation/metafunctions/vector_tie.html b/doc/html/fusion/container/generation/metafunctions/vector_tie.html
similarity index 76%
rename from doc/html/fusion/sequences/generation/metafunctions/vector_tie.html
rename to doc/html/fusion/container/generation/metafunctions/vector_tie.html
index 2e1fbf21..02f17a0b 100644
--- a/doc/html/fusion/sequences/generation/metafunctions/vector_tie.html
+++ b/doc/html/fusion/container/generation/metafunctions/vector_tie.html
@@ -24,17 +24,17 @@
 
 
+
+ + Description

Returns the result type of vector_tie.

-
- - Synopsis +
+ + Synopsis
 template <typename T0, typename T1,... typename TN>
@@ -51,9 +51,9 @@
 
 #define FUSION_MAX_VECTOR_SIZE 20
 
-
- - Parameters +
+ + Parameters
@@ -98,31 +98,32 @@
-
- - 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/sequence/generation/vector_tie.hpp>
+#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
new file mode 100644
index 00000000..19821d33
--- /dev/null
+++ b/doc/html/fusion/container/list.html
@@ -0,0 +1,287 @@
+
+
+
+list
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +

+ + Description +

+

+ 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). +

+

+ + 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 +

+
+template <
+    typename T0 = unspecified
+  , typename T1 = unspecified
+  , typename T2 = unspecified
+    ...
+  , typename TN = unspecified
+>
+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. + Example: +

+
+list<int, char, double>
+
+

+ 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 +

+
+++++ + + + + + + + + + + +
+

+ Parameter +

+
+

+ Description +

+
+

+ Default +

+
+

+ T0...TN +

+
+

+ Element types +

+
+

+ unspecified-type +

+
+

+ + Model of +

+ +
+

Notation

+
+
L
+

+ A list type +

+
l
+

+ An instance of list +

+
e0...en
+

+ Heterogeneous values +

+
s
+

+ A Forward Sequence +

+
N
+

+ An MPL + Integral Constant +

+
+
+

+ + Expression Semantics +

+

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

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ Expression +

+
+

+ Semantics +

+
+

+ L() +

+
+

+ Creates a list with default constructed elements. +

+
+

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

+
+

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

+
+

+ L(s) +

+
+

+ Copy constructs a list 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. +

+
+ +

+ + Example +

+
+list<int, float> l(12, 5.5f);
+std::cout << at_c<0>(l) << std::endl;
+std::cout << at_c<1>(l) << std::endl;
+
+
+ + + +
Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/fusion/container/map.html b/doc/html/fusion/container/map.html new file mode 100644 index 00000000..d5a20847 --- /dev/null +++ b/doc/html/fusion/container/map.html @@ -0,0 +1,276 @@ + + + +map + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+

+map

+

+ + Description +

+

+ map is an Associative + Sequence of heteregenous typed data elements. Each element is a key/data + 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). +

+

+ + 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 +

+
+template <
+    typename T0 = unspecified
+  , typename T1 = unspecified
+  , typename T2 = unspecified
+    ...
+  , typename TN = unspecified
+>
+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. + Example: +

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

+ 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 +

+
+++++ + + + + + + + + + + +
+

+ Parameter +

+
+

+ Description +

+
+

+ Default +

+
+

+ T0...TN +

+
+

+ Element types +

+
+

+ unspecified-type +

+
+

+ + Model of +

+ +
+

Notation

+
+
M
+

+ A map type +

+
m
+

+ An instance of map +

+
e0...en
+

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

+
s
+

+ A Forward Sequence +

+
+
+

+ + Expression Semantics +

+

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

+
++++ + + + + + + + + + + + + + + + + + + + + + + +
+

+ Expression +

+
+

+ Semantics +

+
+

+ M() +

+
+

+ Creates a map with default constructed elements. +

+
+

+ 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 +

+
+

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

+
+

+ + Example +

+
+typedef map<
+    pair<int, char>
+  , pair<double, std::string> >
+map_type;
+
+map_type m(
+    make_pair<int>('X')
+  , make_pair<double>("Men"));
+
+std::cout << at_key<int>(m) << std::endl;
+std::cout << at_key<double>(m) << std::endl;
+
+
+ + + +
Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/fusion/container/set.html b/doc/html/fusion/container/set.html new file mode 100644 index 00000000..94c89422 --- /dev/null +++ b/doc/html/fusion/container/set.html @@ -0,0 +1,269 @@ + + + +set + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+

+set

+

+ + Description +

+

+ 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 + Functions). +

+

+ + 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 +

+
+template <
+    typename T0 = unspecified
+  , typename T1 = unspecified
+  , typename T2 = unspecified
+    ...
+  , typename TN = unspecified
+>
+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. + Example: +

+
+set<int, char, double>
+
+

+ 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 +

+
+++++ + + + + + + + + + + +
+

+ Parameter +

+
+

+ Description +

+
+

+ Default +

+
+

+ T0...TN +

+
+

+ Element types +

+
+

+ unspecified-type +

+
+

+ + Model of +

+ +
+

Notation

+
+
S
+

+ A set type +

+
s
+

+ An instance of set +

+
e0...en
+

+ Heterogeneous values +

+
fs
+

+ A Forward Sequence +

+
+
+

+ + Expression Semantics +

+

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

+
++++ + + + + + + + + + + + + + + + + + + + + + + +
+

+ Expression +

+
+

+ Semantics +

+
+

+ S() +

+
+

+ Creates a set with default constructed elements. +

+
+

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

+
+

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

+
+

+ S(fs) +

+
+

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

+
+

+ s = + fs +

+
+

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

+
+

+ + 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;
+
+
+ + + +
Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/fusion/container/vector.html b/doc/html/fusion/container/vector.html new file mode 100644 index 00000000..21d41f10 --- /dev/null +++ b/doc/html/fusion/container/vector.html @@ -0,0 +1,303 @@ + + + +vector + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +

+ + Description +

+

+ 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 + is the simplest of the Fusion sequence container, and in many cases the most + efficient. +

+

+ + Header +

+
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/include/vector.hpp>
+#include <boost/fusion/container/vector/vector_fwd.hpp>
+#include <boost/fusion/include/vector_fwd.hpp>
+
+// numbered forms
+#include <boost/fusion/container/vector/vector10.hpp>
+#include <boost/fusion/include/vector10.hpp>
+#include <boost/fusion/container/vector/vector20.hpp>
+#include <boost/fusion/include/vector20.hpp>
+#include <boost/fusion/container/vector/vector30.hpp>
+#include <boost/fusion/include/vector30.hpp>
+#include <boost/fusion/container/vector/vector40.hpp>
+#include <boost/fusion/include/vector40.hpp>
+#include <boost/fusion/container/vector/vector50.hpp>
+#include <boost/fusion/include/vector50.hpp>
+
+

+ + Synopsis +

+

+ Numbered forms +

+
+template <>
+struct vector0;
+
+template <typename T0>
+struct vector1;
+
+template <typename T0, typename T1>
+struct vector2;
+
+template <typename T0, typename T1, typename T2>
+struct vector3;
+
+...
+
+template <typename T0, typename T1, typename T2..., typename TN>
+struct vectorN;
+
+

+ Variadic form +

+
+template <
+    typename T0 = unspecified
+  , typename T1 = unspecified
+  , typename T2 = unspecified
+    ...
+  , typename TN = unspecified
+>
+struct vector;
+
+

+ The numbered form accepts the exact number of elements. Example: +

+
+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. + Example: +

+
+vector<int, char, double>
+
+

+ 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 +

+
+++++ + + + + + + + + + + +
+

+ Parameter +

+
+

+ Description +

+
+

+ Default +

+
+

+ T0...TN +

+
+

+ Element types +

+
+

+ unspecified +

+
+

+ + Model of +

+ +
+

Notation

+
+
v
+

+ Instance of vector +

+
V
+

+ A vector type +

+
e0...en
+

+ Heterogeneous values +

+
s
+

+ A Forward Sequence +

+
+
+

+ + Expression Semantics +

+

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

+
++++ + + + + + + + + + + + + + + + + + + + + + + +
+

+ Expression +

+
+

+ Semantics +

+
+

+ V() +

+
+

+ Creates a vector with default constructed elements. +

+
+

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

+
+

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

+
+

+ V(s) +

+
+

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

+
+

+ v = + s +

+
+

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

+
+

+ + Example +

+
+vector<int, float> v(12, 5.5f);
+std::cout << at_c<0>(v) << std::endl;
+std::cout << at_c<1>(v) << std::endl;
+
+
+ + + +
Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/fusion/extension.html b/doc/html/fusion/extension.html index 6187ce86..800680f8 100644 --- a/doc/html/fusion/extension.html +++ b/doc/html/fusion/extension.html @@ -6,8 +6,8 @@ - - + + @@ -20,508 +20,21 @@

-PrevUpHomeNext +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 - sequences is entirely provided using the extension mechanism. -

-

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

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

- - Our example -

-

- In order to illustrate enabling a new sequence type for use with Fusion, we - are going to use the type: -

-
-namespace example
-{
-    struct example_struct
-    {
-        std::string name;
-        int age;
-        example_struct(
-            const std::string& n,
-            int a)
-            : name(n), age(a)
-        {}
-    };
-}
-
-

- 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 - Start guide. -

-

- - Enabling Tag Dispatching -

-

- 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: -

-
-namespace example {
-    struct example_sequence_tag; // Only definition needed
-}
-
-

- 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 - for our sequence type. -

-
-#include <boost/fusion/support/tag_of_fwd.hpp>
-
-namespace boost { namespace fusion { namespace traits {        
-    template<>
-    struct tag_of<example_struct>
-    {
-        typedef example::example_sequence_tag type;
-    };
-}}}
-
-

- 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/sequence/adapted/mpl/tag_of.hpp>
-
-

- - 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. -

-
-template<typename Struct, int Pos>
-struct example_struct_iterator
-    : boost::fusion::iterator_base<example_struct_iterator<Struct, Pos> >
-{
-    BOOST_STATIC_ASSERT(Pos >=0 && Pos < 3);
-    typedef Struct struct_type;
-    typedef boost::mpl::int_<Pos> index;
-    typedef boost::fusion::random_access_traversal_tag category;
-
-    example_struct_iterator(Struct& str)
-        : struct_(str) {}
-
-    Struct& struct_;
-};
-
-

- A quick summary of the details of our iterator: -

-
    -
  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 - access to information we will need later in the implementation. -
  4. -
  5. - The typedef category allows - the traits::category_of - metafunction to establish the traversal category of the iterator. -
  6. -
  7. - The constructor stores a reference to the example_struct - being iterated over. -
  8. -
-

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

-

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

-

- - 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 - template for our iterator's tag type. -

-
-template<>
-struct value_of_impl<example::example_struct_iterator_tag>
-{
-    template<typename Iterator>
-    struct apply;
-
-    template<typename Struct>
-    struct apply<example::example_struct_iterator<Struct, 0> >
-    {
-        typedef std::string type;
-    };
-
-    template<typename Struct>
-    struct apply<example::example_struct_iterator<Struct, 1> >
-    {
-        typedef int type;
-    };
-};
-
-

- The implementation itself is pretty simple, it just uses 2 partial specializations - 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: -

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

- 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. -

-
-template<>
-struct deref_impl<example::example_struct_iterator_tag>
-{
-    template<typename Iterator>
-    struct apply;
-
-    template<typename Struct>
-    struct apply<example::example_struct_iterator<Struct, 0> >
-    {
-        typedef typename mpl::if_<
-            is_const<Struct>, std::string const&, std::string&>::type type;
-
-        static type
-        call(example::example_struct_iterator<Struct, 0> const& it)
-        {
-            return it.struct_.name;
-        }
-    };
-
-    template<typename Struct>
-    struct apply<example::example_struct_iterator<Struct, 1> >
-    {
-        typedef typename mpl::if_<
-            is_const<Struct>, int const&, int&>::type type;
-
-        static type
-        call(example::example_struct_iterator<Struct, 1> const& it)
-        {
-                return it.struct_.age;
-            }
-        };
-    };
-}
-
-

- 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
-        : extension::deref_impl<typename detail::tag_of<Iterator>::type>::
-            template apply<Iterator>
-    {};
-}
-
-template <typename Iterator>
-typename result_of::deref<Iterator>::type
-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 - 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 - 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 - 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 - concepts required. The remainder of the process is very repetitive, simply - requiring implementation of a suitable xxxx_impl - for each feature xxxx. -

-

- - Implementing - the remaining iterator functionality -

-

- 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: -

-
-template<>
-struct next_impl<example::example_struct_iterator_tag>
-{
-    template<typename Iterator>
-    struct apply
-    {
-        typedef typename Iterator::struct_type struct_type;
-        typedef typename Iterator::index index;
-        typedef example::example_struct_iterator<struct_type, index::value + 1> type;
-
-        static type
-        call(Iterator const& i)
-        {
-             return type(i.struct_);
-        }
-    };
-};
-
-

- 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 - 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 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 - Access Iterator we will have to implement all of these functions. -

-

- Full implementations of prior_impl, - advance_impl, distance_impl and equal_to_impl - are provided in the example code. -

-

- - 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 - type specialized for our sequence tag: -

-
-template<>
-struct is_sequence_impl<example::example_sequence_tag>
-{
-    template<typename T>
-    struct apply : mpl::true_ {};
-};
-
-

- 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 an - iterator to start accessing the data in our sequence. -

-
-template<>
-struct begin_impl<example::example_sequence_tag>
-{
-    template<typename Sequence>
-    struct apply
-    {
-        typedef example::example_struct_iterator<Sequence, 0> type;
-
-        static type
-        call(Sequence& seq)
-        {
-            return type(seq);
-        }
-    };
-};
-
-

- 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 - in the example code. -

-

- For our Random - Access Sequence we will also need to implement size_impl, - value_at_impl and at_impl. -

-

- - Enabling - our type as an associative container -

-

- 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 - 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. - Our implementation is as follows: -

-
-template<>
-struct at_key_impl<example::example_sequence_tag>
-{
-    template<typename Sequence, typename Key>
-    struct apply;
-
-    template<typename Sequence>
-    struct apply<Sequence, fields::name>
-    {
-        typedef typename mpl::if_<
-            is_const<Sequence>,
-            std::string const&,
-            std::string&>::type type;
-
-        static type
-        call(Sequence& seq)
-        {
-            return seq.name;
-        };
-    };
-
-    template<typename Sequence>
-    struct apply<Sequence, fields::age>
-    {
-        typedef typename mpl::if_<
-            is_const<Sequence>,
-            int const&,
-            int&>::type type;
-
-        static type
-        call(Sequence& seq)
-        {
-            return seq.age;
-        };
-    };
-};
-
-

- Its all very similar to the implementations we've seen previously, such as - 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 - straightforward, and are provided in the example code, along with an implementation - of is_associative_impl. -

-

- - 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. - The implementation was slightly longwinded, but followed a simple repeating - pattern. -

-

- 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. -

+
@@ -530,7 +43,7 @@

-PrevUpHomeNext +PrevUpHomeNext
diff --git a/doc/html/fusion/extension/ext_full.html b/doc/html/fusion/extension/ext_full.html new file mode 100644 index 00000000..22ce3448 --- /dev/null +++ b/doc/html/fusion/extension/ext_full.html @@ -0,0 +1,541 @@ + + + + The Full Extension Mechanism + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+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 + sequences is entirely provided using the extension mechanism. +

+

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

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

+ + Our example +

+

+ In order to illustrate enabling a new sequence type for use with Fusion, + we are going to use the type: +

+
+namespace example
+{
+    struct example_struct
+    {
+        std::string name;
+        int age;
+        example_struct(
+            const std::string& n,
+            int a)
+            : name(n), age(a)
+        {}
+    };
+}
+
+

+ 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 + Start guide. +

+

+ + Enabling + Tag Dispatching +

+

+ 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: +

+
+namespace example {
+    struct example_sequence_tag; // Only definition needed
+}
+
+

+ 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 + for our sequence type. +

+
+#include <boost/fusion/support/tag_of_fwd.hpp>
+#include <boost/fusion/include/tag_of_fwd.hpp>
+
+namespace boost { namespace fusion { namespace traits {
+    template<>
+    struct tag_of<example_struct>
+    {
+        typedef example::example_sequence_tag type;
+    };
+}}}
+
+

+ 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 + 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. +

+
+template<typename Struct, int Pos>
+struct example_struct_iterator
+    : boost::fusion::iterator_base<example_struct_iterator<Struct, Pos> >
+{
+    BOOST_STATIC_ASSERT(Pos >=0 && Pos < 3);
+    typedef Struct struct_type;
+    typedef boost::mpl::int_<Pos> index;
+    typedef boost::fusion::random_access_traversal_tag category;
+
+    example_struct_iterator(Struct& str)
+        : struct_(str) {}
+
+    Struct& struct_;
+};
+
+

+ A quick summary of the details of our iterator: +

+
    +
  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 + access to information we will need later in the implementation. +
  4. +
  5. + The typedef category allows + the traits::category_of + metafunction to establish the traversal category of the iterator. +
  6. +
  7. + The constructor stores a reference to the example_struct + being iterated over. +
  8. +
+

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

+

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

+

+ + 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 + template for our iterator's tag type. +

+
+template<>
+struct value_of_impl<example::example_struct_iterator_tag>
+{
+    template<typename Iterator>
+    struct apply;
+
+    template<typename Struct>
+    struct apply<example::example_struct_iterator<Struct, 0> >
+    {
+        typedef std::string type;
+    };
+
+    template<typename Struct>
+    struct apply<example::example_struct_iterator<Struct, 1> >
+    {
+        typedef int type;
+    };
+};
+
+

+ The implementation itself is pretty simple, it just uses 2 partial specializations + 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: +

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

+ 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. +

+
+template<>
+struct deref_impl<example::example_struct_iterator_tag>
+{
+    template<typename Iterator>
+    struct apply;
+
+    template<typename Struct>
+    struct apply<example::example_struct_iterator<Struct, 0> >
+    {
+        typedef typename mpl::if_<
+            is_const<Struct>, std::string const&, std::string&>::type type;
+
+        static type
+        call(example::example_struct_iterator<Struct, 0> const& it)
+        {
+            return it.struct_.name;
+        }
+    };
+
+    template<typename Struct>
+    struct apply<example::example_struct_iterator<Struct, 1> >
+    {
+        typedef typename mpl::if_<
+            is_const<Struct>, int const&, int&>::type type;
+
+        static type
+        call(example::example_struct_iterator<Struct, 1> const& it)
+        {
+                return it.struct_.age;
+            }
+        };
+    };
+}
+
+

+ 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
+        : extension::deref_impl<typename detail::tag_of<Iterator>::type>::
+            template apply<Iterator>
+    {};
+}
+
+template <typename Iterator>
+typename result_of::deref<Iterator>::type
+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 + 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 + 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 + 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 + concepts required. The remainder of the process is very repetitive, simply + requiring implementation of a suitable xxxx_impl + for each feature xxxx. +

+

+ + Implementing + the remaining iterator functionality +

+

+ 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: +

+
+template<>
+struct next_impl<example::example_struct_iterator_tag>
+{
+    template<typename Iterator>
+    struct apply
+    {
+        typedef typename Iterator::struct_type struct_type;
+        typedef typename Iterator::index index;
+        typedef example::example_struct_iterator<struct_type, index::value + 1> type;
+
+        static type
+        call(Iterator const& i)
+        {
+             return type(i.struct_);
+        }
+    };
+};
+
+

+ 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 + 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 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 + Access Iterator we will have to implement all of these functions. +

+

+ Full implementations of prior_impl, + advance_impl, distance_impl and equal_to_impl + are provided in the example code. +

+

+ + 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 + type specialized for our sequence tag: +

+
+template<>
+struct is_sequence_impl<example::example_sequence_tag>
+{
+    template<typename T>
+    struct apply : mpl::true_ {};
+};
+
+

+ 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 + an iterator to start accessing the data in our sequence. +

+
+template<>
+struct begin_impl<example::example_sequence_tag>
+{
+    template<typename Sequence>
+    struct apply
+    {
+        typedef example::example_struct_iterator<Sequence, 0> type;
+
+        static type
+        call(Sequence& seq)
+        {
+            return type(seq);
+        }
+    };
+};
+
+

+ 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 + in the example code. +

+

+ For our Random + Access Sequence we will also need to implement size_impl, + value_at_impl and at_impl. +

+

+ + Enabling + our type as an associative container +

+

+ 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 + 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. + Our implementation is as follows: +

+
+template<>
+struct at_key_impl<example::example_sequence_tag>
+{
+    template<typename Sequence, typename Key>
+    struct apply;
+
+    template<typename Sequence>
+    struct apply<Sequence, fields::name>
+    {
+        typedef typename mpl::if_<
+            is_const<Sequence>,
+            std::string const&,
+            std::string&>::type type;
+
+        static type
+        call(Sequence& seq)
+        {
+            return seq.name;
+        };
+    };
+
+    template<typename Sequence>
+    struct apply<Sequence, fields::age>
+    {
+        typedef typename mpl::if_<
+            is_const<Sequence>,
+            int const&,
+            int&>::type type;
+
+        static type
+        call(Sequence& seq)
+        {
+            return seq.age;
+        };
+    };
+};
+
+

+ Its all very similar to the implementations we've seen previously, such as + 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 + straightforward, and are provided in the example code, along with an implementation + of is_associative_impl. +

+

+ + 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. + The implementation was slightly longwinded, but followed a simple repeating + pattern. +

+

+ 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. +

+
+ + + +
Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/fusion/extension/iterator_facade.html b/doc/html/fusion/extension/iterator_facade.html new file mode 100644 index 00000000..26e19089 --- /dev/null +++ b/doc/html/fusion/extension/iterator_facade.html @@ -0,0 +1,386 @@ + + + +Iterator Facade + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +

+ + Description +

+

+ The iterator_facade + template provides an intrusive mechanism for producing a conforming Fusion + iterator. +

+

+ + Synopsis +

+
+template<typename Derived, typename TravesalTag>
+struct iterator_facade;
+
+

+ + 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 + parameter. The second template parameter should be the traversal category + of the iterator being implemented. +

+

+ The user must the implement the key expressions required by their iterator + type. +

+
+

Table 1.93. Parameters

+ ++++ + + + + + + + + + + + + + + +
+

+ Name +

+
+

+ Description +

+
+

+ iterator, It, It1, + It2 +

+
+

+ A type derived from iterator_facade +

+
+

+ N +

+
+

+ An MPL + Integral Constant +

+
+
+
+

Table 1.94. Key Expressions

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ Expression +

+
+

+ Result +

+
+

+ Default +

+
+

+ 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 +

+
+

+ None +

+
+

+ iterator::template deref<It>::call(it) +

+
+

+ Dereferences iterator it +

+
+

+ None +

+
+

+ 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 +

+
+

+ None +

+
+

+ 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 +

+
+

+ 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>::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 + Integral Constant +

+
+

+ None +

+
+

+ 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>::call(it1, it2) +

+
+

+ The distance between iterators it1 + and it2 +

+
+

+ boost::same_type<It1, It2>::type() +

+
+
+

+ + Header +

+
+#include <boost/fusion/iterator/iterator_facade.hpp>
+#include <boost/fusion/include/iterator_facade.hpp>
+
+
+ + + +
Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/fusion/extension/macros.html b/doc/html/fusion/extension/macros.html new file mode 100644 index 00000000..f3026949 --- /dev/null +++ b/doc/html/fusion/extension/macros.html @@ -0,0 +1,43 @@ + + + +Macros + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+ + + + +
Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/fusion/extension/macros/adapt_assoc.html b/doc/html/fusion/extension/macros/adapt_assoc.html new file mode 100644 index 00000000..90fcc47c --- /dev/null +++ b/doc/html/fusion/extension/macros/adapt_assoc.html @@ -0,0 +1,123 @@ + + + + BOOST_FUSION_ADAPT_ASSOC_STRUCT + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +
+ + 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 + Sequence. +

+
+ + Synopsis +
+
+BOOST_FUSION_ADAPT_ASSOC_STRUCT(
+    struct_name
+    (member_type0, member_name0, key_type0)
+    (member_type1, member_name1, key_type1)
+    ...
+    )
+
+
+ + Semantics +
+
+BOOST_FUSION_ADAPT_ASSOC_STRUCT(
+    struct_name
+    (member_type0, member_name0, key_type0)
+    (member_type1, member_name1, key_type1)
+    ...
+    )
+
+

+ 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) + 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 + should be the fully namespace qualified name of the struct to be converted. +

+

+ /adapted/struct/adapt_assoc_struct.hpp> +

+
+ + Example +
+
+namespace demo
+{
+    struct employee
+    {
+        std::string name;
+        int age;
+    };
+}
+
+namespace keys
+{
+    struct name;
+    struct age;
+}
+
+// demo::employee is now a Fusion sequence
+// It is also an associative sequence with
+// keys keys::name and keys::age present.
+BOOST_FUSION_ADAPT_ASSOC_STRUCT(
+    demo::employee
+    (std::string, name, keys::name)
+    (int, age, keys::age))
+
+
+ + + +
Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/fusion/extension/macros/adapt_struct.html b/doc/html/fusion/extension/macros/adapt_struct.html new file mode 100644 index 00000000..3bd9a084 --- /dev/null +++ b/doc/html/fusion/extension/macros/adapt_struct.html @@ -0,0 +1,109 @@ + + + + BOOST_FUSION_ADAPT_STRUCT + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +
+ + 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 + Access Sequence. +

+
+ + Synopsis +
+
+BOOST_FUSION_ADAPT_STRUCT(
+    struct_name
+    (member_type0, member_name0)
+    (member_type1, member_name1)
+    ...
+    )
+
+
+ + Semantics +
+
+BOOST_FUSION_ADAPT_STRUCT(
+    struct_name,
+    (member_type0, member_name0)
+    (member_type1, member_name1)
+    ...
+    )
+
+

+ 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 + should be the fully namespace qualified name of the struct to be converted. +

+

+ /adapted/struct/adapt_struct.hpp> +

+
+ + Example +
+
+namespace demo
+{
+    struct employee
+    {
+        std::string name;
+        int age;
+    };
+}
+
+// demo::employee is now a Fusion sequence
+BOOST_FUSION_ADAPT_STRUCT(
+    demo::employee
+    (std::string, name)
+    (int, age))
+
+
+ + + +
Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/fusion/extension/sequence_facade.html b/doc/html/fusion/extension/sequence_facade.html new file mode 100644 index 00000000..2c3c2758 --- /dev/null +++ b/doc/html/fusion/extension/sequence_facade.html @@ -0,0 +1,259 @@ + + + +Sequence Facade + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +

+ + Description +

+

+ The sequence_facade + template provides an intrusive mechanism for producing a conforming Fusion + iterator. +

+

+ + Synopsis +

+
+template<typename Derived, typename TravesalTag, typename IsView = mpl::false_>
+struct sequence_facade;
+
+

+ + Usage +

+

+ 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_ + if the sequence is a view. +

+

+ The user must the implement the key expressions required by their sequence + type. +

+
+

Table 1.91. Parameters

+ ++++ + + + + + + + + + + + + + + +
+

+ Name +

+
+

+ Description +

+
+

+ sequence, Seq +

+
+

+ A type derived from sequence_facade +

+
+

+ N +

+
+

+ An MPL + Integral Constant +

+
+
+
+

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>::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>::call(seq) +

+
+

+ An iterator to the end of sequence 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 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 value_at<Sequence, N>::type +

+
+

+ The type of the Nth + element in a sequence of type Seq +

+
+
+

+ /sequence/sequence_facade.hpp> +

+
+ + + +
Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/fusion/functional.html b/doc/html/fusion/functional.html index be17d634..486f6da1 100644 --- a/doc/html/fusion/functional.html +++ b/doc/html/fusion/functional.html @@ -6,7 +6,7 @@ - + @@ -20,7 +20,7 @@
-PrevUpHomeNext +PrevUpHomeNext

@@ -61,15 +61,11 @@ Components to call functions and function objects and to make Fusion code callable through a function object interface.

-

- - Header -

-
-#include <boost/fusion/functional.hpp>
-
+

+ /functional.hpp> +

- + Fused and unfused forms

@@ -84,7 +80,7 @@

Although the C++ syntax does not allow to replace (a,b,c) - with some Fusion Sequence, introducing + with some Fusion Sequence, introducing yet another function provides a solution:

@@ -106,7 +102,7 @@
       form of f'.
     

- + Calling functions and function objects

@@ -124,7 +120,7 @@ Transforming an unfused function into its fused counterpart allows n-ary calls from an algorithm that invokes an unary Polymorphic - Function Object with Sequence + Function Object with Sequence arguments.

@@ -134,7 +130,7 @@ instance for the given argument.

- + Making Fusion code callable through a function object interface

@@ -159,7 +155,7 @@
-PrevUpHomeNext +PrevUpHomeNext
diff --git a/doc/html/fusion/functional/adapters/fused.html b/doc/html/fusion/functional/adapters/fused.html index 11971f4b..8adc5a42 100644 --- a/doc/html/fusion/functional/adapters/fused.html +++ b/doc/html/fusion/functional/adapters/fused.html @@ -26,7 +26,7 @@
- + Description

@@ -34,7 +34,7 @@ Object">Polymorphic Function Object adapter template for Deferred - Callable Object target functions. It takes a Forward Sequence that contains the arguments for the target function.

@@ -55,15 +55,11 @@ be defined (Boost provides this function for std::auto_ptr and boost::shared_ptr).

-
- - Header -
-
-#include <boost/fusion/functional/adapter/fused.hpp>
-
+

+ /functional/adapter/fused.hpp> +

- + Synopsis
@@ -71,7 +67,7 @@
 class fused;
 
- + Template parameters
@@ -118,7 +114,7 @@
- + Model of
    @@ -144,7 +140,7 @@

    s

    - A Sequence of arguments that + A Sequence of arguments that are accepted by r

    f
    @@ -154,7 +150,7 @@
- + Expression Semantics
@@ -218,15 +214,15 @@
- + Example
 fused< std::plus<long> > f;
-assert(f(make_vector(1,2l)) == 3l);
+assert(f(make_vector(1,2l)) == 3l);
 
- + See also
    diff --git a/doc/html/fusion/functional/adapters/fused_function_object.html b/doc/html/fusion/functional/adapters/fused_function_object.html index 29f32254..17d2e346 100644 --- a/doc/html/fusion/functional/adapters/fused_function_object.html +++ b/doc/html/fusion/functional/adapters/fused_function_object.html @@ -26,7 +26,7 @@
    - + Description

    @@ -34,7 +34,7 @@ Object">Polymorphic Function Object adapter template for a Polymorphic - Function Object target function. It takes a Forward Sequence that contains the arguments for the target function.

    @@ -45,15 +45,11 @@ for an target function object that is const or, if the target function object is held by value, the adapter is const).

    -
    - - Header -
    -
    -#include <boost/fusion/functional/adapter/fused_function_object.hpp>
    -
    +

    + /functional/adapter/fused_function_object.hpp> +

    - + Synopsis
    @@ -61,7 +57,7 @@
     class fused_function_object;
     
    - + Template parameters
    @@ -108,7 +104,7 @@
- + Model of
@@ -135,7 +131,7 @@

s

- A Sequence of arguments that + A Sequence of arguments that are accepted by r

f
@@ -145,7 +141,7 @@
- + Expression Semantics
@@ -209,16 +205,16 @@
- + Example
 template<class SeqOfSeqs, class Func>
-typename result_of::transform< zip_view<SeqOfSeqs> const,
+typename result_of::transform< zip_view<SeqOfSeqs> const,
     fused_function_object<Func const &> >::type
 n_ary_transform(SeqOfSeqs const & s, Func const & f)
 {
-    return transform(zip_view<SeqOfSeqs>(s), 
+    return transform(zip_view<SeqOfSeqs>(s), 
         fused_function_object<Func const &>(f));
 } 
 
@@ -240,14 +236,14 @@
 
 void try_it()
 {
-    vector<int,float> a(2,2.0f);
-    vector<int,float> b(1,1.5f);
-    vector<int,float> c(1,0.5f);
-    assert(c == n_ary_transform(vector_tie(a,b), sub()));
+    vector<int,float> a(2,2.0f);
+    vector<int,float> b(1,1.5f);
+    vector<int,float> c(1,0.5f);
+    assert(c == n_ary_transform(vector_tie(a,b), sub()));
 }
 
- + See also
diff --git a/doc/html/fusion/functional/adapters/fused_procedure.html b/doc/html/fusion/functional/adapters/fused_procedure.html index d8a83368..708cbf35 100644 --- a/doc/html/fusion/functional/adapters/fused_procedure.html +++ b/doc/html/fusion/functional/adapters/fused_procedure.html @@ -26,14 +26,14 @@
- + Description

An unary Polymorphic Function Object adapter template for Callable - Object target functions. It takes a Forward Sequence that contains the arguments for the target function.

@@ -62,15 +62,11 @@ such a pointer without returning anything does not make sense, so this case is not implemented).

-
- - Header -
-
-#include <boost/fusion/functional/adapter/fused_procedure.hpp>
-
+

+ /functional/adapter/fused_procedure.hpp> +

- + Synopsis
@@ -78,7 +74,7 @@
 class fused_procedure;
 
- + Template parameters
@@ -124,7 +120,7 @@
- + Model of
@@ -150,7 +146,7 @@

s

- A Sequence of arguments that + A Sequence of arguments that are accepted by r

f
@@ -160,7 +156,7 @@
- + Expression Semantics
@@ -224,28 +220,28 @@
- + Example
 template<class SequenceOfSequences, class Func>
 void n_ary_for_each(SequenceOfSequences const & s, Func const & f)
 {
-    for_each(zip_view<SequenceOfSequences>(s), 
+    for_each(zip_view<SequenceOfSequences>(s), 
         fused_procedure<Func const &>(f));
 } 
 
 void try_it()
 {
-    vector<int,float> a(2,2.0f);
-    vector<int,float> b(1,1.5f);
+    vector<int,float> a(2,2.0f);
+    vector<int,float> b(1,1.5f);
     using namespace boost::lambda;
-    n_ary_for_each(vector_tie(a,b), _1 -= _2);
-    assert(a == make_vector(1,0.5f));
+    n_ary_for_each(vector_tie(a,b), _1 -= _2);
+    assert(a == make_vector(1,0.5f));
 }
 
- + See also
diff --git a/doc/html/fusion/functional/adapters/unfused_generic.html b/doc/html/fusion/functional/adapters/unfused_generic.html index cb2e3738..011484dc 100644 --- a/doc/html/fusion/functional/adapters/unfused_generic.html +++ b/doc/html/fusion/functional/adapters/unfused_generic.html @@ -26,7 +26,7 @@
- + Description

@@ -35,7 +35,7 @@ Object adapter template for an unary Polymorphic Function Object target function. When called, its arguments are - bundled to a Random Access Sequence of references that is passed to the target function. Non-const LValue arguments are transported as references to non-const, @@ -54,15 +54,11 @@ if the target function object is const - or, in case the target function object is held by value, the adapter is const).

-
- - Header -
-
-#include <boost/fusion/functional/adapter/unfused_generic.hpp>
-
+

+ /functional/adapter/unfused_generic.hpp> +

- + Synopsis
@@ -70,7 +66,7 @@
 class unfused_generic;
 
- + Template parameters
@@ -117,7 +113,7 @@
- + Model of
@@ -158,7 +154,7 @@
- + Expression Semantics
@@ -214,15 +210,15 @@

Calls f with a - Sequence that contains - references to the arguments a0...aN. + Sequence that contains references + to the arguments a0...aN.

- + Example
@@ -273,7 +269,7 @@
 }
 
- + See also
diff --git a/doc/html/fusion/functional/adapters/unfused_lvalue_args.html b/doc/html/fusion/functional/adapters/unfused_lvalue_args.html index af36414c..68a85c6a 100644 --- a/doc/html/fusion/functional/adapters/unfused_lvalue_args.html +++ b/doc/html/fusion/functional/adapters/unfused_lvalue_args.html @@ -26,7 +26,7 @@
- + Description

@@ -35,7 +35,7 @@ Object adapter template for an unary Polymorphic Function Object target function. When called, its arguments are - bundled to a Random Access Sequence of references that is passed to the target function object. Only LValue arguments are accepted. @@ -47,15 +47,11 @@ if the target function object is const - or, in case the target function object is held by value, the adapter is const).

-
- - Header -
-
-#include <boost/fusion/functional/adapter/unfused_lvalue_args.hpp>
-
+

+ /functional/adapter/unfused_lvalue_args.hpp> +

- + Synopsis
@@ -63,7 +59,7 @@
 class unfused_lvalue_args;
 
- + Template parameters
@@ -110,7 +106,7 @@
- + Model of
@@ -151,7 +147,7 @@
- + Expression Semantics
@@ -207,15 +203,15 @@

Calls f with a - Sequence that contains - references to the arguments a0...aN. + Sequence that contains references + to the arguments a0...aN.

- + Example
@@ -230,7 +226,7 @@
     template <class Seq>
     void operator()(Seq const & s) const
     {
-        for_each(s,++boost::lambda::_1);
+        for_each(s,++boost::lambda::_1);
     }
 };
 
@@ -243,7 +239,7 @@
 }
 
- + See also
diff --git a/doc/html/fusion/functional/adapters/unfused_rvalue_args.html b/doc/html/fusion/functional/adapters/unfused_rvalue_args.html index c7a3dedc..211f7bab 100644 --- a/doc/html/fusion/functional/adapters/unfused_rvalue_args.html +++ b/doc/html/fusion/functional/adapters/unfused_rvalue_args.html @@ -26,7 +26,7 @@
- + Description

@@ -35,7 +35,7 @@ Object adapter template for an unary Polymorphic Function Object target function. When called, its arguments are - bundled to a Random Access Sequence of references that is passed to the target function object. All referenced objects in the sequence are const qualified. @@ -47,15 +47,11 @@ if the target function object is const - or, in case the target function object is held by value, the adapter is const).

-
- - Header -
-
-#include <boost/fusion/functional/adapter/unfused_rvalue_args.hpp>
-
+

+ /functional/adapter/unfused_rvalue_args.hpp> +

- + Synopsis
@@ -63,7 +59,7 @@
 class unfused_rvalue_args;
 
- + Template parameters
@@ -110,7 +106,7 @@
- + Model of
@@ -151,7 +147,7 @@
- + Expression Semantics
@@ -207,15 +203,15 @@

Calls f with a - Sequence that contains - references to the arguments a0...aN. + Sequence that contains references + to the arguments a0...aN.

- + Example
@@ -241,7 +237,7 @@
 }
 
- + See also
diff --git a/doc/html/fusion/functional/adapters/unfused_typed.html b/doc/html/fusion/functional/adapters/unfused_typed.html index 22c18ac2..b2d88b7b 100644 --- a/doc/html/fusion/functional/adapters/unfused_typed.html +++ b/doc/html/fusion/functional/adapters/unfused_typed.html @@ -26,7 +26,7 @@
- + Description

@@ -35,13 +35,13 @@ Object adapter template for an unary Polymorphic Function Object target function. When called, its arguments are - bundled to a Random Access Sequence that is passed to the target function object.

The call operators of esulting function objects are strictly typed (in - other words, non-templatized) with the types from a Sequence. + other words, non-templatized) with the types from a Sequence.

The type of the target function is allowed to be const qualified or a reference. @@ -61,15 +61,11 @@ non-reference elements, the element is copied only once - the call operator's signature is optimized automatically to avoid by-value parameters.

-
- - Header -
-
-#include <boost/fusion/functional/adapter/unfused_typed.hpp>
-
+

+ /functional/adapter/unfused_typed.hpp> +

- + Synopsis
@@ -77,7 +73,7 @@
 class unfused_typed;
 
- + Template parameters
@@ -131,7 +127,7 @@

- A Sequence + A Sequence

@@ -142,7 +138,7 @@
- + Model of
@@ -169,7 +165,7 @@

S

- A Sequence of parameter types + A Sequence of parameter types

UT

@@ -188,7 +184,7 @@

- + Expression Semantics
@@ -254,7 +250,7 @@
- + Example
@@ -323,7 +319,7 @@
 }
 
- + See also
    diff --git a/doc/html/fusion/functional/concepts/callable.html b/doc/html/fusion/functional/concepts/callable.html index 7173fa39..6239a1f2 100644 --- a/doc/html/fusion/functional/concepts/callable.html +++ b/doc/html/fusion/functional/concepts/callable.html @@ -27,7 +27,7 @@
    - + Description

    @@ -36,7 +36,7 @@ of a function call operator.

    - + Models
      @@ -50,6 +50,22 @@ all kinds of function objects
    +
    + + Examples +
    +
    +& a_free_function
    +& a_class::a_static_member_function
    +& a_class::a_nonstatic_data_member
    +& a_class::a_nonstatic_member_function
    +std::less<int>()
    +// using namespace boost;
    +bind(std::less<int>(), _1, 5)
    +lambda::_1 += lambda::_2;
    +fusion::make_fused_function_object(std::less<int>())
    +
diff --git a/doc/html/fusion/functional/concepts/def_callable.html b/doc/html/fusion/functional/concepts/def_callable.html index 3b1dcfea..33703f5a 100644 --- a/doc/html/fusion/functional/concepts/def_callable.html +++ b/doc/html/fusion/functional/concepts/def_callable.html @@ -31,7 +31,7 @@ Callable Object"> Deferred Callable Object
- + Description

@@ -40,7 +40,7 @@ to determine the result of a call.

- + Refinement of
@@ -81,7 +81,7 @@
- + Expression requirements
@@ -119,7 +119,7 @@
- + Models
    @@ -132,6 +132,22 @@ member (function or data) pointer types
+
+ + Examples +
+
+& a_free_function
+& a_class::a_static_member_function
+& a_class::a_nonstatic_data_member
+& a_class::a_nonstatic_member_function
+std::less<int>()
+// using namespace boost;
+bind(std::less<int>(), _1, 5)
+// Note: Boost.Lambda expressions don't work with __boost_result_of__
+fusion::make_fused_function_object(std::less<int>())
+
diff --git a/doc/html/fusion/functional/concepts/poly.html b/doc/html/fusion/functional/concepts/poly.html index 51d40c94..261caaa3 100644 --- a/doc/html/fusion/functional/concepts/poly.html +++ b/doc/html/fusion/functional/concepts/poly.html @@ -30,7 +30,7 @@ Object"> Polymorphic Function Object
- + Description

@@ -39,7 +39,7 @@ Callable Object type.

- + Refinement of
@@ -83,7 +83,7 @@
- + Expression requirements
@@ -132,7 +132,7 @@
- + Models
+
+ + Examples +
+
+& a_free_function
+& a_class::a_static_member_function
+std::less<int>()
+// using namespace boost;
+bind(std::less<int>(), _1, 5)
+// Note: Boost.Lambda expressions don't work with __boost_result_of__
+fusion::make_fused_function_object(std::less<int>())
+
diff --git a/doc/html/fusion/functional/concepts/reg_callable.html b/doc/html/fusion/functional/concepts/reg_callable.html index 9c77799e..e8d9b4f9 100644 --- a/doc/html/fusion/functional/concepts/reg_callable.html +++ b/doc/html/fusion/functional/concepts/reg_callable.html @@ -30,7 +30,7 @@ Object"> Regular Callable Object
- + Description

@@ -39,7 +39,7 @@ can appear immediately to the left of a function call operator.

- + Refinement of
@@ -69,7 +69,7 @@
- + Expression requirements
@@ -116,7 +116,7 @@
- + Models
    @@ -127,6 +127,20 @@ all kinds of function objects
+
+ + Examples +
+
+& a_free_function
+& a_class::a_static_member_function
+std::less<int>()
+// using namespace boost;
+bind(std::less<int>(), _1, 5)
+lambda::_1 += lambda::_2;
+fusion::make_fused_function_object(std::less<int>())
+
diff --git a/doc/html/fusion/functional/generation/functions/mk_fused.html b/doc/html/fusion/functional/generation/functions/mk_fused.html index 90d094bd..3dff9543 100644 --- a/doc/html/fusion/functional/generation/functions/mk_fused.html +++ b/doc/html/fusion/functional/generation/functions/mk_fused.html @@ -30,7 +30,7 @@ make_fused"> make_fused
- + Description

@@ -40,7 +40,7 @@ conversion is applied to the target function.

- + Synopsis
@@ -50,7 +50,7 @@
 make_fused(F const & f);
 
- + Parameters
@@ -97,7 +97,7 @@
- + Expression Semantics
@@ -111,14 +111,15 @@ Semantics: Returns a fused adapter for f.

- + Header
 #include <boost/fusion/functional/generation/make_fused.hpp>
+#include <boost/fusion/include/make_fused.hpp>
 
- + Example
@@ -126,15 +127,15 @@
 
 void try_it()
 {
-    vector<int,float> a(2,2.0f);
-    vector<int,float> b(1,1.5f);
-    vector<float,float> c(1.0f,0.5f);
-    assert(c == transform(zip(a,b), make_fused(& sub)));
-    assert(c == transform(zip(a,b), make_fused(std::minus<float>())));
+    vector<int,float> a(2,2.0f);
+    vector<int,float> b(1,1.5f);
+    vector<float,float> c(1.0f,0.5f);
+    assert(c == transform(zip(a,b), make_fused(& sub)));
+    assert(c == transform(zip(a,b), make_fused(std::minus<float>())));
 }
 
- + See also
diff --git a/doc/html/fusion/functional/generation/functions/mk_fused_fobj.html b/doc/html/fusion/functional/generation/functions/mk_fused_fobj.html index ce3e0273..438ea1c3 100644 --- a/doc/html/fusion/functional/generation/functions/mk_fused_fobj.html +++ b/doc/html/fusion/functional/generation/functions/mk_fused_fobj.html @@ -31,7 +31,7 @@ make_fused_function_object"> make_fused_function_object
- + Description

@@ -42,7 +42,7 @@ conversion is applied to the target function.

- + Synopsis
@@ -52,7 +52,7 @@
 make_fused_function_object(F const & f);
 
- + Parameters
@@ -99,7 +99,7 @@
- + Expression Semantics
@@ -114,14 +114,15 @@ for f.

- + Header
 #include <boost/fusion/functional/generation/make_fused_function_object.hpp>
+#include <boost/fusion/include/make_fused_function_object.hpp>
 
- + Example
@@ -143,14 +144,14 @@
 
 void try_it()
 {
-    vector<int,float> a(2,2.0f);
-    vector<int,float> b(1,1.5f);
-    vector<int,float> c(1,0.5f);
-    assert(c == transform(zip(a,b), make_fused_function_object(sub())));
+    vector<int,float> a(2,2.0f);
+    vector<int,float> b(1,1.5f);
+    vector<int,float> c(1,0.5f);
+    assert(c == transform(zip(a,b), make_fused_function_object(sub())));
 }
 
- + See also
diff --git a/doc/html/fusion/functional/generation/functions/mk_fused_proc.html b/doc/html/fusion/functional/generation/functions/mk_fused_proc.html index 595d4989..6b29ba3a 100644 --- a/doc/html/fusion/functional/generation/functions/mk_fused_proc.html +++ b/doc/html/fusion/functional/generation/functions/mk_fused_proc.html @@ -31,7 +31,7 @@ make_fused_procedure"> make_fused_procedure
- + Description

@@ -42,7 +42,7 @@ conversion applied to the target function.

- + Synopsis
@@ -52,7 +52,7 @@
 make_fused_procedure(F const & f);
 
- + Parameters
@@ -98,7 +98,7 @@
- + Expression Semantics
@@ -113,24 +113,25 @@ f.

- + Header
 #include <boost/fusion/functional/generation/make_fused_procedure.hpp>
+#include <boost/fusion/include/make_fused_procedure.hpp>
 
- + 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 also
diff --git a/doc/html/fusion/functional/generation/functions/mk_unfused_genrc.html b/doc/html/fusion/functional/generation/functions/mk_unfused_genrc.html index 80bbc223..ed1f393c 100644 --- a/doc/html/fusion/functional/generation/functions/mk_unfused_genrc.html +++ b/doc/html/fusion/functional/generation/functions/mk_unfused_genrc.html @@ -31,7 +31,7 @@ make_unfused_generic"> make_unfused_generic
- + Description

@@ -42,7 +42,7 @@ conversion is applied to the target function.

- + Synopsis
@@ -52,7 +52,7 @@
 make_unfused_generic(F const & f);
 
- + Parameters
@@ -99,7 +99,7 @@
- + Expression Semantics
@@ -114,14 +114,15 @@ f.

- + Header
 #include <boost/fusion/functional/generation/make_unfused_generic.hpp>
+#include <boost/fusion/include/make_unfused_generic.hpp>
 
- + Example
@@ -157,7 +158,7 @@
 }
 
- + See also
diff --git a/doc/html/fusion/functional/generation/functions/mk_unfused_lvargs.html b/doc/html/fusion/functional/generation/functions/mk_unfused_lvargs.html index 52a2e9ab..9cc64b2f 100644 --- a/doc/html/fusion/functional/generation/functions/mk_unfused_lvargs.html +++ b/doc/html/fusion/functional/generation/functions/mk_unfused_lvargs.html @@ -31,7 +31,7 @@ make_unfused_lvalue_args"> make_unfused_lvalue_args
- + Description

@@ -42,7 +42,7 @@ conversion is applied to the target function.

- + Synopsis
@@ -52,7 +52,7 @@
 make_unfused_lvalue_args(F const & f);
 
- + Parameters
@@ -99,7 +99,7 @@
- + Expression Semantics
@@ -114,14 +114,15 @@ for f.

- + Header
 #include <boost/fusion/functional/generation/make_unfused_lvalue_args.hpp>
+#include <boost/fusion/include/make_unfused_lvalue_args.hpp>
 
- + Example
@@ -136,7 +137,7 @@
     template <class Seq>
     void operator()(Seq const & s) const
     {
-        for_each(s,++boost::lambda::_1);
+        for_each(s,++boost::lambda::_1);
     }
 };
 
@@ -148,7 +149,7 @@
 }
 
- + See also
diff --git a/doc/html/fusion/functional/generation/functions/mk_unfused_rvargs.html b/doc/html/fusion/functional/generation/functions/mk_unfused_rvargs.html index 81f544ec..79dbaa86 100644 --- a/doc/html/fusion/functional/generation/functions/mk_unfused_rvargs.html +++ b/doc/html/fusion/functional/generation/functions/mk_unfused_rvargs.html @@ -30,7 +30,7 @@ make_unfused_rvalue_args"> make_unfused_rvalue_args
- + Description

@@ -41,7 +41,7 @@ conversion is applied to the target function.

- + Synopsis
@@ -51,7 +51,7 @@
 make_unfused_rvalue_args(F const & f);
 
- + Parameters
@@ -98,7 +98,7 @@
- + Expression Semantics
@@ -113,14 +113,15 @@ for f.

- + Header
 #include <boost/fusion/functional/generation/make_unfused_rvalue_args.hpp>
+#include <boost/fusion/include/make_unfused_rvalue_args.hpp>
 
- + Example
@@ -146,7 +147,7 @@
 }
 
- + See also
diff --git a/doc/html/fusion/functional/generation/metafunctions/mk_fused.html b/doc/html/fusion/functional/generation/metafunctions/mk_fused.html index 783bf3f4..3a49884c 100644 --- a/doc/html/fusion/functional/generation/metafunctions/mk_fused.html +++ b/doc/html/fusion/functional/generation/metafunctions/mk_fused.html @@ -30,7 +30,7 @@ make_fused"> make_fused
- + Description

@@ -38,14 +38,15 @@ make_fused">make_fused.

- + Header
 #include <boost/fusion/functional/generation/make_fused.hpp>
+#include <boost/fusion/include/make_fused.hpp>
 
- + Synopsis
@@ -59,7 +60,7 @@
 }
 
- + 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 dc086afa..5a5e45f9 100644 --- a/doc/html/fusion/functional/generation/metafunctions/mk_fused_fobj.html +++ b/doc/html/fusion/functional/generation/metafunctions/mk_fused_fobj.html @@ -31,7 +31,7 @@ make_fused_function_object"> make_fused_function_object
- + Description

@@ -39,14 +39,15 @@ make_fused_function_object">make_fused_function_object.

- + Header
 #include <boost/fusion/functional/generation/make_fused_function_object.hpp>
+#include <boost/fusion/include/make_fused_function_object.hpp>
 
- + Synopsis
@@ -60,7 +61,7 @@
 }
 
- + 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 311b2e53..18702724 100644 --- a/doc/html/fusion/functional/generation/metafunctions/mk_fused_proc.html +++ b/doc/html/fusion/functional/generation/metafunctions/mk_fused_proc.html @@ -31,7 +31,7 @@ make_fused_procedure"> make_fused_procedure
- + Description

@@ -39,14 +39,15 @@ make_fused_procedure">make_fused_procedure.

- + Header
 #include <boost/fusion/functional/generation/make_fused_procedure.hpp>
+#include <boost/fusion/include/make_fused_procedure.hpp>
 
- + Synopsis
@@ -60,7 +61,7 @@
 }
 
- + See also
diff --git a/doc/html/fusion/functional/generation/metafunctions/mk_unfused_genrc.html b/doc/html/fusion/functional/generation/metafunctions/mk_unfused_genrc.html index 22902a51..db280432 100644 --- a/doc/html/fusion/functional/generation/metafunctions/mk_unfused_genrc.html +++ b/doc/html/fusion/functional/generation/metafunctions/mk_unfused_genrc.html @@ -31,7 +31,7 @@ make_unfused_generic"> make_unfused_generic
- + Description

@@ -39,14 +39,15 @@ make_unfused_generic">make_unfused_generic.

- + Header
 #include <boost/fusion/functional/generation/make_unfused_generic.hpp>
+#include <boost/fusion/include/make_unfused_generic.hpp>
 
- + Synopsis
@@ -60,7 +61,7 @@
 }
 
- + See also
diff --git a/doc/html/fusion/functional/generation/metafunctions/mk_unfused_lvargs.html b/doc/html/fusion/functional/generation/metafunctions/mk_unfused_lvargs.html index e4f19295..33c837ce 100644 --- a/doc/html/fusion/functional/generation/metafunctions/mk_unfused_lvargs.html +++ b/doc/html/fusion/functional/generation/metafunctions/mk_unfused_lvargs.html @@ -31,7 +31,7 @@ make_unfused_lvalue_args"> make_unfused_lvalue_args
- + Description

@@ -39,14 +39,15 @@ make_unfused_lvalue_args">make_unfused_lvalue_args.

- + Header
 #include <boost/fusion/functional/generation/make_unfused_lvalue_args.hpp>
+#include <boost/fusion/include/make_unfused_lvalue_args.hpp>
 
- + Synopsis
@@ -60,7 +61,7 @@
 }
 
- + See also
diff --git a/doc/html/fusion/functional/generation/metafunctions/mk_unfused_rvargs.html b/doc/html/fusion/functional/generation/metafunctions/mk_unfused_rvargs.html index ea4497e6..0b72d392 100644 --- a/doc/html/fusion/functional/generation/metafunctions/mk_unfused_rvargs.html +++ b/doc/html/fusion/functional/generation/metafunctions/mk_unfused_rvargs.html @@ -30,7 +30,7 @@ make_unfused_rvalue_args"> make_unfused_rvalue_args
- + Description

@@ -38,14 +38,15 @@ make_unfused_rvalue_args">make_unfused_rvalue_args.

- + Header
 #include <boost/fusion/functional/generation/make_unfused_rvalue_args.hpp>
+#include <boost/fusion/include/make_unfused_rvalue_args.hpp>
 
- + Synopsis
@@ -59,7 +60,7 @@
 }
 
- + See also
diff --git a/doc/html/fusion/functional/invocation/functions/invoke.html b/doc/html/fusion/functional/invocation/functions/invoke.html index 8c5f16a7..d32d0899 100644 --- a/doc/html/fusion/functional/invocation/functions/invoke.html +++ b/doc/html/fusion/functional/invocation/functions/invoke.html @@ -27,13 +27,13 @@
- + Description

Calls a Deferred - Callable Object with the arguments from a Sequence. + Callable Object with the arguments from a Sequence.

The first template parameter can be specialized explicitly to avoid copying @@ -47,7 +47,7 @@ and boost::shared_ptr).

- + Synopsis
@@ -66,7 +66,7 @@
 invoke(Function f, Sequence const & s);
 
- + Parameters
@@ -120,7 +120,7 @@

- A Forward Sequence

@@ -134,7 +134,7 @@
- + Expression Semantics
@@ -150,23 +150,19 @@ with the elements in s as arguments and returns the result of the call expression.

-
- - Header -
-
-#include <boost/fusion/functional/invocation/invoke.hpp>
-
+

+ /functional/invocation/invoke.hpp> +

- + Example
 std::plus<int> add;
-assert(invoke(add,make_vector(1,1)) == 2);
+assert(invoke(add,make_vector(1,1)) == 2);
 
- + 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 6df89ed8..8fa42256 100644 --- a/doc/html/fusion/functional/invocation/functions/invoke_fobj.html +++ b/doc/html/fusion/functional/invocation/functions/invoke_fobj.html @@ -30,20 +30,20 @@ invoke_function_object"> invoke_function_object
- + Description

Calls a Polymorphic Function - Object with the arguments from a Sequence. + Object with the arguments from a Sequence.

The first template parameter can be specialized explicitly to avoid copying and/or to control the const qualification of a function object.

- + Synopsis
@@ -64,7 +64,7 @@
 invoke_function_object(Function f, Sequence const & s);
 
- + Parameters
@@ -118,7 +118,7 @@

- Model of Forward Sequence

@@ -132,7 +132,7 @@
- + Expression Semantics
@@ -148,15 +148,11 @@ with the elements in s as arguments and returns the result of the call expression.

-
- - Header -
-
-#include <boost/fusion/functional/invocation/invoke_function_object.hpp>
-
+

+ /functional/invocation/invoke_function_object.hpp> +

- + Example
@@ -179,11 +175,11 @@
 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 also
diff --git a/doc/html/fusion/functional/invocation/functions/invoke_proc.html b/doc/html/fusion/functional/invocation/functions/invoke_proc.html index aa841307..55011fab 100644 --- a/doc/html/fusion/functional/invocation/functions/invoke_proc.html +++ b/doc/html/fusion/functional/invocation/functions/invoke_proc.html @@ -30,12 +30,12 @@ invoke_procedure"> invoke_procedure
- + Description

Calls a Callable - Object with the arguments from a Sequence. + Object with the arguments from a Sequence. The result of the call is ignored.

@@ -54,7 +54,7 @@ isn't implemented).

- + Synopsis
@@ -75,7 +75,7 @@
 invoke_procedure(Function f, Sequence const & s);
 
- + Parameters
@@ -128,7 +128,7 @@

- Model of Forward Sequence

@@ -142,7 +142,7 @@
- + Expression Semantics
@@ -157,25 +157,21 @@ with the elements in s as arguments.

-
- - Header -
-
-#include <boost/fusion/functional/invocation/invoke_procedure.hpp>
-
+

+ /functional/invocation/invoke_procedure.hpp> +

- + 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 also
diff --git a/doc/html/fusion/functional/invocation/metafunctions/invoke.html b/doc/html/fusion/functional/invocation/metafunctions/invoke.html index b50b8089..5dd99ad4 100644 --- a/doc/html/fusion/functional/invocation/metafunctions/invoke.html +++ b/doc/html/fusion/functional/invocation/metafunctions/invoke.html @@ -27,14 +27,14 @@
- + Description

Returns the result type of invoke.

- + Synopsis
@@ -51,7 +51,7 @@
 }
 
- + 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 e1e7a2a4..ea4cdaa9 100644 --- a/doc/html/fusion/functional/invocation/metafunctions/invoke_fobj.html +++ b/doc/html/fusion/functional/invocation/metafunctions/invoke_fobj.html @@ -30,7 +30,7 @@ invoke_function_object"> invoke_function_object
- + Description

@@ -38,7 +38,7 @@ invoke_function_object">invoke_function_object.

- + Synopsis
@@ -55,7 +55,7 @@
 }
 
- + 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 cf9a65ef..797b23fe 100644 --- a/doc/html/fusion/functional/invocation/metafunctions/invoke_proc.html +++ b/doc/html/fusion/functional/invocation/metafunctions/invoke_proc.html @@ -30,7 +30,7 @@ invoke_procedure"> invoke_procedure
- + Description

@@ -38,7 +38,7 @@ invoke_procedure">invoke_procedure.

- + Synopsis
@@ -55,7 +55,7 @@
 }
 
- + See also
diff --git a/doc/html/fusion/introduction.html b/doc/html/fusion/introduction.html index ec7fdb70..862f34e1 100644 --- a/doc/html/fusion/introduction.html +++ b/doc/html/fusion/introduction.html @@ -89,21 +89,21 @@ 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 + 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: + 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 diff --git a/doc/html/fusion/iterator.html b/doc/html/fusion/iterator.html new file mode 100644 index 00000000..328e04a3 --- /dev/null +++ b/doc/html/fusion/iterator.html @@ -0,0 +1,90 @@ + + + +Iterator + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+


+
+PrevUpHomeNext +
+
+ + +

+ Like MPL and + STL, + iterators are a fundamental concept in Fusion. As with MPL + and STL + iterators describe positions, and provide access to data within an underlying + Sequence. +

+

+ /iterator.hpp> +

+
+ + + +
Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/fusion/iterators/concepts.html b/doc/html/fusion/iterator/concepts.html similarity index 69% rename from doc/html/fusion/iterators/concepts.html rename to doc/html/fusion/iterator/concepts.html index 2ec27b7e..df9d66eb 100644 --- a/doc/html/fusion/iterators/concepts.html +++ b/doc/html/fusion/iterator/concepts.html @@ -5,8 +5,8 @@ - - + + @@ -21,11 +21,11 @@
-PrevUpHomeNext +PrevUpHomeNext
Forward Iterator
@@ -55,7 +55,7 @@
-PrevUpHomeNext +PrevUpHomeNext
diff --git a/doc/html/fusion/iterators/concepts/bidirectional_iterator.html b/doc/html/fusion/iterator/concepts/bidirectional_iterator.html similarity index 75% rename from doc/html/fusion/iterators/concepts/bidirectional_iterator.html rename to doc/html/fusion/iterator/concepts/bidirectional_iterator.html index d0331405..90e340d5 100644 --- a/doc/html/fusion/iterators/concepts/bidirectional_iterator.html +++ b/doc/html/fusion/iterator/concepts/bidirectional_iterator.html @@ -27,15 +27,15 @@
-
- - Description +
+ + Description

- A Bidirectional Iterator traverses a Sequence + A Bidirectional Iterator traverses a Sequence allowing movement in either direction one element at a time.

@@ -60,18 +60,18 @@

-
- - Refinement +
+ + Refinement of

Forward Iterator

-
- - Expression +
+ + Expression requirements

@@ -181,9 +181,9 @@ -

- - Meta +
+ + Meta Expressions
@@ -216,9 +216,9 @@
-
- - Expression +
+ + Expression Semantics

@@ -257,9 +257,9 @@ -

- - Invariants +
+ + Invariants

In addition to the invariants of

-
- - Models +
+ + Models
diff --git a/doc/html/fusion/iterators/concepts/forward_iterator.html b/doc/html/fusion/iterator/concepts/forward_iterator.html similarity index 86% rename from doc/html/fusion/iterators/concepts/forward_iterator.html rename to doc/html/fusion/iterator/concepts/forward_iterator.html index 428c454e..0ae2ba30 100644 --- a/doc/html/fusion/iterators/concepts/forward_iterator.html +++ b/doc/html/fusion/iterator/concepts/forward_iterator.html @@ -26,15 +26,15 @@
-
- - Description +
+ + Description

- A Forward Iterator traverses a Sequence + A Forward Iterator traverses a Sequence allowing movement in only one direction through it's elements, one element at a time.

@@ -62,9 +62,9 @@

-
- - Expression +
+ + Expression requirements

@@ -243,9 +243,9 @@

-
- - Meta +
+ + Meta Expressions
@@ -354,9 +354,9 @@
-
- - Expression +
+ + Expression Semantics
@@ -480,9 +480,9 @@
-
- - Invariants +
+ + Invariants

The following invariants always hold: @@ -497,69 +497,68 @@ sequence will never return to a previously seen position

  • -deref(i) - is equivalent to *i +deref(i) is equivalent to *i
  • If i == j then *i is equivalent to *j
  • -
    - - Models +
    + + Models
    diff --git a/doc/html/fusion/iterators/concepts/random_access_iterator.html b/doc/html/fusion/iterator/concepts/random_access_iterator.html similarity index 80% rename from doc/html/fusion/iterators/concepts/random_access_iterator.html rename to doc/html/fusion/iterator/concepts/random_access_iterator.html index ce0ebfe2..88f8c83e 100644 --- a/doc/html/fusion/iterators/concepts/random_access_iterator.html +++ b/doc/html/fusion/iterator/concepts/random_access_iterator.html @@ -26,15 +26,15 @@
    -
    - - Description +
    + + Description

    - A Random Access Iterator traverses a Sequence + A Random Access Iterator traverses a Sequence moving in either direction, permitting efficient arbitrary distance movements back and forward through the sequence.

    @@ -62,9 +62,9 @@

    -
    - - Refinement +
    + + Refinement of

    @@ -72,9 +72,9 @@ Iterator">Bidirectional Iterator

    -
    - - Expression +
    + + Expression requirements

    @@ -184,9 +184,9 @@ -

    - - Meta +
    + + Meta Expressions
    @@ -247,38 +247,38 @@
    -
    - - Models +
    + + Models
    deref
    next
    @@ -47,7 +47,7 @@
    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/fusion/iterators/functions/advance.html b/doc/html/fusion/iterator/functions/advance.html similarity index 74% rename from doc/html/fusion/iterators/functions/advance.html rename to doc/html/fusion/iterator/functions/advance.html index dc7ee092..87b2c36c 100644 --- a/doc/html/fusion/iterators/functions/advance.html +++ b/doc/html/fusion/iterator/functions/advance.html @@ -24,27 +24,27 @@
    +
    + + Description

    Moves an iterator by a specified distance.

    -
    - - Synopsis +
    + + Synopsis
     template<
         typename I,
         typename M
         >
    -typename result_of::advance<I, M>::type advance(I const& i); 
    +typename result_of::advance<I, M>::type advance(I const& i);
     
    -

    Table 1.6. Parameters

    +

    Table 1.6. Parameters

    @@ -109,9 +109,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -130,22 +130,18 @@
               Iterator then M
               may be negative.
             

    -
    - - Header +

    + /iterator/advance.hpp> +

    +
    + + Example
    -#include <boost/fusion/iterator/advance.hpp>
    -
    -
    - - Example -
    -
    -typedef vector<int,int,int> vec;
    +typedef vector<int,int,int> vec;
     
     vec v(1,2,3);
    -assert(deref(advance<mpl::int_<2> >(begin(v))) == 3);
    +assert(deref(advance<mpl::int_<2> >(begin(v))) == 3);
     
    diff --git a/doc/html/fusion/iterators/functions/advance_c.html b/doc/html/fusion/iterator/functions/advance_c.html similarity index 69% rename from doc/html/fusion/iterators/functions/advance_c.html rename to doc/html/fusion/iterator/functions/advance_c.html index f4f402ce..baf204a3 100644 --- a/doc/html/fusion/iterators/functions/advance_c.html +++ b/doc/html/fusion/iterator/functions/advance_c.html @@ -7,7 +7,7 @@ - +
    @@ -20,31 +20,31 @@

    -PrevUpHomeNext +PrevUpHomeNext
    +
    + + Description

    Moves an iterator by a specified distance.

    -
    - - Synopsis +
    + + Synopsis
     template<
         typename I,
         int N
         >
    -typename result_of::advance_c<I, N>::type advance_c(I const& i); 
    +typename result_of::advance_c<I, N>::type advance_c(I const& i);
     
    -

    Table 1.7. Parameters

    +

    Table 1.7. Parameters

    @@ -108,9 +108,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -129,22 +129,18 @@
               Iterator then N
               may be negative.
             

    -
    - - Header +

    + /iterator/advance.hpp> +

    +
    + + Example
    -#include <boost/fusion/iterator/advance.hpp>
    -
    -
    - - Example -
    -
    -typedef vector<int,int,int> vec;
    +typedef vector<int,int,int> vec;
     
     vec v(1,2,3);
    -assert(deref(advance_c<2>(begin(v))) == 3);
    +assert(deref(advance_c<2>(begin(v))) == 3);
     
    @@ -154,7 +150,7 @@

    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/fusion/iterators/functions/deref.html b/doc/html/fusion/iterator/functions/deref.html similarity index 67% rename from doc/html/fusion/iterators/functions/deref.html rename to doc/html/fusion/iterator/functions/deref.html index 10629ccb..bf32f453 100644 --- a/doc/html/fusion/iterators/functions/deref.html +++ b/doc/html/fusion/iterator/functions/deref.html @@ -24,17 +24,17 @@ +
    + + Description

    Deferences an iterator.

    -
    - - Synopsis +
    + + Synopsis
     template<
    @@ -43,7 +43,7 @@
     typename result_of::deref<I>::type deref(I const& i);
     
    -

    Table 1.2. Parameters

    +

    Table 1.2. Parameters

    @@ -88,9 +88,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -103,25 +103,21 @@
               Semantics: Dereferences the iterator
               i.
             

    -
    - - Header +

    + /iterator/deref.hpp> +

    +
    + + Example
    -#include <boost/fusion/iterator/deref.hpp>
    -
    -
    - - Example -
    -
    -typedef vector<int,int&> vec;
    +typedef vector<int,int&> vec;
     
     int i(0);
     vec v(1,i);
    -assert(deref(begin(v)) == 1);
    -assert(deref(next(begin(v))) == 0);
    -assert(&(deref(next(begin(v)))) == &i);
    +assert(deref(begin(v)) == 1);
    +assert(deref(next(begin(v))) == 0);
    +assert(&(deref(next(begin(v)))) == &i);
     
    diff --git a/doc/html/fusion/iterators/functions/distance.html b/doc/html/fusion/iterator/functions/distance.html similarity index 68% rename from doc/html/fusion/iterators/functions/distance.html rename to doc/html/fusion/iterator/functions/distance.html index df606479..3fb15bcb 100644 --- a/doc/html/fusion/iterators/functions/distance.html +++ b/doc/html/fusion/iterator/functions/distance.html @@ -24,17 +24,17 @@ +
    + + Description

    Returns the distance between 2 iterators.

    -
    - - Synopsis +
    + + Synopsis
     template<
    @@ -44,7 +44,7 @@
     typename result_of::distance<I, J>::type distance(I const& i, J const& j);
     
    -

    Table 1.5. Parameters

    +

    Table 1.5. Parameters

    @@ -89,9 +89,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -104,22 +104,18 @@
               Semantics: Returns the distance between
               iterators i and j.
             

    -
    - - Header +

    + /iterator/distance.hpp> +

    +
    + + Example
    -#include <boost/fusion/iterator/distance.hpp>
    -
    -
    - - Example -
    -
    -typedef vector<int,int,int> vec;
    +typedef vector<int,int,int> vec;
     
     vec v(1,2,3);
    -assert(distance(begin(v), next(next(begin(v)))) == 2);
    +assert(distance(begin(v), next(next(begin(v)))) == 2);
     
    diff --git a/doc/html/fusion/iterators/functions/next.html b/doc/html/fusion/iterator/functions/next.html similarity index 66% rename from doc/html/fusion/iterators/functions/next.html rename to doc/html/fusion/iterator/functions/next.html index b4dc0827..8a69a648 100644 --- a/doc/html/fusion/iterators/functions/next.html +++ b/doc/html/fusion/iterator/functions/next.html @@ -24,17 +24,17 @@ +
    + + Description

    Moves an iterator 1 position forwards.

    -
    - - Synopsis +
    + + Synopsis
     template<
    @@ -43,7 +43,7 @@
     typename result_of::next<I>::type next(I const& i);
     
    -

    Table 1.3. Parameters

    +

    Table 1.3. Parameters

    @@ -88,9 +88,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -104,24 +104,20 @@
               Semantics: Returns an iterator to the
               next element after i.
             

    -
    - - Header +

    + /iterator/next.hpp> +

    +
    + + Example
    -#include <boost/fusion/iterator/next.hpp>
    -
    -
    - - Example -
    -
    -typedef vector<int,int,int> vec;
    +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/iterators/functions/prior.html b/doc/html/fusion/iterator/functions/prior.html similarity index 69% rename from doc/html/fusion/iterators/functions/prior.html rename to doc/html/fusion/iterator/functions/prior.html index 9eaba7b7..227b6a6a 100644 --- a/doc/html/fusion/iterators/functions/prior.html +++ b/doc/html/fusion/iterator/functions/prior.html @@ -24,17 +24,17 @@ +
    + + Description

    Moves an iterator 1 position backwards.

    -
    - - Synopsis +
    + + Synopsis
     template<
    @@ -43,7 +43,7 @@
     typename result_of::prior<I>::type prior(I const& i);
     
    -

    Table 1.4. Parameters

    +

    Table 1.4. Parameters

    @@ -88,9 +88,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -104,23 +104,19 @@
               Semantics: Returns an iterator to the
               element prior to i.
             

    -
    - - Header +

    + /iterator/prior.hpp> +

    +
    + + Example
    -#include <boost/fusion/iterator/prior.hpp>
    -
    -
    - - Example -
    -
    -typedef vector<int,int> vec;
    +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/iterators/metafunctions.html b/doc/html/fusion/iterator/metafunctions.html similarity index 64% rename from doc/html/fusion/iterators/metafunctions.html rename to doc/html/fusion/iterator/metafunctions.html index 22b175b9..4ef354f4 100644 --- a/doc/html/fusion/iterators/metafunctions.html +++ b/doc/html/fusion/iterator/metafunctions.html @@ -5,8 +5,8 @@ - - + @@ -21,11 +21,11 @@

    -PrevUpHomeNext +PrevUpHomeNext
    value_of
    deref
    @@ -44,7 +44,7 @@
    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/fusion/iterators/metafunctions/advance.html b/doc/html/fusion/iterator/metafunctions/advance.html similarity index 75% rename from doc/html/fusion/iterators/metafunctions/advance.html rename to doc/html/fusion/iterator/metafunctions/advance.html index 00b4468f..62a688a4 100644 --- a/doc/html/fusion/iterators/metafunctions/advance.html +++ b/doc/html/fusion/iterator/metafunctions/advance.html @@ -24,17 +24,17 @@
    +
    + + Description

    Moves an iterator a specified distance.

    -
    - - Synopsis +
    + + Synopsis
     template<
    @@ -47,7 +47,7 @@
     };
     
    -

    Table 1.17. Parameters

    +

    Table 1.17. Parameters

    @@ -112,9 +112,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -132,20 +132,16 @@
               Iterator then M
               may be negative.
             

    -
    - - Header +

    + /iterator/advance.hpp> +

    +
    + + Example
    -#include <boost/fusion/iterator/advance.hpp>
    -
    -
    - - Example -
    -
    -typedef vector<int,double,char> vec;
    -typedef result_of::begin<vec>::type first;
    +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;
     
    diff --git a/doc/html/fusion/iterators/metafunctions/advance_c.html b/doc/html/fusion/iterator/metafunctions/advance_c.html
    similarity index 72%
    rename from doc/html/fusion/iterators/metafunctions/advance_c.html
    rename to doc/html/fusion/iterator/metafunctions/advance_c.html
    index 0f174158..3095b023 100644
    --- a/doc/html/fusion/iterators/metafunctions/advance_c.html
    +++ b/doc/html/fusion/iterator/metafunctions/advance_c.html
    @@ -7,7 +7,7 @@
     
     
     
    -
    +
     
     
     
    @@ -20,21 +20,21 @@
     

    -PrevUpHomeNext +PrevUpHomeNext
    +
    + + Description

    Moves an iterator by a specified distance.

    -
    - - Synopsis +
    + + Synopsis
     template<
    @@ -47,7 +47,7 @@
     };
     
    -

    Table 1.18. Parameters

    +

    Table 1.18. Parameters

    @@ -111,9 +111,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -131,20 +131,16 @@
               Iterator then N
               may be negative. Equivalent to result_of::advance<I, boost::mpl::int_<N> >::type.
             

    -
    - - Header +

    + /iterator/advance.hpp> +

    +
    + + Example
    -#include <boost/fusion/iterator/advance.hpp>
    -
    -
    - - Example -
    -
    -typedef vector<int,double,char> vec;
    -typedef result_of::begin<vec>::type first;
    +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;
     
    @@ -158,7 +154,7 @@
     
     
    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/fusion/iterators/metafunctions/deref.html b/doc/html/fusion/iterator/metafunctions/deref.html similarity index 70% rename from doc/html/fusion/iterators/metafunctions/deref.html rename to doc/html/fusion/iterator/metafunctions/deref.html index b8d9b5b7..deee4b33 100644 --- a/doc/html/fusion/iterators/metafunctions/deref.html +++ b/doc/html/fusion/iterator/metafunctions/deref.html @@ -24,17 +24,17 @@ +
    + + Description

    Returns the type that will be returned by dereferencing an iterator.

    -
    - - Synposis +
    + + Synposis
     template<
    @@ -46,7 +46,7 @@
     };
     
    -

    Table 1.12. Parameters

    +

    Table 1.12. Parameters

    @@ -91,9 +91,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -106,24 +106,20 @@
               Semantics: Returns the result of dereferencing
               an iterator of type I.
             

    -
    - - Header +

    + /iterator/deref.hpp> +

    +
    + + Example
    -#include <boost/fusion/iterator/deref.hpp>
    -
    -
    - - Example -
    -
    -typedef vector<int,int&> vec;
    +typedef vector<int,int&> vec;
     typedef const vec const_vec;
    -typedef result_of::begin<vec>::type first;
    +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::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&>));
    diff --git a/doc/html/fusion/iterators/metafunctions/distance.html b/doc/html/fusion/iterator/metafunctions/distance.html
    similarity index 72%
    rename from doc/html/fusion/iterators/metafunctions/distance.html
    rename to doc/html/fusion/iterator/metafunctions/distance.html
    index 743318e8..b149ef67 100644
    --- a/doc/html/fusion/iterators/metafunctions/distance.html
    +++ b/doc/html/fusion/iterator/metafunctions/distance.html
    @@ -24,17 +24,17 @@
     
     
    +
    + + Description

    Returns the distance between two iterators.

    -
    - - Synopsis +
    + + Synopsis
     template<
    @@ -47,7 +47,7 @@
     };
     
    -

    Table 1.16. Parameters

    +

    Table 1.16. Parameters

    @@ -92,9 +92,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -109,20 +109,16 @@
               iterators of types I and
               J.
             

    -
    - - Header +

    + /iterator/distance.hpp> +

    +
    + + Example
    -#include <boost/fusion/iterator/distance.hpp>
    -
    -
    - - Example -
    -
    -typedef vector<int,double,char> vec;
    -typedef result_of::begin<vec>::type first;
    +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;
    diff --git a/doc/html/fusion/iterators/metafunctions/equal_to.html b/doc/html/fusion/iterator/metafunctions/equal_to.html
    similarity index 69%
    rename from doc/html/fusion/iterators/metafunctions/equal_to.html
    rename to doc/html/fusion/iterator/metafunctions/equal_to.html
    index a79af3d5..6dba4b70 100644
    --- a/doc/html/fusion/iterators/metafunctions/equal_to.html
    +++ b/doc/html/fusion/iterator/metafunctions/equal_to.html
    @@ -24,19 +24,19 @@
     
     
    +
    + + Description

    Returns a true-valued MPL Integral Constant if I and J are equal.

    -
    - - Synopsis +
    + + Synopsis
     template<
    @@ -49,7 +49,7 @@
     };
     
    -

    Table 1.15. Parameters

    +

    Table 1.15. Parameters

    @@ -92,9 +92,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -109,21 +109,17 @@
               if I and J are iterators to the same position.
               Returns boost::mpl::false_ otherwise.
             

    -
    - - Header +

    + /iterator/equal_to.hpp> +

    +
    + + Example
    -#include <boost/fusion/iterator/equal_to.hpp>
    -
    -
    - - Example -
    -
    -typedef vector<int,double> vec;
    -typedef result_of::begin<vec>::type first;
    -typedef result_of::end<vec>::type last;
    +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/iterators/metafunctions/next.html b/doc/html/fusion/iterator/metafunctions/next.html similarity index 70% rename from doc/html/fusion/iterators/metafunctions/next.html rename to doc/html/fusion/iterator/metafunctions/next.html index 14873188..24e41032 100644 --- a/doc/html/fusion/iterators/metafunctions/next.html +++ b/doc/html/fusion/iterator/metafunctions/next.html @@ -24,17 +24,17 @@ +
    + + Description

    Returns the type of the next iterator in a sequence.

    -
    - - Synposis +
    + + Synposis
     template<
    @@ -46,7 +46,7 @@
     };
     
    -

    Table 1.13. Parameters

    +

    Table 1.13. Parameters

    @@ -91,9 +91,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -107,20 +107,16 @@
               Semantics: Returns an iterator to the
               next element in the sequence after I.
             

    -
    - - Header +

    + /iterator/next.hpp> +

    +
    + + Example
    -#include <boost/fusion/iterator/next.hpp>
    -
    -
    - - Example -
    -
    -typedef vector<int,double> vec;
    -typedef result_of::next<result_of::begin<vec>::type>::type second;
    +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>));
     
    diff --git a/doc/html/fusion/iterators/metafunctions/prior.html b/doc/html/fusion/iterator/metafunctions/prior.html similarity index 73% rename from doc/html/fusion/iterators/metafunctions/prior.html rename to doc/html/fusion/iterator/metafunctions/prior.html index 108996d0..572dd324 100644 --- a/doc/html/fusion/iterators/metafunctions/prior.html +++ b/doc/html/fusion/iterator/metafunctions/prior.html @@ -24,17 +24,17 @@ +
    + + Description

    Returns the type of the previous iterator in a sequence.

    -
    - - Synopsis +
    + + Synopsis
     template<
    @@ -46,7 +46,7 @@
     };
     
    -

    Table 1.14. Parameters

    +

    Table 1.14. Parameters

    @@ -91,9 +91,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -107,20 +107,16 @@
               Semantics: Returns an iterator to the
               previous element in the sequence before I.
             

    -
    - - Header +

    + /iterator/prior.hpp> +

    +
    + + Example
    -#include <boost/fusion/iterator/prior.hpp>
    -
    -
    - - Example -
    -
    -typedef vector<int,double> vec;
    -typedef result_of::next<result_of::begin<vec>::type>::type second;
    +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>));
     
    diff --git a/doc/html/fusion/iterators/metafunctions/value_of.html b/doc/html/fusion/iterator/metafunctions/value_of.html
    similarity index 74%
    rename from doc/html/fusion/iterators/metafunctions/value_of.html
    rename to doc/html/fusion/iterator/metafunctions/value_of.html
    index 43183877..ac31f616 100644
    --- a/doc/html/fusion/iterators/metafunctions/value_of.html
    +++ b/doc/html/fusion/iterator/metafunctions/value_of.html
    @@ -24,17 +24,17 @@
     
     
    +
    + + Description

    Returns the type stored at the position of an iterator.

    -
    - - Synopsis +
    + + Synopsis
     template<
    @@ -46,7 +46,7 @@
     };
     
    -

    Table 1.11. Parameters

    +

    Table 1.11. Parameters

    @@ -91,9 +91,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -106,20 +106,16 @@
               Semantics: Returns the type stored in
               a sequence at iterator position I.
             

    -
    - - Header +

    + /iterator/value_of.hpp> +

    +
    + + Example
    -#include <boost/fusion/iterator/value_of.hpp>
    -
    -
    - - Example -
    -
    -typedef vector<int,int&,const int&> vec;
    -typedef result_of::begin<vec>::type first;
    +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;
     
    diff --git a/doc/html/fusion/iterators/operators.html b/doc/html/fusion/iterator/operator.html
    similarity index 62%
    rename from doc/html/fusion/iterators/operators.html
    rename to doc/html/fusion/iterator/operator.html
    index 5b4fff25..01b906fa 100644
    --- a/doc/html/fusion/iterators/operators.html
    +++ b/doc/html/fusion/iterator/operator.html
    @@ -1,13 +1,13 @@
     
     
     
    -Operators
    +Operator
     
     
     
    -
    +
     
    -
     
     
    @@ -21,17 +21,17 @@
     
     
    -PrevUpHomeNext +PrevUpHomeNext

    @@ -46,7 +46,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/fusion/iterators/operators/operator_equality.html b/doc/html/fusion/iterator/operator/operator_equality.html similarity index 68% rename from doc/html/fusion/iterators/operators/operator_equality.html rename to doc/html/fusion/iterator/operator/operator_equality.html index 11217f05..9a865455 100644 --- a/doc/html/fusion/iterators/operators/operator_equality.html +++ b/doc/html/fusion/iterator/operator/operator_equality.html @@ -6,7 +6,7 @@ - + -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Description +
    + + Description

    Compares 2 iterators for equality.

    -
    - - Synopsis +
    + + Synopsis
     template<
    @@ -49,7 +49,7 @@
     unspecified operator==(I const& i, J const& i);
     
    -

    Table 1.9. Parameters

    +

    Table 1.9. Parameters

    @@ -92,9 +92,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -108,13 +108,9 @@
               where I and J are the types of i
               and j respectively.
             

    -
    - - Header -
    -
    -#include <boost/fusion/iterator/equal_to.hpp>
    -
    +

    + /iterator/equal_to.hpp> +

    @@ -123,7 +119,7 @@

    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/fusion/iterators/operators/operator_inequality.html b/doc/html/fusion/iterator/operator/operator_inequality.html similarity index 67% rename from doc/html/fusion/iterators/operators/operator_inequality.html rename to doc/html/fusion/iterator/operator/operator_inequality.html index b45b56c0..3cabf125 100644 --- a/doc/html/fusion/iterators/operators/operator_inequality.html +++ b/doc/html/fusion/iterator/operator/operator_inequality.html @@ -6,7 +6,7 @@ - + @@ -22,23 +22,23 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Description +
    + + Description

    Compares 2 iterators for inequality.

    -
    - - Synopsis +
    + + Synopsis
     template<
    @@ -48,7 +48,7 @@
     unspecified operator==(I const& i, J const& i);
     
    -

    Table 1.10. Parameters

    +

    Table 1.10. Parameters

    @@ -91,9 +91,9 @@
    -
    - - Expression +
    + + Expression Semantics

    @@ -104,13 +104,9 @@ where I and J are the types of i and j respectively.

    -
    - - Header -
    -
    -#include <boost/fusion/iterator/equal_to.hpp>
    -
    +

    + /iterator/equal_to.hpp> +

    @@ -119,7 +115,7 @@

    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/fusion/iterators/operators/operator_unary_star.html b/doc/html/fusion/iterator/operator/operator_unary_star.html similarity index 55% rename from doc/html/fusion/iterators/operators/operator_unary_star.html rename to doc/html/fusion/iterator/operator/operator_unary_star.html index e662dc4b..7340ee82 100644 --- a/doc/html/fusion/iterators/operators/operator_unary_star.html +++ b/doc/html/fusion/iterator/operator/operator_unary_star.html @@ -6,8 +6,8 @@ - - + + @@ -22,23 +22,23 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Description +
    + + Description

    Dereferences an iterator.

    -
    - - Synopsis +
    + + Synopsis
     template<
    @@ -47,7 +47,7 @@
     typename result_of::deref<I>::type operator*(unspecified<I> const& i);
     
    -

    Table 1.8. Parameters

    +

    Table 1.8. Parameters

    @@ -92,9 +92,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -107,25 +107,21 @@
     

    Semantics: Equivalent to deref(i).

    -
    - - Header +

    + /iterator/deref.hpp> +

    +
    + + Example
    -#include <boost/fusion/iterator/deref.hpp>
    -
    -
    - - Example -
    -
    -typedef vector<int,int&> vec;
    +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);
     
    @@ -135,7 +131,7 @@

    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/fusion/iterators.html b/doc/html/fusion/iterators.html deleted file mode 100644 index 48583fa5..00000000 --- a/doc/html/fusion/iterators.html +++ /dev/null @@ -1,94 +0,0 @@ - - - -Iterators - - - - - - - - - - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -
    -
    -PrevUpHomeNext -
    -
    - - -

    - Like MPL and - STL, - iterators are a fundamental concept in Fusion. As with MPL - and STL - iterators describe positions, and provide access to data within an underlying - Sequence. -

    -

    - - Header -

    -
    -#include <boost/fusion/iterator.hpp>
    -
    -
    - - - -
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias - Schwinger
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/fusion/notes.html b/doc/html/fusion/notes.html index cdb87296..b940d607 100644 --- a/doc/html/fusion/notes.html +++ b/doc/html/fusion/notes.html @@ -27,20 +27,21 @@

    - + Recursive Inlined Functions

    - An interesting peculiarity of functions like at when applied to a 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. + 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

    @@ -50,7 +51,7 @@ given a key, k.

    - + Tag Dispatching

    @@ -102,7 +103,7 @@

    - + Extensibility

    @@ -112,9 +113,9 @@ 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 @@ -126,30 +127,30 @@ 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

    - 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, + returns a list<int, char>.

    @@ -160,18 +161,18 @@

    Array arguments are deduced to reference to const types. For example - [14] + [14] :

    -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: @@ -183,34 +184,34 @@

     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

    - 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 @@ -224,11 +225,11 @@

     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 @@ -236,9 +237,9 @@



    -

    [14] +

    [14] 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 + 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 71cb47b9..cb9533ef 100644 --- a/doc/html/fusion/organization.html +++ b/doc/html/fusion/organization.html @@ -34,7 +34,7 @@ The library is organized in three layers:

    - + Layers

    @@ -52,11 +52,19 @@ the same directory with the actual module-directory. For example, 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/fusioninclude" 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. +

    +

    The library is header-only. There is no need to build object files to link against.

    - + Directory

      @@ -78,83 +86,95 @@
  • - sequence + adapted
    • - adapted -
        -
      • - array -
      • -
      • - mpl -
      • -
      • - std_pair -
      • -
      -
    • -
    • - comparison + array
    • - container -
        + mpl +
      • - list -
      • + boost::tuple +
      • - map -
      • + std_pair +
      • - set -
      • + struct +
      • - vector -
      • + variant +
    • - conversion + 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
      • -
      • - utility -
      • -
      • - view -
          -
        • - filter_view -
        • -
        • - iterator_range -
        • -
        • - joint_view -
        • -
        • - reverse_view -
        • -
        • - single_view -
        • -
        • - transform_view -
        • -
        • - zip_view -
        • -
        -
    • @@ -165,7 +185,7 @@

    - + Example

    @@ -174,19 +194,19 @@ of

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

    - The first includes all sequences. The second includes all of sequence containers. - The third includes only list - [3] + The first includes all containers The second includes only list + [3] .



    -

    [3] +

    [3] 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 889a4b5e..3ff2e64f 100644 --- a/doc/html/fusion/preface.html +++ b/doc/html/fusion/preface.html @@ -44,7 +44,7 @@

  • - + Description

    @@ -62,7 +62,7 @@ of compile time metaprogramming with runtime programming.

    - + Motivation

    @@ -88,7 +88,7 @@ an instant AHA! moment.

    - + How to use this manual

    @@ -96,7 +96,7 @@ icons precede some text to indicate:

    -

    Table 1.1. Icons

    +

    Table 1.1. Icons

    @@ -199,7 +199,7 @@ Tools.

    - + Support

    diff --git a/doc/html/fusion/quick_start.html b/doc/html/fusion/quick_start.html index f3ca0949..ddcf5494 100644 --- a/doc/html/fusion/quick_start.html +++ b/doc/html/fusion/quick_start.html @@ -29,37 +29,38 @@ I assume the reader is already familiar with tuples (Boost.Tuple) 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 - [1] + For starters, we shall include all of Fusion's Sequence(s) + [1] :

     #include <boost/fusion/sequence.hpp>
    +#include <boost/fusion/include/sequence.hpp>
     

    - Let's begin with a vector - [2] + Let's begin with a vector + [2] :

    -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 as XML

    @@ -68,6 +69,7 @@

     #include <boost/fusion/algorithm.hpp>
    +#include <boost/fusion/include/algorithm.hpp>
     

    Now, let's write a function object that prints XML of the form <type>data</type> @@ -91,10 +93,10 @@ 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 @@ -111,12 +113,12 @@

    - for_each is generic. With + for_each is generic. With print_xml, you can use it to - print just about any Fusion Sequence. + print just about any Fusion Sequence.

    - + Print only pointers

    @@ -135,37 +137,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 + This "filtered view" is then passed to the for_each algorithm, which then prints the "filtered view" as XML.

    Easy, right?

    - + Associative tuples

    Ok, moving on...

    - 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 + 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 the sequences.

    - Fusion's map associate types with elements. - It can be used as a cleverer replacement of the struct. - Example: + Fusion's map + associate types with elements. It can be used as a cleverer replacement of + the struct. Example:

     namespace fields
    @@ -174,13 +176,13 @@
         struct age;
     }
     
    -typedef map<
    +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, with the type of their second template parameter. The first type parameter @@ -190,8 +192,8 @@

     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. @@ -199,7 +201,7 @@ 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:

    @@ -215,7 +217,7 @@
     template <typename Stuff>
     void save(Stuff const& stuff)
     {
    -    for_each(stuff, saver());
    +    for_each(stuff, saver());
     }
     

    @@ -225,7 +227,7 @@ a dog or a whole alternate_universe.

    - + Tip of the Iceberg

    @@ -236,12 +238,12 @@



    -

    [1] +

    [1] There are finer grained header files available if you wish to have more control over which components to include (see section Orgainization for details).

    -

    [2] +

    [2] 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/sequence.html b/doc/html/fusion/sequence.html new file mode 100644 index 00000000..cc898476 --- /dev/null +++ b/doc/html/fusion/sequence.html @@ -0,0 +1,80 @@ + + + +Sequence + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +


    +
    +PrevUpHomeNext +
    +
    + + +

    + 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 + 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 + type that can be used to iterate through the Sequence's elements. +

    +

    + + Header +

    +
    +#include <boost/fusion/sequence.hpp>
    +#include <boost/fusion/include/sequence.hpp>
    +
    +
    + + + +
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/fusion/sequences/concepts.html b/doc/html/fusion/sequence/concepts.html similarity index 66% rename from doc/html/fusion/sequences/concepts.html rename to doc/html/fusion/sequence/concepts.html index 82fea73a..933129cd 100644 --- a/doc/html/fusion/sequences/concepts.html +++ b/doc/html/fusion/sequence/concepts.html @@ -5,8 +5,8 @@ - - + + @@ -21,11 +21,11 @@
    -PrevUpHomeNext +PrevUpHomeNext
    Forward Sequence
    @@ -39,12 +39,12 @@

    Fusion Sequences are organized into a hierarchy of concepts.

    -

    - - Traversal +

    + + Traversal

    - Fusion's sequence traversal related concepts parallel Fusion's Iterator + Fusion's sequence traversal related concepts parallel Fusion's Iterator Concepts. Forward Sequence is the most basic concept. Bidirectional Sequence. These concepts pertain to sequence traversal.

    -

    - - Associativity +

    + + Associativity

    The -PrevUpHomeNext +PrevUpHomeNext

    diff --git a/doc/html/fusion/sequences/concepts/associative_sequence.html b/doc/html/fusion/sequence/concepts/associative_sequence.html similarity index 64% rename from doc/html/fusion/sequences/concepts/associative_sequence.html rename to doc/html/fusion/sequence/concepts/associative_sequence.html index 90c5b78f..9d4e8658 100644 --- a/doc/html/fusion/sequences/concepts/associative_sequence.html +++ b/doc/html/fusion/sequence/concepts/associative_sequence.html @@ -9,7 +9,7 @@ - + @@ -22,16 +22,16 @@

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

    An Associative Sequence allows efficient retrieval of elements based on @@ -70,9 +70,9 @@

    -
    - - Valid +
    + + Valid Expressions

    @@ -111,7 +111,7 @@

    - has_key<K>(s) + has_key<K>(s)

    @@ -133,7 +133,7 @@

    - at_key<K>(s) + at_key<K>(s)

    @@ -154,7 +154,7 @@

    - at_key<K>(s) + at_key<K>(s) = o

    @@ -179,9 +179,9 @@
    -
    - - Result +
    + + Result Type Expressions
    @@ -205,7 +205,7 @@ @@ -218,7 +218,7 @@ @@ -231,7 +231,7 @@ @@ -244,16 +244,16 @@

    - result_of::has_key<S, + result_of::has_key<S, K>::type

    - result_of::at_key<S, + result_of::at_key<S, K>::type

    - result_of::value_at_key<S, + result_of::value_at_key<S, K>::type

    -
    - - Expression +
    + + Expression Semantics
    @@ -277,7 +277,7 @@

    - has_key<K>(s) + has_key<K>(s)

    @@ -286,33 +286,33 @@ such that c::value == true if and only if there is one or more elements with the key k - in s; see has_key. + in s; see has_key.

    - at_key<K>(s) + at_key<K>(s)

    The element associated with the key K in the sequence s; - see at. + see at.

    -
    - - Models +
    + + Models
    @@ -322,7 +322,7 @@

    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/fusion/sequences/concepts/bidirectional_sequence.html b/doc/html/fusion/sequence/concepts/bidirectional_sequence.html similarity index 64% rename from doc/html/fusion/sequences/concepts/bidirectional_sequence.html rename to doc/html/fusion/sequence/concepts/bidirectional_sequence.html index ec2bcca6..e66a1226 100644 --- a/doc/html/fusion/sequences/concepts/bidirectional_sequence.html +++ b/doc/html/fusion/sequence/concepts/bidirectional_sequence.html @@ -27,23 +27,23 @@
    -
    - - Description +
    + + Description

    A Bidirectional Sequence is a Forward - Sequence whose iterators model Bidirectional Iterator.

    -
    - - Refinement +
    + + Refinement of

    @@ -71,9 +71,9 @@

    -
    - - Valid +
    + + Valid Expressions

    @@ -114,12 +114,12 @@

    - begin(s) + begin(s)

    - Bidirectional Iterator

    @@ -137,12 +137,12 @@

    - end(s) + end(s)

    - Bidirectional Iterator

    @@ -160,7 +160,7 @@

    - back(s) + back(s)

    @@ -181,7 +181,7 @@

    - back(s) + back(s) = o

    @@ -206,9 +206,9 @@ -
    - - Result +
    + + Result Type Expressions
    @@ -232,7 +232,7 @@

    - result_of::begin<S>::type + result_of::begin<S>::type

    @@ -244,7 +244,7 @@

    - result_of::end<S>::type + result_of::end<S>::type

    @@ -256,7 +256,7 @@

    - result_of::back<S>::type + result_of::back<S>::type

    @@ -267,9 +267,9 @@
    -
    - - Expression +
    + + Expression Semantics

    @@ -298,35 +298,35 @@

    - back(s) + back(s)

    - The last element in the sequence; see back. + The last element in the sequence; see back.

    -
    - - Models +
    + + Models
    diff --git a/doc/html/fusion/sequences/concepts/forward_sequence.html b/doc/html/fusion/sequence/concepts/forward_sequence.html similarity index 56% rename from doc/html/fusion/sequences/concepts/forward_sequence.html rename to doc/html/fusion/sequence/concepts/forward_sequence.html index 6c6f1912..6de0aa76 100644 --- a/doc/html/fusion/sequences/concepts/forward_sequence.html +++ b/doc/html/fusion/sequence/concepts/forward_sequence.html @@ -26,12 +26,12 @@
    -
    - - Description +
    + + Description

    A Forward Sequence is a Sequence whose elements are arranged in a definite @@ -61,9 +61,9 @@

    -
    - - Valid +
    + + Valid Expressions

    @@ -102,12 +102,12 @@

    - begin(s) + begin(s)

    - Forward Iterator

    @@ -125,12 +125,12 @@

    - end(s) + end(s)

    - Forward Iterator

    @@ -148,7 +148,7 @@

    - size(s) + size(s)

    @@ -170,7 +170,7 @@

    - empty(s) + empty(s)

    @@ -192,7 +192,7 @@

    - front(s) + front(s)

    @@ -213,7 +213,7 @@

    - front(s) + front(s) = o

    @@ -238,9 +238,9 @@ -
    - - Result +
    + + Result Type Expressions
    @@ -264,7 +264,7 @@

    - result_of::begin<S>::type + result_of::begin<S>::type

    @@ -276,7 +276,7 @@

    - result_of::end<S>::type + result_of::end<S>::type

    @@ -288,7 +288,7 @@

    - result_of::size<S>::type + result_of::size<S>::type

    @@ -300,7 +300,7 @@

    - result_of::empty<S>::type + result_of::empty<S>::type

    @@ -312,7 +312,7 @@

    - result_of::front<S>::type + result_of::front<S>::type

    @@ -323,9 +323,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -349,43 +349,43 @@

    - begin(s) + begin(s)

    - An iterator to the first element of the sequence; see begin. + An iterator to the first element of the sequence; see begin.

    - end(s) + end(s)

    - A past-the-end iterator to the sequence; see end. + A past-the-end iterator to the sequence; see end.

    - size(s) + size(s)

    - The size of the sequence; see size. + The size of the sequence; see size.

    - empty(s) + empty(s)

    @@ -393,43 +393,43 @@ A boolean Integral Constant c such that c::value == true if and only if the - sequence is empty; see empty. + sequence is empty; see empty.

    - front(s) + front(s)

    - The first element in the sequence; see front. + The first element in the sequence; see front.

    -
    - - Invariants +
    + + Invariants

    For any Forward Sequence s the following invariants always hold:

    • -[begin(s), end(s)) is always a valid range. +[begin(s), end(s)) is always a valid range.
    • - An Algorithm that iterates through - the range [begin(s), end(s)) will pass through every element of + An Algorithm that iterates through + the range [begin(s), end(s)) will pass through every element of s exactly once.
    • -begin(s) - is identical to end(s)) +begin(s) + is identical to end(s)) if and only if s is empty.
    • @@ -437,25 +437,25 @@ will access its elements in the same order.
    -
    - - Models +
    + + Models
    diff --git a/doc/html/fusion/sequences/concepts/random_access_sequence.html b/doc/html/fusion/sequence/concepts/random_access_sequence.html similarity index 61% rename from doc/html/fusion/sequences/concepts/random_access_sequence.html rename to doc/html/fusion/sequence/concepts/random_access_sequence.html index 284cdab5..3d534373 100644 --- a/doc/html/fusion/sequences/concepts/random_access_sequence.html +++ b/doc/html/fusion/sequence/concepts/random_access_sequence.html @@ -27,24 +27,24 @@
    -
    - - Description +
    + + Description

    A Random Access Sequence is a Bidirectional - Sequence whose iterators model Random Access Iterator. It guarantees constant time access to arbitrary sequence elements.

    -
    - - Refinement +
    + + Refinement of

    @@ -78,9 +78,9 @@

    -
    - - Valid +
    + + Valid Expressions

    @@ -121,12 +121,12 @@

    @@ -213,9 +213,9 @@

    - begin(s) + begin(s)

    - Random Access Iterator

    @@ -144,12 +144,12 @@

    - end(s) + end(s)

    - Random Access Iterator

    @@ -167,7 +167,7 @@

    - at<N>(s) + at<N>(s)

    @@ -188,7 +188,7 @@

    - at<N>(s) + at<N>(s) = o

    -
    - - Result +
    + + Result Type Expressions
    @@ -239,7 +239,7 @@ @@ -276,7 +276,7 @@ @@ -289,16 +289,16 @@

    - result_of::begin<S>::type + result_of::begin<S>::type

    @@ -251,7 +251,7 @@

    - result_of::end<S>::type + result_of::end<S>::type

    @@ -263,7 +263,7 @@

    - result_of::at<S, + result_of::at<S, N>::type

    - result_of::value_at<S, + result_of::value_at<S, N>::type

    -
    - - Expression +
    + + Expression Semantics

    @@ -327,35 +327,35 @@

    - at<N>(s) + at<N>(s)

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

    -
    - - Models +
    + + Models
    diff --git a/doc/html/fusion/sequence/intrinsic.html b/doc/html/fusion/sequence/intrinsic.html new file mode 100644 index 00000000..00c4f2da --- /dev/null +++ b/doc/html/fusion/sequence/intrinsic.html @@ -0,0 +1,69 @@ + + + +Intrinsic + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + + +

    + 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 + [4] + . +

    +

    + + Header +

    +
    +#include <boost/fusion/sequence/intrinsic.hpp>
    +#include <boost/fusion/include/intrinsic.hpp>
    +
    +
    +

    +

    [4] + In practice, many of intrinsic functions have default implementations + that will work in majority of cases +

    +
    +
    + + + +
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/fusion/sequences/intrinsics/functions.html b/doc/html/fusion/sequence/intrinsic/functions.html similarity index 66% rename from doc/html/fusion/sequences/intrinsics/functions.html rename to doc/html/fusion/sequence/intrinsic/functions.html index b4397075..35a45b04 100644 --- a/doc/html/fusion/sequences/intrinsics/functions.html +++ b/doc/html/fusion/sequence/intrinsic/functions.html @@ -5,8 +5,8 @@ - - + + @@ -20,11 +20,11 @@
    -PrevUpHomeNext +PrevUpHomeNext
    begin
    end
    @@ -46,7 +46,7 @@
    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/fusion/sequences/intrinsics/functions/at.html b/doc/html/fusion/sequence/intrinsic/functions/at.html similarity index 75% rename from doc/html/fusion/sequences/intrinsics/functions/at.html rename to doc/html/fusion/sequence/intrinsic/functions/at.html index 1a361356..f225c3fa 100644 --- a/doc/html/fusion/sequences/intrinsics/functions/at.html +++ b/doc/html/fusion/sequence/intrinsic/functions/at.html @@ -24,17 +24,17 @@
    -at
    -
    - - Description +at
    +
    + + Description

    Returns the N-th element from the beginning of the sequence.

    -
    - - Synopsis +
    + + Synopsis
     template <typename N, typename Sequence>
    @@ -45,9 +45,9 @@
     typename result_of::at<Sequence const, N>::type
     at(Sequence const& seq);
     
    -
    - - Parameters +
    + + Parameters
    @@ -112,9 +112,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -138,21 +138,22 @@
                 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/sequences/intrinsics/functions/at_c.html b/doc/html/fusion/sequence/intrinsic/functions/at_c.html similarity index 74% rename from doc/html/fusion/sequences/intrinsics/functions/at_c.html rename to doc/html/fusion/sequence/intrinsic/functions/at_c.html index 846c7695..3e224b11 100644 --- a/doc/html/fusion/sequences/intrinsics/functions/at_c.html +++ b/doc/html/fusion/sequence/intrinsic/functions/at_c.html @@ -24,17 +24,17 @@ +
    + + Description

    Returns the N-th element from the beginning of the sequence.

    -
    - - Synopsis +
    + + Synopsis
     template <int N, typename Sequence>
    @@ -45,9 +45,9 @@
     typename result_of::at_c<Sequence const, N>::type
     at_c(Sequence const& seq);
     
    -
    - - Parameters +
    + + Parameters
    @@ -111,9 +111,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -138,21 +138,22 @@
                 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/sequences/intrinsics/functions/at_key.html b/doc/html/fusion/sequence/intrinsic/functions/at_key.html similarity index 78% rename from doc/html/fusion/sequences/intrinsics/functions/at_key.html rename to doc/html/fusion/sequence/intrinsic/functions/at_key.html index 0fd878d9..823d229e 100644 --- a/doc/html/fusion/sequences/intrinsics/functions/at_key.html +++ b/doc/html/fusion/sequence/intrinsic/functions/at_key.html @@ -24,17 +24,17 @@ +
    + + Description

    Returns the element associated with a Key from the sequence.

    -
    - - Synopsis +
    + + Synopsis
     template <typename Key, typename Sequence>
    @@ -45,9 +45,9 @@
     typename result_of::at_key<Sequence const, Key>::type
     at_key(Sequence const& seq);
     
    -
    - - Parameters +
    + + Parameters
    @@ -111,9 +111,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -135,19 +135,20 @@
                 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/sequences/intrinsics/functions/back.html b/doc/html/fusion/sequence/intrinsic/functions/back.html similarity index 76% rename from doc/html/fusion/sequences/intrinsics/functions/back.html rename to doc/html/fusion/sequence/intrinsic/functions/back.html index d9ee2ca9..a9c42cb9 100644 --- a/doc/html/fusion/sequences/intrinsics/functions/back.html +++ b/doc/html/fusion/sequence/intrinsic/functions/back.html @@ -24,17 +24,17 @@ +
    + + Description

    Returns the last element in the sequence.

    -
    - - Synopsis +
    + + Synopsis
     template <typename Sequence>
    @@ -45,9 +45,9 @@
     typename result_of::back<Sequence const>::type
     back(Sequence const& seq);
     
    -
    - - Parameters +
    + + Parameters
    @@ -92,9 +92,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -116,19 +116,20 @@
                 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/sequences/intrinsics/functions/begin.html b/doc/html/fusion/sequence/intrinsic/functions/begin.html similarity index 70% rename from doc/html/fusion/sequences/intrinsics/functions/begin.html rename to doc/html/fusion/sequence/intrinsic/functions/begin.html index 2aad9e16..b6bb9577 100644 --- a/doc/html/fusion/sequences/intrinsics/functions/begin.html +++ b/doc/html/fusion/sequence/intrinsic/functions/begin.html @@ -24,17 +24,17 @@ +
    + + Description

    Returns an iterator pointing to the first element in the sequence.

    -
    - - Synopsis +
    + + Synopsis
     template <typename Sequence>
    @@ -45,9 +45,9 @@
     typename result_of::begin<Sequence const>::type
     begin(Sequence const& seq);
     
    -
    - - Parameters +
    + + Parameters
    @@ -92,26 +92,26 @@
    -
    - - Expression +
    + + Expression Semantics
     begin(seq);
     

    - Return type: 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 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/sequences/intrinsics/functions/empty.html b/doc/html/fusion/sequence/intrinsic/functions/empty.html similarity index 73% rename from doc/html/fusion/sequences/intrinsics/functions/empty.html rename to doc/html/fusion/sequence/intrinsic/functions/empty.html index e4ec9a1a..343115e8 100644 --- a/doc/html/fusion/sequences/intrinsics/functions/empty.html +++ b/doc/html/fusion/sequence/intrinsic/functions/empty.html @@ -24,28 +24,28 @@ +
    + + Description

    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
     empty(Sequence const& seq);
     
    -
    - - Parameters +
    + + Parameters
    @@ -90,9 +90,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -105,19 +105,20 @@
                 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/sequences/intrinsics/functions/end.html b/doc/html/fusion/sequence/intrinsic/functions/end.html similarity index 69% rename from doc/html/fusion/sequences/intrinsics/functions/end.html rename to doc/html/fusion/sequence/intrinsic/functions/end.html index 9ef0558d..5c8d970b 100644 --- a/doc/html/fusion/sequences/intrinsics/functions/end.html +++ b/doc/html/fusion/sequence/intrinsic/functions/end.html @@ -24,17 +24,17 @@ +
    + + Description

    Returns an iterator pointing to one element past the end of the sequence.

    -
    - - Synopsis +
    + + Synopsis
     template <typename Sequence>
    @@ -45,9 +45,9 @@
     typename result_of::end<Sequence const>::type
     end(Sequence const& seq);
     
    -
    - - Parameters +
    + + Parameters
    @@ -92,26 +92,26 @@
    -
    - - Expression +
    + + Expression Semantics
     end(seq);
     

    - Return type: 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 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/sequences/intrinsics/functions/front.html b/doc/html/fusion/sequence/intrinsic/functions/front.html similarity index 76% rename from doc/html/fusion/sequences/intrinsics/functions/front.html rename to doc/html/fusion/sequence/intrinsic/functions/front.html index 8f2758ac..aa67f6f4 100644 --- a/doc/html/fusion/sequences/intrinsics/functions/front.html +++ b/doc/html/fusion/sequence/intrinsic/functions/front.html @@ -24,17 +24,17 @@ +
    + + Description

    Returns the first element in the sequence.

    -
    - - Synopsis +
    + + Synopsis
     template <typename Sequence>
    @@ -45,9 +45,9 @@
     typename result_of::front<Sequence const>::type
     front(Sequence const& seq);
     
    -
    - - Parameters +
    + + Parameters
    @@ -92,9 +92,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -116,19 +116,20 @@
                 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/sequences/intrinsics/functions/has_key.html b/doc/html/fusion/sequence/intrinsic/functions/has_key.html similarity index 75% rename from doc/html/fusion/sequences/intrinsics/functions/has_key.html rename to doc/html/fusion/sequence/intrinsic/functions/has_key.html index 27ee1aa2..1e588b2d 100644 --- a/doc/html/fusion/sequences/intrinsics/functions/has_key.html +++ b/doc/html/fusion/sequence/intrinsic/functions/has_key.html @@ -24,10 +24,10 @@ +
    + + Description

    Returns a type convertible to bool @@ -35,18 +35,18 @@ the sequence contains an element associated with a Key, else, evaluates to false.

    -
    - - Synopsis +
    + + Synopsis
     template <typename Key, typename Sequence>
     typename result_of::has_key<Sequence, Key>::type
     has_key(Sequence const& seq);
     
    -
    - - Parameters +
    + + Parameters
    @@ -110,9 +110,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -125,19 +125,20 @@
                 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/sequences/intrinsics/functions/size.html b/doc/html/fusion/sequence/intrinsic/functions/size.html similarity index 72% rename from doc/html/fusion/sequences/intrinsics/functions/size.html rename to doc/html/fusion/sequence/intrinsic/functions/size.html index f3366fd0..8acf99fa 100644 --- a/doc/html/fusion/sequences/intrinsics/functions/size.html +++ b/doc/html/fusion/sequence/intrinsic/functions/size.html @@ -24,27 +24,27 @@ +
    + + Description

    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
     size(Sequence const& seq);
     
    -
    - - Parameters +
    + + Parameters
    @@ -89,9 +89,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -104,19 +104,20 @@
                 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/sequences/intrinsics/functions/swap.html b/doc/html/fusion/sequence/intrinsic/functions/swap.html similarity index 66% rename from doc/html/fusion/sequences/intrinsics/functions/swap.html rename to doc/html/fusion/sequence/intrinsic/functions/swap.html index f152fae1..a3b45cb2 100644 --- a/doc/html/fusion/sequences/intrinsics/functions/swap.html +++ b/doc/html/fusion/sequence/intrinsic/functions/swap.html @@ -24,25 +24,25 @@ +
    + + 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
    @@ -87,9 +87,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -104,22 +104,18 @@
     

    Semantics: Calls swap(a1, b1) for corresponding elements in seq1 and seq2.

    -
    - - Header +

    + /sequence/intrinsic/swap.hpp> +

    +
    + + Example
    -#include <boost/fusion/sequence/intrinsic/swap.hpp>
    -
    -
    - - 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/sequences/intrinsics/metafunctions.html b/doc/html/fusion/sequence/intrinsic/metafunctions.html similarity index 77% rename from doc/html/fusion/sequences/intrinsics/metafunctions.html rename to doc/html/fusion/sequence/intrinsic/metafunctions.html index 6fad1b69..10dd029d 100644 --- a/doc/html/fusion/sequences/intrinsics/metafunctions.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions.html @@ -5,7 +5,7 @@ - + @@ -20,11 +20,11 @@

    -PrevUpHomeNext +PrevUpHomeNext
    begin
    end
    @@ -49,7 +49,7 @@
    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/fusion/sequences/intrinsics/metafunctions/at.html b/doc/html/fusion/sequence/intrinsic/metafunctions/at.html similarity index 75% rename from doc/html/fusion/sequences/intrinsics/metafunctions/at.html rename to doc/html/fusion/sequence/intrinsic/metafunctions/at.html index 251efddc..f7c9bda0 100644 --- a/doc/html/fusion/sequences/intrinsics/metafunctions/at.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/at.html @@ -24,19 +24,19 @@
    -at
    -
    - - Description +at
    +
    + + Description

    Returns the result type of at - [6] + [5] .

    -
    - - Synopsis +
    + + Synopsis
     template<
    @@ -48,7 +48,7 @@
     };
     
    -

    Table 1.25. Parameters

    +

    Table 1.25. Parameters

    @@ -113,9 +113,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -128,26 +128,22 @@
                 Semantics: Returns the result type of
                 using at to access the Nth element of Seq.
               

    -
    - - Header +

    + /sequence/intrinsic/at.hpp> +

    +
    + + Example
    -#include <boost/fusion/sequence/intrinsic/at.hpp>
    -
    -
    - - Example -
    -
    -typedef vector<int,float,char> vec;
    +typedef vector<int,float,char> vec;
     BOOST_MPL_ASSERT((boost::is_same<result_of::at<vec, boost::mpl::int_<1> >::type, float&>));
     


    -

    [6] +

    [5] result_of::at reflects the actual return - type of the function at. _sequence_s + 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/sequences/intrinsics/metafunctions/at_c.html b/doc/html/fusion/sequence/intrinsic/metafunctions/at_c.html similarity index 74% rename from doc/html/fusion/sequences/intrinsics/metafunctions/at_c.html rename to doc/html/fusion/sequence/intrinsic/metafunctions/at_c.html index cd3fd5b0..a2b22915 100644 --- a/doc/html/fusion/sequences/intrinsics/metafunctions/at_c.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/at_c.html @@ -24,19 +24,19 @@
    +
    + + Description

    Returns the result type of at_c - [7] + [6] .

    -
    - - Synopsis +
    + + Synopsis
     template<
    @@ -48,7 +48,7 @@
     };
     
    -

    Table 1.26. Parameters

    +

    Table 1.26. Parameters

    @@ -112,9 +112,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -127,26 +127,22 @@
                 Semantics: Returns the result type of
                 using at_c to access the Mth element of Seq.
               

    -
    - - Header +

    + /sequence/intrinsic/at.hpp> +

    +
    + + Example
    -#include <boost/fusion/sequence/intrinsic/at.hpp>
    -
    -
    - - Example -
    -
    -typedef vector<int,float,char> vec;
    +typedef vector<int,float,char> vec;
     BOOST_MPL_ASSERT((boost::is_same<result_of::at_c<vec, 1>::type, float&>));
     


    -

    [7] +

    [6] result_of::at_c reflects the actual - return type of the function at_c. _sequence_s + 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/sequences/intrinsics/metafunctions/at_key.html b/doc/html/fusion/sequence/intrinsic/metafunctions/at_key.html similarity index 70% rename from doc/html/fusion/sequences/intrinsics/metafunctions/at_key.html rename to doc/html/fusion/sequence/intrinsic/metafunctions/at_key.html index cb48e6e0..75c3c694 100644 --- a/doc/html/fusion/sequences/intrinsics/metafunctions/at_key.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/at_key.html @@ -24,19 +24,19 @@
    +
    + + Description

    Returns the result type of at_key - [8] + [7] .

    -
    - - Synopsis +
    + + Synopsis
     template<
    @@ -48,7 +48,7 @@
     };
     
    -

    Table 1.30. Parameters

    +

    Table 1.30. Parameters

    @@ -112,9 +112,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -129,24 +129,20 @@
                 with key type Key in
                 Seq.
               

    -
    - - Header +

    + /sequence/intrinsic/at_key.hpp> +

    +
    + + Example
    -#include <boost/fusion/sequence/intrinsic/at_key.hpp>
    -
    -
    - - Example -
    -
    -typedef map<pair<int, char>, pair<char, char>, pair<double, char> > mymap;
    +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] +

    [7] 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 diff --git a/doc/html/fusion/sequences/intrinsics/metafunctions/back.html b/doc/html/fusion/sequence/intrinsic/metafunctions/back.html similarity index 64% rename from doc/html/fusion/sequences/intrinsics/metafunctions/back.html rename to doc/html/fusion/sequence/intrinsic/metafunctions/back.html index d1bf313a..0365efd7 100644 --- a/doc/html/fusion/sequences/intrinsics/metafunctions/back.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/back.html @@ -24,17 +24,17 @@

    +
    + + Description

    Returns the result type of back.

    -
    - - Synopsis +
    + + Synopsis
     template<typename Seq>
    @@ -44,7 +44,7 @@
     };
     
    -

    Table 1.23. Parameters

    +

    Table 1.23. Parameters

    @@ -89,9 +89,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -102,21 +102,17 @@
               

    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. + an iterator to the last element in the sequence. Equivalent to result_of::deref<result_of::prior<result_of::end<Seq>::type>::type>::type.

    -
    - - Header +

    + /sequence/intrinsic/back.hpp> +

    +
    + + Example
    -#include <boost/fusion/sequence/intrinsic/back.hpp>
    -
    -
    - - Example -
    -
    -typedef vector<int,char> vec;
    +typedef vector<int,char> vec;
     BOOST_MPL_ASSERT((boost::is_same<result_of::back<vec>::type, char&>));
     
    diff --git a/doc/html/fusion/sequences/intrinsics/metafunctions/begin.html b/doc/html/fusion/sequence/intrinsic/metafunctions/begin.html similarity index 68% rename from doc/html/fusion/sequences/intrinsics/metafunctions/begin.html rename to doc/html/fusion/sequence/intrinsic/metafunctions/begin.html index 26924148..cc526793 100644 --- a/doc/html/fusion/sequences/intrinsics/metafunctions/begin.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/begin.html @@ -24,17 +24,17 @@ +
    + + Description

    Returns the result type of begin.

    -
    - - Synopsis +
    + + Synopsis
     template<typename Seq>
    @@ -44,7 +44,7 @@
     };
     
    -

    Table 1.19. Parameters

    +

    Table 1.19. Parameters

    @@ -89,9 +89,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -105,21 +105,17 @@
                 Semantics: Returns the type of an iterator
                 to the first element of Seq.
               

    -
    - - Header +

    + /sequence/intrinsic/begin.hpp> +

    +
    + + Example
    -#include <boost/fusion/sequence/intrinsic/begin.hpp>
    -
    -
    - - Example -
    -
    -typedef vector<int> vec;
    +typedef vector<int> vec;
     typedef result_of::begin<vec>::type it;
    -BOOST_MPL_ASSERT((boost::is_same<result_of::deref<it>::type, int&>))
    +BOOST_MPL_ASSERT((boost::is_same<result_of::deref<it>::type, int&>))
     
    diff --git a/doc/html/fusion/sequences/intrinsics/metafunctions/empty.html b/doc/html/fusion/sequence/intrinsic/metafunctions/empty.html similarity index 70% rename from doc/html/fusion/sequences/intrinsics/metafunctions/empty.html rename to doc/html/fusion/sequence/intrinsic/metafunctions/empty.html index 76262192..27d8865d 100644 --- a/doc/html/fusion/sequences/intrinsics/metafunctions/empty.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/empty.html @@ -24,17 +24,17 @@ +
    + + Description

    Returns the result type of empty.

    -
    - - Synopsis +
    + + Synopsis
     template<typename Seq>
    @@ -44,7 +44,7 @@
     };
     
    -

    Table 1.21. Parameters

    +

    Table 1.21. Parameters

    @@ -89,9 +89,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -106,20 +106,16 @@
                 if Seq has zero elements,
                 mpl::false_ otherwise.
               

    -
    - - Header +

    + /sequence/intrinsic/empty.hpp> +

    +
    + + Example
    -#include <boost/fusion/sequence/intrinsic/empty.hpp>
    -
    -
    - - 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>));
    diff --git a/doc/html/fusion/sequences/intrinsics/metafunctions/end.html b/doc/html/fusion/sequence/intrinsic/metafunctions/end.html
    similarity index 59%
    rename from doc/html/fusion/sequences/intrinsics/metafunctions/end.html
    rename to doc/html/fusion/sequence/intrinsic/metafunctions/end.html
    index b4faf2c0..c9419800 100644
    --- a/doc/html/fusion/sequences/intrinsics/metafunctions/end.html
    +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/end.html
    @@ -24,17 +24,17 @@
     
     
    +
    + + Description

    Returns the result type of end.

    -
    - - Synopsis +
    + + Synopsis
     template<typename Seq>
    @@ -44,7 +44,7 @@
     };
     
    -

    Table 1.20. Parameters

    +

    Table 1.20. Parameters

    @@ -89,9 +89,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -105,21 +105,17 @@
                 Semantics: Returns the type of an iterator
                 one past the end of Seq.
               

    -
    - - Header +

    + /sequence/intrinsic/end.hpp> +

    +
    + + Example
    -#include <boost/fusion/sequence/intrinsic/end.hpp>
    -
    -
    - - 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/sequences/intrinsics/metafunctions/front.html b/doc/html/fusion/sequence/intrinsic/metafunctions/front.html similarity index 66% rename from doc/html/fusion/sequences/intrinsics/metafunctions/front.html rename to doc/html/fusion/sequence/intrinsic/metafunctions/front.html index 009c07d6..f4692da3 100644 --- a/doc/html/fusion/sequences/intrinsics/metafunctions/front.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/front.html @@ -24,17 +24,17 @@ +
    + + Description

    Returns the result type of front.

    -
    - - Synopsis +
    + + Synopsis
     template<typename Seq>
    @@ -44,7 +44,7 @@
     };
     
    -

    Table 1.22. Parameters

    +

    Table 1.22. Parameters

    @@ -89,9 +89,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -103,21 +103,17 @@
     

    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. + Equivalent to result_of::deref<result_of::begin<Seq>::type>::type.

    -
    - - Header +

    + /sequence/intrinsic/front.hpp> +

    +
    + + Example
    -#include <boost/fusion/sequence/intrinsic/front.hpp>
    -
    -
    - - Example -
    -
    -typedef vector<int,char> vec;
    +typedef vector<int,char> vec;
     BOOST_MPL_ASSERT((boost::is_same<result_of::front<vec>::type, int&>));
     
    diff --git a/doc/html/fusion/sequences/intrinsics/metafunctions/has_key.html b/doc/html/fusion/sequence/intrinsic/metafunctions/has_key.html similarity index 69% rename from doc/html/fusion/sequences/intrinsics/metafunctions/has_key.html rename to doc/html/fusion/sequence/intrinsic/metafunctions/has_key.html index 03e83d4b..d0b79c1f 100644 --- a/doc/html/fusion/sequences/intrinsics/metafunctions/has_key.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/has_key.html @@ -24,17 +24,17 @@ +
    + + Description

    Returns the result type of has_key.

    -
    - - Synopsis +
    + + Synopsis
     template<
    @@ -46,7 +46,7 @@
     };
     
    -

    Table 1.29. Parameters

    +

    Table 1.29. Parameters

    @@ -110,9 +110,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -128,19 +128,15 @@
                 with key type Key, returns
                 mpl::false_ otherwise.
               

    -
    - - Header +

    + /sequence/intrinsic/has_key.hpp> +

    +
    + + Example
    -#include <boost/fusion/sequence/intrinsic/has_key.hpp>
    -
    -
    - - Example -
    -
    -typedef map<pair<int, char>, pair<char, char>, pair<double, char> > mymap;
    +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/sequences/intrinsics/metafunctions/size.html b/doc/html/fusion/sequence/intrinsic/metafunctions/size.html similarity index 72% rename from doc/html/fusion/sequences/intrinsics/metafunctions/size.html rename to doc/html/fusion/sequence/intrinsic/metafunctions/size.html index 50cec0bf..ad213511 100644 --- a/doc/html/fusion/sequences/intrinsics/metafunctions/size.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/size.html @@ -24,17 +24,17 @@ +
    + + Description

    Returns the result type of size.

    -
    - - Synopsis +
    + + Synopsis
     template<typename Seq>
    @@ -44,7 +44,7 @@
     };
     
    -

    Table 1.24. Parameters

    +

    Table 1.24. Parameters

    @@ -89,9 +89,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -105,19 +105,15 @@
                 Semantics: Returns the number of elements
                 in Seq.
               

    -
    - - Header +

    + /sequence/intrinsic/size.hpp> +

    +
    + + Example
    -#include <boost/fusion/sequence/intrinsic/size.hpp>
    -
    -
    - - Example -
    -
    -typedef vector<int,float,char> vec;
    +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/sequences/intrinsics/metafunctions/swap.html b/doc/html/fusion/sequence/intrinsic/metafunctions/swap.html similarity index 72% rename from doc/html/fusion/sequences/intrinsics/metafunctions/swap.html rename to doc/html/fusion/sequence/intrinsic/metafunctions/swap.html index 01cb7598..54ea2452 100644 --- a/doc/html/fusion/sequences/intrinsics/metafunctions/swap.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/swap.html @@ -7,7 +7,7 @@ - + @@ -20,21 +20,21 @@

    -PrevUpHomeNext +PrevUpHomeNext
    +
    + + Description

    Returns the return type of swap.

    -
    - - Synopsis +
    + + Synopsis
     template<typename Seq1, typename Seq2>
    @@ -44,7 +44,7 @@
     };
     
    -

    Table 1.32. Parameters

    +

    Table 1.32. Parameters

    @@ -89,9 +89,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -103,13 +103,9 @@
     

    Semantics: Always returns void.

    -
    - - Header -
    -
    -#include <boost/fusion/sequence/intrinsic/swap.hpp>
    -
    +

    + /sequence/intrinsic/swap.hpp> +

    @@ -118,7 +114,7 @@

    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/fusion/sequences/intrinsics/metafunctions/value_at.html b/doc/html/fusion/sequence/intrinsic/metafunctions/value_at.html similarity index 73% rename from doc/html/fusion/sequences/intrinsics/metafunctions/value_at.html rename to doc/html/fusion/sequence/intrinsic/metafunctions/value_at.html index 9c2e2a90..7a993d28 100644 --- a/doc/html/fusion/sequences/intrinsics/metafunctions/value_at.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/value_at.html @@ -24,17 +24,17 @@ +
    + + 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<
    @@ -46,7 +46,7 @@
     };
     
    -

    Table 1.27. Parameters

    +

    Table 1.27. Parameters

    @@ -111,9 +111,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -126,19 +126,15 @@
                 Semantics: Returns the actual type at
                 the Nth element of Seq.
               

    -
    - - Header +

    + /sequence/intrinsic/value_at.hpp> +

    +
    + + Example
    -#include <boost/fusion/sequence/intrinsic/value_at.hpp>
    -
    -
    - - Example -
    -
    -typedef vector<int,float,char> vec;
    +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/sequences/intrinsics/metafunctions/value_at_c.html b/doc/html/fusion/sequence/intrinsic/metafunctions/value_at_c.html similarity index 71% rename from doc/html/fusion/sequences/intrinsics/metafunctions/value_at_c.html rename to doc/html/fusion/sequence/intrinsic/metafunctions/value_at_c.html index beb2a706..1b16380f 100644 --- a/doc/html/fusion/sequences/intrinsics/metafunctions/value_at_c.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/value_at_c.html @@ -24,17 +24,17 @@ +
    + + 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<
    @@ -46,7 +46,7 @@
     };
     
    -

    Table 1.28. Parameters

    +

    Table 1.28. Parameters

    @@ -110,9 +110,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -125,19 +125,15 @@
                 Semantics: Returns the actual type at
                 the Mth element of Seq.
               

    -
    - - Header +

    + /sequence/intrinsic/value_at.hpp> +

    +
    + + Example
    -#include <boost/fusion/sequence/intrinsic/value_at.hpp>
    -
    -
    - - Example -
    -
    -typedef vector<int,float,char> vec;
    +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/sequences/intrinsics/metafunctions/value_at_key.html b/doc/html/fusion/sequence/intrinsic/metafunctions/value_at_key.html similarity index 66% rename from doc/html/fusion/sequences/intrinsics/metafunctions/value_at_key.html rename to doc/html/fusion/sequence/intrinsic/metafunctions/value_at_key.html index f3395e58..87c91804 100644 --- a/doc/html/fusion/sequences/intrinsics/metafunctions/value_at_key.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/value_at_key.html @@ -24,17 +24,17 @@ +
    + + 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<
    @@ -46,7 +46,7 @@
     };
     
    -

    Table 1.31. Parameters

    +

    Table 1.31. Parameters

    @@ -110,9 +110,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -126,19 +126,15 @@
                 type associated with key type Key
                 in Seq.
               

    -
    - - Header +

    + /sequence/intrinsic/value_at_key.hpp> +

    +
    + + Example
    -#include <boost/fusion/sequence/intrinsic/value_at_key.hpp>
    -
    -
    - - Example -
    -
    -typedef map<pair<int, char>, pair<char, char>, pair<double, char> > mymap;
    +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/sequences/operators.html b/doc/html/fusion/sequence/operator.html similarity index 50% rename from doc/html/fusion/sequences/operators.html rename to doc/html/fusion/sequence/operator.html index b073cf2d..840d5421 100644 --- a/doc/html/fusion/sequences/operators.html +++ b/doc/html/fusion/sequence/operator.html @@ -1,13 +1,13 @@ -Operators +Operator - - - + + + @@ -20,17 +20,17 @@

    -PrevUpHomeNext +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.

    @@ -42,7 +42,7 @@
    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/fusion/sequences/operators/comparison.html b/doc/html/fusion/sequence/operator/comparison.html similarity index 71% rename from doc/html/fusion/sequences/operators/comparison.html rename to doc/html/fusion/sequence/operator/comparison.html index fe52cb60..630081a7 100644 --- a/doc/html/fusion/sequences/operators/comparison.html +++ b/doc/html/fusion/sequence/operator/comparison.html @@ -5,7 +5,7 @@ - + @@ -20,11 +20,11 @@
    -PrevUpHomeNext +PrevUpHomeNext
    equal
    not @@ -47,12 +47,13 @@ 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>
     
    @@ -62,7 +63,7 @@

    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/fusion/sequences/operators/comparison/equal.html b/doc/html/fusion/sequence/operator/comparison/equal.html similarity index 71% rename from doc/html/fusion/sequences/operators/comparison/equal.html rename to doc/html/fusion/sequence/operator/comparison/equal.html index 59bfbe55..308a702a 100644 --- a/doc/html/fusion/sequences/operators/comparison/equal.html +++ b/doc/html/fusion/sequence/operator/comparison/equal.html @@ -25,26 +25,26 @@ +
    + + Description

    Compare two sequences for equality.

    -
    - - Synopsis +
    + + Synopsis
     template <typename Seq1, typename Seq2>
     bool
     operator==(Seq1 const& a, Seq2 const& b);
     
    -
    - - Parameters +
    + + Parameters
    @@ -78,19 +78,19 @@

    - Instances of Sequence + Instances of Sequence

    - _sequence_s to compare + Sequence(s) to compare

    -
    - - Expression +
    + + Expression Semantics
    @@ -124,20 +124,21 @@
                 _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/sequences/operators/comparison/greater_than.html b/doc/html/fusion/sequence/operator/comparison/greater_than.html similarity index 69% rename from doc/html/fusion/sequences/operators/comparison/greater_than.html rename to doc/html/fusion/sequence/operator/comparison/greater_than.html index ec62de5e..a294b71d 100644 --- a/doc/html/fusion/sequences/operators/comparison/greater_than.html +++ b/doc/html/fusion/sequence/operator/comparison/greater_than.html @@ -27,24 +27,24 @@

    Lexicographically compare two sequences.

    -
    - - Synopsis +
    + + Synopsis
     template <typename Seq1, typename Seq2>
     bool
     operator>(Seq1 const& a, Seq2 const& b);
     
    -
    - - Parameters +
    + + Parameters
    @@ -78,19 +78,19 @@

    - Instances of Sequence + Instances of Sequence

    - _sequence_s to compare + Sequence(s) to compare

    -
    - - Expression +
    + + Expression Semantics
    @@ -116,21 +116,22 @@
     

    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/sequences/operators/comparison/greater_than_equal.html b/doc/html/fusion/sequence/operator/comparison/greater_than_equal.html similarity index 66% rename from doc/html/fusion/sequences/operators/comparison/greater_than_equal.html rename to doc/html/fusion/sequence/operator/comparison/greater_than_equal.html index 68c5acbb..39e22afb 100644 --- a/doc/html/fusion/sequences/operators/comparison/greater_than_equal.html +++ b/doc/html/fusion/sequence/operator/comparison/greater_than_equal.html @@ -9,7 +9,7 @@ - + @@ -22,28 +22,28 @@

    -PrevUpHomeNext +PrevUpHomeNext

    Lexicographically compare two sequences.

    -
    - - Synopsis +
    + + Synopsis
     template <typename Seq1, typename Seq2>
     bool
     operator>=(Seq1 const& a, Seq2 const& b);
     
    -
    - - Parameters +
    + + Parameters
    @@ -77,19 +77,19 @@

    - Instances of Sequence + Instances of Sequence

    - _sequence_s to compare + Sequence(s) to compare

    -
    - - Expression +
    + + Expression Semantics
    @@ -115,21 +115,22 @@
     

    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);
     
    @@ -141,7 +142,7 @@
    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/fusion/sequences/operators/comparison/less_than.html b/doc/html/fusion/sequence/operator/comparison/less_than.html similarity index 70% rename from doc/html/fusion/sequences/operators/comparison/less_than.html rename to doc/html/fusion/sequence/operator/comparison/less_than.html index ca68920c..c97cf071 100644 --- a/doc/html/fusion/sequences/operators/comparison/less_than.html +++ b/doc/html/fusion/sequence/operator/comparison/less_than.html @@ -27,24 +27,24 @@

    Lexicographically compare two sequences.

    -
    - - Synopsis +
    + + Synopsis
     template <typename Seq1, typename Seq2>
     bool
     operator<(Seq1 const& a, Seq2 const& b);
     
    -
    - - Parameters +
    + + Parameters
    @@ -78,19 +78,19 @@

    - Instances of Sequence + Instances of Sequence

    - _sequence_s to compare + Sequence(s) to compare

    -
    - - Expression +
    + + Expression Semantics
    @@ -118,21 +118,22 @@
                 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/sequences/operators/comparison/less_than_equal.html b/doc/html/fusion/sequence/operator/comparison/less_than_equal.html similarity index 69% rename from doc/html/fusion/sequences/operators/comparison/less_than_equal.html rename to doc/html/fusion/sequence/operator/comparison/less_than_equal.html index 13ceddac..4c97e022 100644 --- a/doc/html/fusion/sequences/operators/comparison/less_than_equal.html +++ b/doc/html/fusion/sequence/operator/comparison/less_than_equal.html @@ -27,24 +27,24 @@

    Lexicographically compare two sequences.

    -
    - - Synopsis +
    + + Synopsis
     template <typename Seq1, typename Seq2>
     bool
     operator<=(Seq1 const& a, Seq2 const& b);
     
    -
    - - Parameters +
    + + Parameters
    @@ -78,19 +78,19 @@

    - Instances of Sequence + Instances of Sequence

    - _sequence_s to compare + Sequence(s) to compare

    -
    - - Expression +
    + + Expression Semantics
    @@ -116,21 +116,22 @@
     

    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/sequences/operators/comparison/not_equal.html b/doc/html/fusion/sequence/operator/comparison/not_equal.html similarity index 71% rename from doc/html/fusion/sequences/operators/comparison/not_equal.html rename to doc/html/fusion/sequence/operator/comparison/not_equal.html index aff5882b..8fea823c 100644 --- a/doc/html/fusion/sequences/operators/comparison/not_equal.html +++ b/doc/html/fusion/sequence/operator/comparison/not_equal.html @@ -26,24 +26,24 @@

    Compare two sequences for inequality.

    -
    - - Synopsis +
    + + Synopsis
     template <typename Seq1, typename Seq2>
     bool
     operator!=(Seq1 const& a, Seq2 const& b);
     
    -
    - - Parameters +
    + + Parameters
    @@ -77,19 +77,19 @@

    - Instances of Sequence + Instances of Sequence

    - _sequence_s to compare + Sequence(s) to compare

    -
    - - Expression +
    + + Expression Semantics
    @@ -118,20 +118,21 @@
     

    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/sequences/operators/i_o.html b/doc/html/fusion/sequence/operator/i_o.html
    similarity index 64%
    rename from doc/html/fusion/sequences/operators/i_o.html
    rename to doc/html/fusion/sequence/operator/i_o.html
    index baf03cbf..ebfc0271 100644
    --- a/doc/html/fusion/sequences/operators/i_o.html
    +++ b/doc/html/fusion/sequence/operator/i_o.html
    @@ -5,8 +5,8 @@
     
     
     
    -
    -
    +
    +
     
     
     
    @@ -20,11 +20,11 @@
     
     
    -PrevUpHomeNext +PrevUpHomeNext

    -I/O

    +I/O
    in
    out
    @@ -33,22 +33,23 @@ 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 + 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 + 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 as: (1.0 2 Howdy folks!) + outputs the vector + as: (1.0 2 Howdy folks!)

    The library defines three manipulators for changing the default behavior: @@ -82,7 +83,7 @@ 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!]

    @@ -97,29 +98,30 @@ 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 + Note that extracting Sequence(s) with std::string or C-style string elements does - not generally work, since the streamed Sequence + 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>
     
    @@ -129,7 +131,7 @@

    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/fusion/sequences/operators/i_o/in.html b/doc/html/fusion/sequence/operator/i_o/in.html similarity index 72% rename from doc/html/fusion/sequences/operators/i_o/in.html rename to doc/html/fusion/sequence/operator/i_o/in.html index bfac3141..a9e48b58 100644 --- a/doc/html/fusion/sequences/operators/i_o/in.html +++ b/doc/html/fusion/sequence/operator/i_o/in.html @@ -24,27 +24,27 @@
    -in
    -
    - - Description +in
    +
    + + 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
    @@ -95,7 +95,7 @@

    - A Sequence. + A Sequence.

    @@ -106,9 +106,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -122,19 +122,20 @@
                 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/sequences/operators/i_o/out.html b/doc/html/fusion/sequence/operator/i_o/out.html similarity index 71% rename from doc/html/fusion/sequences/operators/i_o/out.html rename to doc/html/fusion/sequence/operator/i_o/out.html index 80ca62f7..5a1774bd 100644 --- a/doc/html/fusion/sequences/operators/i_o/out.html +++ b/doc/html/fusion/sequence/operator/i_o/out.html @@ -24,27 +24,27 @@ +
    + + 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
    @@ -95,7 +95,7 @@

    - A Sequence. + A Sequence.

    @@ -106,9 +106,9 @@
    -
    - - Expression +
    + + Expression Semantics
    @@ -122,19 +122,20 @@
                 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/sequences.html b/doc/html/fusion/sequences.html deleted file mode 100644 index 8401c4a8..00000000 --- a/doc/html/fusion/sequences.html +++ /dev/null @@ -1,115 +0,0 @@ - - - -Sequences - - - - - - - - -
    - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -
    -
    -PrevUpHomeNext -
    -
    - - -

    - Like MPL, the - Sequence is a fundamental concept in Fusion. A Sequence may or may not actually - store or contain data. Containers - 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 - type that can be used to iterate through the Sequence's elements. -

    -

    - - Header -

    -
    -#include <boost/fusion/sequence.hpp>
    -
    -
    - - - -
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias - Schwinger
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/fusion/sequences/adapted.html b/doc/html/fusion/sequences/adapted.html deleted file mode 100644 index a9c16943..00000000 --- a/doc/html/fusion/sequences/adapted.html +++ /dev/null @@ -1,73 +0,0 @@ - - - -Adapted - - - - - - - - - - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -
    -
    -PrevUpHomeNext -
    -
    - - -

    - 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. 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 - [4] - . -

    -

    - - Header -

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

    -

    [4] - Fusion sequences may also be adapted as fully conforming MPL - sequences (see Intrinsics). - That way, we can have 2-way adaptation to and from MPL - and Fusion -

    -
    -
    - - - -
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias - Schwinger
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/fusion/sequences/adapted/boost__array.html b/doc/html/fusion/sequences/adapted/boost__array.html deleted file mode 100644 index 7a5ceae1..00000000 --- a/doc/html/fusion/sequences/adapted/boost__array.html +++ /dev/null @@ -1,80 +0,0 @@ - - - -boost::array - - - - - - - - - - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -
    -
    -PrevUpHomeNext -
    -
    - -

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

    -
    - - Header -
    -
    -#include <boost/fusion/sequence/adapted/array.hpp>
    -
    -
    - - Model of -
    - -
    - - 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;
    -
    -
    - - See also -
    -

    - Boost.Array Library -

    -
    - - - -
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias - Schwinger
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/fusion/sequences/adapted/boost__tuple.html b/doc/html/fusion/sequences/adapted/boost__tuple.html deleted file mode 100644 index 18d00ad5..00000000 --- a/doc/html/fusion/sequences/adapted/boost__tuple.html +++ /dev/null @@ -1,76 +0,0 @@ - - - -boost::tuple - - - - - - - - - - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -
    -
    -PrevUpHomeNext -
    -
    - -

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

    -
    - - Header -
    -
    -#include <boost/fusion/sequence/adapted/boost_tuple.hpp>
    -
    -
    - - 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 -
    -

    - Boost.Tuple - Library -

    -
    - - - -
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias - Schwinger
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/fusion/sequences/adapted/boost__variant.html b/doc/html/fusion/sequences/adapted/boost__variant.html deleted file mode 100644 index 3f91a088..00000000 --- a/doc/html/fusion/sequences/adapted/boost__variant.html +++ /dev/null @@ -1,80 +0,0 @@ - - - -boost::variant - - - - - - - - - - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -
    -
    -PrevUpHomeNext -
    -
    - -

    - This module provides adapters for boost::variant. - Including the module header makes boost::variant - a fully conforming Forward - Sequence. The variant acts as a sequence of the types that can be - contained in the variant. Accessing types not currently stored int the - variant will lead to the variant being populated with a default constructed - value of that type. -

    -
    - - Header -
    -
    -#include <boost/fusion/sequence/adapted/variant.hpp>
    -
    -
    - - Model - of -
    - -
    - - Example -
    -
    -boost::variant<int,std::string> example_variant = 101;
    -std::cout << example_variant << '\n';
    -*boost::fusion::find<std::string>(example_variant) = "hello";
    -std::cout << example_variant << '\n';
    -
    -
    - - See also -
    -

    - Boost.Variant Library -

    -
    - - - -
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias - Schwinger
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/fusion/sequences/adapted/mpl_sequence.html b/doc/html/fusion/sequences/adapted/mpl_sequence.html deleted file mode 100644 index 4a2245ef..00000000 --- a/doc/html/fusion/sequences/adapted/mpl_sequence.html +++ /dev/null @@ -1,96 +0,0 @@ - - - -mpl sequence - - - - - - - - - - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -
    -
    -PrevUpHomeNext -
    -
    - -

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

    -
    - - Header -
    -
    -#include <boost/fusion/sequence/adapted/mpl.hpp>
    -
    -
    - - Model of -
    -
    -
    - - Example -
    -
    -mpl::vector_c<int, 123, 456> vec_c;
    -fusion::vector2<int, long> v(vec_c);
    -std::cout << at_c<0>(v) << std::endl;
    -std::cout << at_c<1>(v) << std::endl;
    -
    -v = mpl::vector_c<int, 456, 789>();
    -std::cout << at_c<0>(v) << std::endl;
    -std::cout << at_c<1>(v) << std::endl;
    -
    -
    - - See also -
    -

    - MPL -

    -
    - - - -
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias - Schwinger
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/fusion/sequences/adapted/std__pair.html b/doc/html/fusion/sequences/adapted/std__pair.html deleted file mode 100644 index 33e23443..00000000 --- a/doc/html/fusion/sequences/adapted/std__pair.html +++ /dev/null @@ -1,79 +0,0 @@ - - - -std::pair - - - - - - - - - - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -
    -
    -PrevUpHomeNext -
    -
    - -

    - This module provides adapters for std::pair. - Including the module header makes std::pair - a fully conforming Random - Access Sequence. -

    -
    - - Header -
    -
    -#include <boost/fusion/sequence/adapted/std_pair.hpp>
    -
    -
    - - Model of -
    - -
    - - Example -
    -
    -std::pair<int, std::string> p(123, "Hola!!!");
    -std::cout << at_c<0>(p) << std::endl;
    -std::cout << at_c<1>(p) << std::endl;
    -std::cout << p << std::endl;
    -
    -
    - - See also -
    -

    - std::pair, - TR1 - and std::pair -

    -
    - - - -
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias - Schwinger
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/fusion/sequences/containers.html b/doc/html/fusion/sequences/containers.html deleted file mode 100644 index 3aaeab63..00000000 --- a/doc/html/fusion/sequences/containers.html +++ /dev/null @@ -1,59 +0,0 @@ - - - -Containers - - - - - - - - - - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -
    -
    -PrevUpHomeNext -
    -
    - - -

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

    -

    - - Header -

    -
    -#include <boost/fusion/sequence/container.hpp>
    -
    -
    - - - -
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias - Schwinger
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/fusion/sequences/containers/cons.html b/doc/html/fusion/sequences/containers/cons.html deleted file mode 100644 index 2cfb5359..00000000 --- a/doc/html/fusion/sequences/containers/cons.html +++ /dev/null @@ -1,321 +0,0 @@ - - - -cons - - - - - - - - - - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -
    -
    -PrevUpHomeNext -
    -
    - -
    - - 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 - is constructed piecemeal (a data at a time). The runtime cost of access - to each element is peculiarly constant (see Recursive - Inlined Functions). -

    -
    - - Header -
    -
    -#include <boost/fusion/sequence/container/list/cons.hpp>
    -
    -
    - - Synopsis -
    -
    -template <typename Car, typename Cdr = nil>
    -struct cons;
    -
    -
    - - Template - parameters -
    -
    ----- - - - - - - - - - - - - - - - - - -
    -

    - Parameter -

    -
    -

    - Description -

    -
    -

    - Default -

    -
    -

    - Car -

    -
    -

    - Head type -

    -
    -

    -

    -
    -

    - Cdr -

    -
    -

    - Tail type -

    -
    -

    - nil -

    -
    -
    - - Model of -
    - -
    -

    Notation

    -
    -
    nil
    -

    - An empty cons -

    -
    C
    -

    - A cons type -

    -
    l, - l2
    -

    - Instances of cons -

    -
    car
    -

    - An arbitrary data -

    -
    cdr
    -

    - Another cons list -

    -
    s
    -

    - A Forward - Sequence -

    -
    N
    -

    - An MPL - Integral Constant -

    -
    -
    -
    - - Expression - Semantics -
    -

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

    -
    ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    - Expression -

    -
    -

    - Semantics -

    -
    -

    - nil() -

    -
    -

    - Creates an empty list. -

    -
    -

    - C() -

    -
    -

    - Creates a cons with default constructed elements. -

    -
    -

    - 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(s) -

    -
    -

    - Copy constructs a cons 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. -

    -
    - -
    - - 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;
    -
    -
    - - - -
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias - Schwinger
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/fusion/sequences/containers/list.html b/doc/html/fusion/sequences/containers/list.html deleted file mode 100644 index 53979305..00000000 --- a/doc/html/fusion/sequences/containers/list.html +++ /dev/null @@ -1,289 +0,0 @@ - - - -list - - - - - - - - - - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -
    -
    -PrevUpHomeNext -
    -
    - -
    - - Description -
    -

    - 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). -

    -
    - - Header -
    -
    -#include <boost/fusion/sequence/container/list.hpp>
    -#include <boost/fusion/sequence/container/list/list_forward.hpp>
    -
    -
    - - Synopsis -
    -
    -template <
    -    typename T0 = unspecified
    -  , typename T1 = unspecified
    -  , typename T2 = unspecified
    -    ...
    -  , typename TN = unspecified
    ->
    -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. - Example: -

    -
    -list<int, char, double>
    -
    -

    - 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 -
    -
    ----- - - - - - - - - - - -
    -

    - Parameter -

    -
    -

    - Description -

    -
    -

    - Default -

    -
    -

    - T0...TN -

    -
    -

    - Element types -

    -
    -

    - unspecified-type -

    -
    -
    - - Model of -
    - -
    -

    Notation

    -
    -
    L
    -

    - A list type -

    -
    l
    -

    - An instance of list -

    -
    e0...en
    -

    - Heterogeneous values -

    -
    s
    -

    - A Forward - Sequence -

    -
    N
    -

    - An MPL - Integral Constant -

    -
    -
    -
    - - Expression - Semantics -
    -

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

    -
    ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    - Expression -

    -
    -

    - Semantics -

    -
    -

    - L() -

    -
    -

    - Creates a list with default constructed elements. -

    -
    -

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

    -
    -

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

    -
    -

    - L(s) -

    -
    -

    - Copy constructs a list 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. -

    -
    - -
    - - Example -
    -
    -list<int, float> l(12, 5.5f);
    -std::cout << at_c<0>(l) << std::endl;
    -std::cout << at_c<1>(l) << std::endl;
    -
    -
    - - - -
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias - Schwinger
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/fusion/sequences/containers/map.html b/doc/html/fusion/sequences/containers/map.html deleted file mode 100644 index aa008e09..00000000 --- a/doc/html/fusion/sequences/containers/map.html +++ /dev/null @@ -1,278 +0,0 @@ - - - -map - - - - - - - - - - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -
    -
    -PrevUpHomeNext -
    -
    -

    -map

    -
    - - Description -
    -

    - map is an Associative - Sequence of heteregenous typed data elements. Each element is a - key/data 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). -

    -
    - - Header -
    -
    -#include <boost/fusion/sequence/container/map.hpp>
    -
    -
    - - Synopsis -
    -
    -template <
    -    typename T0 = unspecified
    -  , typename T1 = unspecified
    -  , typename T2 = unspecified
    -    ...
    -  , typename TN = unspecified
    ->
    -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. - Example: -

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

    - 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 -
    -
    ----- - - - - - - - - - - -
    -

    - Parameter -

    -
    -

    - Description -

    -
    -

    - Default -

    -
    -

    - T0...TN -

    -
    -

    - Element types -

    -
    -

    - unspecified-type -

    -
    -
    - - Model of -
    - -
    -

    Notation

    -
    -
    M
    -

    - A map type -

    -
    m
    -

    - An instance of map -

    -
    e0...en
    -

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

    -
    s
    -

    - A Forward - Sequence -

    -
    -
    -
    - - Expression - Semantics -
    -

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

    -
    ---- - - - - - - - - - - - - - - - - - - - - - - -
    -

    - Expression -

    -
    -

    - Semantics -

    -
    -

    - M() -

    -
    -

    - Creates a map with default constructed elements. -

    -
    -

    - 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 -

    -
    -

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

    -
    -
    - - Example -
    -
    -typedef map<
    -    pair<int, char>
    -  , pair<double, std::string> >
    -map_type;
    -
    -map_type m(
    -    make_pair<int>('X')
    -  , make_pair<double>("Men"));
    -
    -std::cout << at_key<int>(m) << std::endl;
    -std::cout << at_key<double>(m) << std::endl;
    -
    -
    - - - -
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias - Schwinger
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/fusion/sequences/containers/set.html b/doc/html/fusion/sequences/containers/set.html deleted file mode 100644 index 27a4d5a1..00000000 --- a/doc/html/fusion/sequences/containers/set.html +++ /dev/null @@ -1,270 +0,0 @@ - - - -set - - - - - - - - - - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -
    -
    -PrevUpHomeNext -
    -
    -

    -set

    -
    - - Description -
    -

    - 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 - Functions). -

    -
    - - Header -
    -
    -#include <boost/fusion/sequence/container/set.hpp>
    -
    -
    - - Synopsis -
    -
    -template <
    -    typename T0 = unspecified
    -  , typename T1 = unspecified
    -  , typename T2 = unspecified
    -    ...
    -  , typename TN = unspecified
    ->
    -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. - Example: -

    -
    -set<int, char, double>
    -
    -

    - 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 -
    -
    ----- - - - - - - - - - - -
    -

    - Parameter -

    -
    -

    - Description -

    -
    -

    - Default -

    -
    -

    - T0...TN -

    -
    -

    - Element types -

    -
    -

    - unspecified-type -

    -
    -
    - - Model of -
    - -
    -

    Notation

    -
    -
    S
    -

    - A set type -

    -
    s
    -

    - An instance of set -

    -
    e0...en
    -

    - Heterogeneous values -

    -
    fs
    -

    - A Forward - Sequence -

    -
    -
    -
    - - Expression - Semantics -
    -

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

    -
    ---- - - - - - - - - - - - - - - - - - - - - - - -
    -

    - Expression -

    -
    -

    - Semantics -

    -
    -

    - S() -

    -
    -

    - Creates a set with default constructed elements. -

    -
    -

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

    -
    -

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

    -
    -

    - S(fs) -

    -
    -

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

    -
    -

    - s = - fs -

    -
    -

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

    -
    -
    - - 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;
    -
    -
    - - - -
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias - Schwinger
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/fusion/sequences/containers/vector.html b/doc/html/fusion/sequences/containers/vector.html deleted file mode 100644 index 3171d7da..00000000 --- a/doc/html/fusion/sequences/containers/vector.html +++ /dev/null @@ -1,300 +0,0 @@ - - - -vector - - - - - - - - - - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -
    -
    -PrevUpHomeNext -
    -
    - -
    - - Description -
    -

    - 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 - is the simplest of the Fusion sequence container, and in many cases the - most efficient. -

    -
    - - Header -
    -
    -#include <boost/fusion/sequence/container/vector.hpp>
    -#include <boost/fusion/sequence/container/vector/vector_fwd.hpp>
    -
    -// numbered forms
    -#include <boost/fusion/sequence/container/vector/vector10.hpp>
    -#include <boost/fusion/sequence/container/vector/vector20.hpp>
    -#include <boost/fusion/sequence/container/vector/vector30.hpp>
    -#include <boost/fusion/sequence/container/vector/vector40.hpp>
    -#include <boost/fusion/sequence/container/vector/vector50.hpp>
    -
    -
    - - Synopsis -
    -

    - Numbered forms -

    -
    -template <>
    -struct vector0;
    -
    -template <typename T0>
    -struct vector1;
    -
    -template <typename T0, typename T1>
    -struct vector2;
    -
    -template <typename T0, typename T1, typename T2>
    -struct vector3;
    -
    -...
    -
    -template <typename T0, typename T1, typename T2..., typename TN>
    -struct vectorN;
    -
    -

    - Variadic form -

    -
    -template <
    -    typename T0 = unspecified
    -  , typename T1 = unspecified
    -  , typename T2 = unspecified
    -    ...
    -  , typename TN = unspecified
    ->
    -struct vector;
    -
    -

    - The numbered form accepts the exact number of elements. Example: -

    -
    -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. - Example: -

    -
    -vector<int, char, double>
    -
    -

    - 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 -
    -
    ----- - - - - - - - - - - -
    -

    - Parameter -

    -
    -

    - Description -

    -
    -

    - Default -

    -
    -

    - T0...TN -

    -
    -

    - Element types -

    -
    -

    - unspecified -

    -
    -
    - - Model of -
    - -
    -

    Notation

    -
    -
    v
    -

    - Instance of vector -

    -
    V
    -

    - A vector type -

    -
    e0...en
    -

    - Heterogeneous values -

    -
    s
    -

    - A Forward - Sequence -

    -
    -
    -
    - - Expression - Semantics -
    -

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

    -
    ---- - - - - - - - - - - - - - - - - - - - - - - -
    -

    - Expression -

    -
    -

    - Semantics -

    -
    -

    - V() -

    -
    -

    - Creates a vector with default constructed elements. -

    -
    -

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

    -
    -

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

    -
    -

    - V(s) -

    -
    -

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

    -
    -

    - v = - s -

    -
    -

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

    -
    -
    - - Example -
    -
    -vector<int, float> v(12, 5.5f);
    -std::cout << at_c<0>(v) << std::endl;
    -std::cout << at_c<1>(v) << std::endl;
    -
    -
    - - - -
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias - Schwinger
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/fusion/sequences/intrinsics.html b/doc/html/fusion/sequences/intrinsics.html deleted file mode 100644 index 5581fba4..00000000 --- a/doc/html/fusion/sequences/intrinsics.html +++ /dev/null @@ -1,67 +0,0 @@ - - - -Intrinsics - - - - - - - - - - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -
    -
    -PrevUpHomeNext -
    -
    - - -

    - Intrinsics 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] - . -

    -

    - - Header -

    -
    -#include <boost/fusion/sequence/intrinsic.hpp>
    -
    -
    -

    -

    [5] - In practice, many of intrinsic functions have default implementations - that will work in majority of cases -

    -
    -
    - - - -
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias - Schwinger
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/fusion/sequences/views.html b/doc/html/fusion/sequences/views.html deleted file mode 100644 index cf4d2095..00000000 --- a/doc/html/fusion/sequences/views.html +++ /dev/null @@ -1,64 +0,0 @@ - - - -Views - - - - - - - - - - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -
    -
    -PrevUpHomeNext -
    -
    - - -

    - 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 are proxies. They provide an efficient yet purely functional way to - work on potentially expensive sequence operations. Views are inherently lazy. - Their elements are only computed on demand only when the elements of the - underlying sequence(s) are actually accessed. Views' lazy nature make them - very cheap to copy and be passed around by value. -

    -

    - - Header -

    -
    -#include <boost/fusion/sequence/view.hpp>
    -
    -
    - - - -
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias - Schwinger
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/fusion/sequences/views/filter_view.html b/doc/html/fusion/sequences/views/filter_view.html deleted file mode 100644 index 758b9540..00000000 --- a/doc/html/fusion/sequences/views/filter_view.html +++ /dev/null @@ -1,244 +0,0 @@ - - - -filter_view - - - - - - - - - - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -
    -
    -PrevUpHomeNext -
    -
    - -
    - - Description -
    -

    - 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_. -

    -
    - - Header -
    -
    -#include <boost/fusion/sequence/view/filter_view.hpp>
    -
    -
    - - Synopsis -
    -
    -template <typename Sequence, typename Pred>
    -struct filter_view;
    -
    -
    - - Template - parameters -
    -
    ----- - - - - - - - - - - - - - - - - - -
    -

    - Parameter -

    -
    -

    - Description -

    -
    -

    - Default -

    -
    -

    - Sequence -

    -
    -

    - A Forward - Sequence -

    -
    -

    -

    -
    -

    - Pred -

    -
    -

    - Unary Metafunction returning an mpl::bool_ -

    -
    -

    -

    -
    -
    - - Model of -
    - -
    -

    Notation

    -
    -
    F
    -

    - A filter_view type -

    -
    f, - f2
    -

    - Instances of filter_view -

    -
    s
    -

    - A Forward - Sequence -

    -
    -
    -
    - - Expression - Semantics -
    -

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

    -
    ---- - - - - - - - - - - - - - - - - - - -
    -

    - Expression -

    -
    -

    - Semantics -

    -
    -

    - F(s) -

    -
    -

    - Creates a filter_view - given a sequence, s. -

    -
    -

    - 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. -

    -
    -
    - - Example -
    -
    -using boost::mpl::_;
    -using boost::mpl::not_;
    -using boost::is_class;
    -
    -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);
    -std::cout << view << std::endl;
    -
    -
    - - - -
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias - Schwinger
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/fusion/sequences/views/iterator_range.html b/doc/html/fusion/sequences/views/iterator_range.html deleted file mode 100644 index e53bc815..00000000 --- a/doc/html/fusion/sequences/views/iterator_range.html +++ /dev/null @@ -1,258 +0,0 @@ - - - -iterator_range - - - - - - - - - - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -
    -
    -PrevUpHomeNext -
    -
    - -
    - - Description -
    -

    - iterator_range presents - a sub-range of its underlying sequence delimited by a pair of iterators. -

    -
    - - Header -
    -
    -#include <boost/fusion/sequence/view/iterator_range.hpp>
    -
    -
    - - Synopsis -
    -
    -template <typename First, typename Last>
    -struct iterator_range;
    -
    -
    - - Template - parameters -
    -
    ----- - - - - - - - - - - - - - - - - - -
    -

    - Parameter -

    -
    -

    - Description -

    -
    -

    - Default -

    -
    -

    - First -

    -
    -

    - A fusion Iterator -

    -
    -

    -

    -
    -

    - Last -

    -
    -

    - A fusion Iterator -

    -
    -

    -

    -
    -
    - - Model of -
    -
    -
    -

    Notation

    -
    -
    IR
    -

    - An iterator_range type -

    -
    f
    -

    - An instance of First -

    -
    l
    -

    - An instance of Last -

    -
    ir, - ir2
    -

    - Instances of iterator_range -

    -
    -
    -
    - - Expression - Semantics -
    -

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

    -
    ---- - - - - - - - - - - - - - - - - - - -
    -

    - Expression -

    -
    -

    - Semantics -

    -
    -

    - 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 = - ir2 -

    -
    -

    - Assigns to a iterator_range, - ir, from another - iterator_range, - ir2. -

    -
    -
    - - Example -
    -
    -char const* s = "Ruby";
    -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;
    -
    -C c(vec);
    -D d(vec);
    -
    -iterator_range<C, D> range(c, d);
    -std::cout << range << std::endl;
    -
    -
    - - - -
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias - Schwinger
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/fusion/sequences/views/joint_view.html b/doc/html/fusion/sequences/views/joint_view.html deleted file mode 100644 index 2a1bfd21..00000000 --- a/doc/html/fusion/sequences/views/joint_view.html +++ /dev/null @@ -1,245 +0,0 @@ - - - -joint_view - - - - - - - - - - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -
    -
    -PrevUpHomeNext -
    -
    - -
    - - Description -
    -

    - joint_view presents a view - which is a concatenation of two sequences. -

    -
    - - Header -
    -
    -#include <boost/fusion/sequence/view/joint_view.hpp>
    -
    -
    - - Synopsis -
    -
    -template <typename Sequence1, typename Sequence2>
    -struct joint_view;
    -
    -
    - - Template - parameters -
    -
    ----- - - - - - - - - - - - - - - - - - -
    -

    - Parameter -

    -
    -

    - Description -

    -
    -

    - Default -

    -
    -

    - Sequence1 -

    -
    -

    - A Forward - Sequence -

    -
    -

    -

    -
    -

    - Sequence2 -

    -
    -

    - A Forward - Sequence -

    -
    -

    -

    -
    -
    - - Model of -
    - -
    -

    Notation

    -
    -
    JV
    -

    - A joint_view type -

    -
    s1
    -

    - An instance of Sequence1 -

    -
    s2
    -

    - An instance of Sequence2 -

    -
    jv, - jv2
    -

    - Instances of joint_view -

    -
    -
    -
    - - Expression - Semantics -
    -

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

    -
    ---- - - - - - - - - - - - - - - - - - - -
    -

    - Expression -

    -
    -

    - Semantics -

    -
    -

    - 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 = - 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);
    -joint_view<
    -    vector<int, char>
    -  , vector<std::string, int>
    -> view(v1, v2);
    -std::cout << view << std::endl;
    -
    -
    - - - -
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias - Schwinger
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/fusion/sequences/views/reverse_view.html b/doc/html/fusion/sequences/views/reverse_view.html deleted file mode 100644 index f071a5f1..00000000 --- a/doc/html/fusion/sequences/views/reverse_view.html +++ /dev/null @@ -1,216 +0,0 @@ - - - -reverse_view - - - - - - - - - - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -
    -
    -PrevUpHomeNext -
    -
    - -

    - 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 -
    -
    -#include <boost/fusion/sequence/view/reverse_view.hpp>
    -
    -
    - - Synopsis -
    -
    -template <typename Sequence>
    -struct reverse_view;
    -
    -
    - - Template - parameters -
    -
    ----- - - - - - - - - - - -
    -

    - Parameter -

    -
    -

    - Description -

    -
    -

    - Default -

    -
    -

    - Sequence -

    -
    -

    - A Bidirectional - Sequence -

    -
    -

    -

    -
    -
    - - Model of -
    - -
    -

    Notation

    -
    -
    RV
    -

    - A reverse_view type -

    -
    s
    -

    - An instance of Sequence -

    -
    rv, - rv2
    -

    - Instances of reverse_view -

    -
    -
    -
    - - Expression - Semantics -
    -

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

    -
    ---- - - - - - - - - - - - - - - - - - - -
    -

    - Expression -

    -
    -

    - Semantics -

    -
    -

    - RV(s) -

    -
    -

    - Creates a unary reverse_view - given sequence, s. -

    -
    -

    - 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. -

    -
    -
    - - Example -
    -
    -typedef vector<int, short, double> vector_type;
    -vector_type vec(2, 5, 3.3);
    -
    -reverse_view<vector_type> reverse(vec);
    -std::cout << reverse << std::endl;
    -
    -
    - - - -
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias - Schwinger
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/fusion/sequences/views/single_view.html b/doc/html/fusion/sequences/views/single_view.html deleted file mode 100644 index ae40751b..00000000 --- a/doc/html/fusion/sequences/views/single_view.html +++ /dev/null @@ -1,208 +0,0 @@ - - - -single_view - - - - - - - - - - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -
    -
    -PrevUpHomeNext -
    -
    - -

    - single_view is a view into - a value as a single element sequence. -

    -
    - - Header -
    -
    -#include <boost/fusion/sequence/view/single_view.hpp>
    -
    -
    - - Synopsis -
    -
    -template <typename T>
    -struct single_view;
    -
    -
    - - Template - parameters -
    -
    ----- - - - - - - - - - - -
    -

    - Parameter -

    -
    -

    - Description -

    -
    -

    - Default -

    -
    -

    - T -

    -
    -

    - Any type -

    -
    -

    -

    -
    -
    - - Model of -
    - -
    -

    Notation

    -
    -
    S
    -

    - A single_view type -

    -
    s, - s2
    -

    - Instances of single_view -

    -
    x
    -

    - An instance of T -

    -
    -
    -
    - - Expression - Semantics -
    -

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

    -
    ---- - - - - - - - - - - - - - - - - - - -
    -

    - Expression -

    -
    -

    - Semantics -

    -
    -

    - S(x) -

    -
    -

    - Creates a single_view - from x. -

    -
    -

    - 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. -

    -
    -
    - - Example -
    -
    -single_view<int> view(3);
    -std::cout << view << std::endl;
    -
    -
    - - - -
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias - Schwinger
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/fusion/sequences/views/transform_view.html b/doc/html/fusion/sequences/views/transform_view.html deleted file mode 100644 index 00c990b8..00000000 --- a/doc/html/fusion/sequences/views/transform_view.html +++ /dev/null @@ -1,383 +0,0 @@ - - - -transform_view - - - - - - - - - - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -
    -
    -PrevUpHomeNext -
    -
    - -

    - 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 - presents a view of 2 underlying sequences, given a binary function object - or function pointer. The transform_view - inherits the traversal characteristics (see Sequence - Traversal Concept) of its underlying sequence or sequences. -

    -
    - - Header -
    -
    -#include <boost/fusion/sequence/view/transform_view.hpp>
    -
    -
    - - Synopsis -
    -

    - Unary Version -

    -
    -template <typename Sequence, typename F1>
    -struct transform_view;
    -
    -

    - Binary Version -

    -
    -template <typename Sequence1, typename Sequence2, typename F2>
    -struct transform_view;
    -
    -
    - - Template - parameters -
    -
    ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    - Parameter -

    -
    -

    - Description -

    -
    -

    - Default -

    -
    -

    - Sequence -

    -
    -

    - A Forward - Sequence -

    -
    -

    -

    -
    -

    - Sequence1 -

    -
    -

    - A Forward - Sequence -

    -
    -

    -

    -
    -

    - 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 - 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 in the input sequences. -

    -
    -

    -

    -
    -
    - - Model of -
    -
    -
    -

    Notation

    -
    -
    TV
    -

    - A transform_view type -

    -
    BTV
    -

    - A binary transform_view - type -

    -
    UTV
    -

    - A unary transform_view - type -

    -
    f1
    -

    - An instance of F1 -

    -
    f2
    -

    - An instance of F2 -

    -
    s
    -

    - An instance of Sequence -

    -
    s1
    -

    - An instance of Sequence1 -

    -
    s2
    -

    - An instance of Sequence2 -

    -
    tv, - tv2
    -

    - Instances of transform_view -

    -
    -
    -
    - - 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) of its underlying sequence or sequences. -

    -
    ---- - - - - - - - - - - - - - - - - - - - - - - -
    -

    - Expression -

    -
    -

    - Semantics -

    -
    -

    - 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. -

    -
    -

    - 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. -

    -
    -
    - - Example -
    -
    -struct square
    -{
    -    template<typename Sig>
    -    struct result;
    -
    -    template<typename U>
    -    struct result<square(U)>
    -    : remove_reference<U>
    -    {};
    -
    -    template <typename T>
    -    T operator()(T x) const
    -    {
    -        return x * x;
    -    }
    -};
    -
    -typedef vector<int, short, double> vector_type;
    -vector_type vec(2, 5, 3.3);
    -
    -transform_view<vector_type, square> transform(vec, square());
    -std::cout << transform << std::endl;
    -
    -
    - - - -
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias - Schwinger
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/fusion/sequences/views/zip_view.html b/doc/html/fusion/sequences/views/zip_view.html deleted file mode 100644 index 866a7866..00000000 --- a/doc/html/fusion/sequences/views/zip_view.html +++ /dev/null @@ -1,230 +0,0 @@ - - - -zip_view - - - - - - - - - - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -
    -
    -PrevUpHomeNext -
    -
    - -
    - - 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 to the component _sequence_s. -

    -
    - - Header -
    -
    -#include <boost/fusion/sequence/view/zip_view.hpp>
    -
    -
    - - Synopsis -
    -
    -template <typename Sequences>
    -struct zip_view;
    -
    -
    - - Template - parameters -
    -
    ----- - - - - - - - - - - -
    -

    - Parameter -

    -
    -

    - Description -

    -
    -

    - Default -

    -
    -

    - Sequences -

    -
    -

    - A Forward - Sequence of references to other Fusion _sequence_s -

    -
    -

    -

    -
    -
    - - Model of -
    -
    -
    -

    Notation

    -
    -
    ZV
    -

    - A joint_view type -

    -
    s
    -

    - An instance of Sequences -

    -
    zv1, - zv2
    -

    - Instances of ZV -

    -
    -
    -
    - - Expression - Semantics -
    -

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

    -
    ---- - - - - - - - - - - - - - - - - - - -
    -

    - Expression -

    -
    -

    - Semantics -

    -
    -

    - 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. -

    -
    -

    - zv1 = - zv2 -

    -
    -

    - Assigns to a zip_view, - zv, from another - zip_view, zv2. -

    -
    -
    - - Example -
    -
    -typedef vector<int,int> vec1;
    -typedef vector<char,char> vec2;
    -vec1 v1(1,2);
    -vec2 v2('a','b');
    -typedef vector<vec1&, vec2&> sequences;
    -std::cout << zip_view<sequences>(sequences(v1, v2)) << std::endl; // ((1 a) (2 b))
    -
    -
    - - - -
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias - Schwinger
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/fusion/support/category_of.html b/doc/html/fusion/support/category_of.html index 599c514b..996cd1ff 100644 --- a/doc/html/fusion/support/category_of.html +++ b/doc/html/fusion/support/category_of.html @@ -26,17 +26,17 @@

    - + 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

    @@ -50,7 +50,7 @@
     }
     

    - + Parameters

    @@ -95,7 +95,7 @@

    - + Expression Semantics

    @@ -158,23 +158,24 @@

    Semantics: Establishes the conceptual classification - of a particular Sequence or Iterator. + of a particular Sequence or Iterator.

    - + Header

     #include <boost/fusion/support/category_of.hpp>
    +#include <boost/fusion/include/category_of.hpp>
     

    - + 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 4b7b035b..c0d42463 100644 --- a/doc/html/fusion/support/deduce.html +++ b/doc/html/fusion/support/deduce.html @@ -26,7 +26,7 @@

    - + Description

    @@ -39,14 +39,15 @@ Reference wrappers are removed (see boost::ref).

    - + Header

     #include <boost/fusion/support/deduce.hpp>
    +#include <boost/fusion/include/deduce.hpp>
     

    - + Synopsis

    @@ -60,7 +61,7 @@
     }
     

    - + Example

    @@ -81,7 +82,7 @@
     }
     

    - + See also

    diff --git a/doc/html/fusion/support/deduce_sequence.html b/doc/html/fusion/support/deduce_sequence.html index c7423807..2a11505b 100644 --- a/doc/html/fusion/support/deduce_sequence.html +++ b/doc/html/fusion/support/deduce_sequence.html @@ -26,27 +26,28 @@

    - + Description

    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

     #include <boost/fusion/support/deduce_sequence.hpp>
    +#include <boost/fusion/include/deduce_sequence.hpp>
     

    - + Synopsis

    @@ -60,7 +61,7 @@
     }
     

    - + Example

    @@ -75,15 +76,15 @@
     };
     
     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

    diff --git a/doc/html/fusion/support/is_sequence.html b/doc/html/fusion/support/is_sequence.html index c2e96c86..891752df 100644 --- a/doc/html/fusion/support/is_sequence.html +++ b/doc/html/fusion/support/is_sequence.html @@ -26,18 +26,18 @@

    - + Description

    Metafunction that evaluates to mpl::true_ if a certain type T is a - conforming Fusion Sequence, mpl::false_ + conforming Fusion Sequence, mpl::false_ otherwise. This may be specialized to accomodate clients which provide Fusion conforming sequences.

    - + Synopsis

    @@ -51,7 +51,7 @@
     }
     

    - + Parameters

    @@ -96,7 +96,7 @@

    - + Expression Semantics

    @@ -114,23 +114,24 @@ otherwise.

    - + Header

     #include <boost/fusion/support/is_sequence.hpp>
    +#include <boost/fusion/include/is_sequence.hpp>
     

    - + 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 9f245620..b32a2f3e 100644 --- a/doc/html/fusion/support/is_view.html +++ b/doc/html/fusion/support/is_view.html @@ -26,13 +26,13 @@

    - + Description

    Metafunction that evaluates to mpl::true_ if a certain type T is a - conforming Fusion View, mpl::false_ + 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 @@ -40,7 +40,7 @@ specialized to accomodate clients providing Fusion conforming views.

    - + Synopsis

    @@ -54,7 +54,7 @@
     }
     

    - + Parameters

    @@ -99,7 +99,7 @@

    - + Expression Semantics

    @@ -116,14 +116,15 @@
             otherwise.
           

    - + Header

     #include <boost/fusion/support/is_view.hpp>
    +#include <boost/fusion/include/is_view.hpp>
     

    - + Example

    @@ -132,8 +133,8 @@
     
     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 92548e61..dffdbcfe 100644 --- a/doc/html/fusion/support/pair.html +++ b/doc/html/fusion/support/pair.html @@ -7,7 +7,7 @@ - + @@ -20,24 +20,24 @@

    -PrevUpHomeNext +PrevUpHomeNext

    - + Description

    Fusion pair type is a half - runtime pair. A half runtime pair is similar to a std::pair, - but, unlike std::pair, + 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

    @@ -61,7 +61,7 @@
     make_pair(Second const &);
     

    - + Template parameters

    @@ -140,7 +140,7 @@

    - + Expression Semantics

    @@ -307,14 +307,15 @@

    - + Header

     #include <boost/fusion/support/pair.hpp>
    +#include <boost/fusion/include/pair.hpp>
     

    - + Example

    @@ -331,7 +332,7 @@
     
     
    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/fusion/support/tag_of.html b/doc/html/fusion/support/tag_of.html index 57404fd6..ac746edb 100644 --- a/doc/html/fusion/support/tag_of.html +++ b/doc/html/fusion/support/tag_of.html @@ -26,13 +26,13 @@

    - + Description

    All conforming Fusion sequences and iterators have an associated tag type. The purpose of the tag is to enable tag - dispatching from Intrinsic + dispatching from Intrinsic functions to implementations appropriate for the type.

    @@ -40,7 +40,7 @@ conforming sequences.

    - + Synopsis

    @@ -54,7 +54,7 @@
     }
     

    - + Parameters

    @@ -99,7 +99,7 @@

    - + Expression Semantics

    @@ -113,21 +113,22 @@
             with T.
           

    - + 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;
    +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/tuples.html b/doc/html/fusion/tuple.html
    similarity index 55%
    rename from doc/html/fusion/tuples.html
    rename to doc/html/fusion/tuple.html
    index d6045ced..e5a197c6 100644
    --- a/doc/html/fusion/tuples.html
    +++ b/doc/html/fusion/tuple.html
    @@ -1,13 +1,13 @@
     
     
     
    -Tuples
    +Tuple
     
     
     
     
    -
    -
    +
    +
     
     
     
    @@ -20,25 +20,25 @@
     

    -PrevUpHomeNext +PrevUpHomeNext

    The TR1 technical report describes extensions to the C++ standard library. @@ -59,7 +59,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/fusion/tuples/class_template_tuple.html b/doc/html/fusion/tuple/class_template_tuple.html similarity index 59% rename from doc/html/fusion/tuples/class_template_tuple.html rename to doc/html/fusion/tuple/class_template_tuple.html index 2ee19c9a..69fa2ccf 100644 --- a/doc/html/fusion/tuples/class_template_tuple.html +++ b/doc/html/fusion/tuple/class_template_tuple.html @@ -5,8 +5,8 @@ - - + + @@ -20,11 +20,11 @@
    -PrevUpHomeNext +PrevUpHomeNext

    Fusion's implementation of the TR1 - 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<
    @@ -59,13 +59,9 @@
         typename TN = unspecified>
     class tuple;
     
    -

    - - Header -

    -
    -#include <boost/fusion/tuple.hpp>
    -
    +

    + /tuple.hpp> +

    @@ -74,7 +70,7 @@

    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/fusion/tuples/class_template_tuple/construction.html b/doc/html/fusion/tuple/class_template_tuple/construction.html similarity index 93% rename from doc/html/fusion/tuples/class_template_tuple/construction.html rename to doc/html/fusion/tuple/class_template_tuple/construction.html index 5577f155..b6536136 100644 --- a/doc/html/fusion/tuples/class_template_tuple/construction.html +++ b/doc/html/fusion/tuple/class_template_tuple/construction.html @@ -25,10 +25,10 @@ +
    + + Description

    The TR1 @@ -37,9 +37,9 @@ copy constructor. The details of the various constructors are described in this section.

    -
    - - Specification +
    + + Specification

    Notation

    diff --git a/doc/html/fusion/tuples/class_template_tuple/element_access.html b/doc/html/fusion/tuple/class_template_tuple/element_access.html similarity index 81% rename from doc/html/fusion/tuples/class_template_tuple/element_access.html rename to doc/html/fusion/tuple/class_template_tuple/element_access.html index 119585a2..db87aac9 100644 --- a/doc/html/fusion/tuples/class_template_tuple/element_access.html +++ b/doc/html/fusion/tuple/class_template_tuple/element_access.html @@ -27,21 +27,21 @@
    -
    - - Description +
    + + Description

    The TR1 Tuple provides the get function to provide access to it's elements by zero based numeric index.

    -
    - - Specification +
    + + Specification
     template<int I, T>
    @@ -57,7 +57,7 @@
             

    Return type: RJ - is equivalent to result_of::at_c<I,T>::type. + is equivalent to result_of::at_c<I,T>::type.

    Returns: A reference to the Ith element of T. @@ -76,7 +76,7 @@

    Return type: PJ - is equivalent to result_of::at_c<I,T>::type. + is equivalent to result_of::at_c<I,T>::type.

    Returns: A const reference to the Ith element of T. diff --git a/doc/html/fusion/tuples/class_template_tuple/relational_operators.html b/doc/html/fusion/tuple/class_template_tuple/relational_operators.html similarity index 97% rename from doc/html/fusion/tuples/class_template_tuple/relational_operators.html rename to doc/html/fusion/tuple/class_template_tuple/relational_operators.html index 90d031bd..2f64b129 100644 --- a/doc/html/fusion/tuples/class_template_tuple/relational_operators.html +++ b/doc/html/fusion/tuple/class_template_tuple/relational_operators.html @@ -26,20 +26,20 @@

    -
    - - Description +
    + + Description

    The TR1 Tuple provides the standard boolean relational operators.

    -
    - - Specification +
    + + Specification

    Notation

    diff --git a/doc/html/fusion/tuples/class_template_tuple/tuple_creation_functions.html b/doc/html/fusion/tuple/class_template_tuple/tuple_creation_functions.html similarity index 92% rename from doc/html/fusion/tuples/class_template_tuple/tuple_creation_functions.html rename to doc/html/fusion/tuple/class_template_tuple/tuple_creation_functions.html index 814625bb..86e7ce07 100644 --- a/doc/html/fusion/tuples/class_template_tuple/tuple_creation_functions.html +++ b/doc/html/fusion/tuple/class_template_tuple/tuple_creation_functions.html @@ -26,12 +26,12 @@
    -
    - - Description +
    + + Description

    TR1 describes 2 utility functions for creating _tr1tuple_s. make_tuple @@ -39,9 +39,9 @@ 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>
    diff --git a/doc/html/fusion/tuples/class_template_tuple/tuple_helper_classes.html b/doc/html/fusion/tuple/class_template_tuple/tuple_helper_classes.html
    similarity index 77%
    rename from doc/html/fusion/tuples/class_template_tuple/tuple_helper_classes.html
    rename to doc/html/fusion/tuple/class_template_tuple/tuple_helper_classes.html
    index 1bd436e1..1307e3b8 100644
    --- a/doc/html/fusion/tuples/class_template_tuple/tuple_helper_classes.html
    +++ b/doc/html/fusion/tuple/class_template_tuple/tuple_helper_classes.html
    @@ -27,21 +27,21 @@
     
    -
    - - Description +
    + + 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
    @@ -56,7 +56,7 @@
             

    Value: The number of elements in the sequence. - Equivalent to result_of::size<T>::type. + Equivalent to result_of::size<T>::type.

     tuple_element<I, T>::type
    @@ -71,7 +71,7 @@
     

    Value: The type of the Ith element of T. Equivalent - to result_of::value_at<I,T>::type. + to result_of::value_at<I,T>::type.

    diff --git a/doc/html/fusion/tuples/pairs.html b/doc/html/fusion/tuple/pairs.html similarity index 87% rename from doc/html/fusion/tuples/pairs.html rename to doc/html/fusion/tuple/pairs.html index 5060e796..d13a3794 100644 --- a/doc/html/fusion/tuples/pairs.html +++ b/doc/html/fusion/tuple/pairs.html @@ -5,7 +5,7 @@ - + @@ -21,23 +21,23 @@

    -PrevUpHomeNext +PrevUpHomeNext
    +

    + + Description

    The TR1 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
    @@ -102,7 +102,7 @@
     
     
    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/fusion/view.html b/doc/html/fusion/view.html new file mode 100644 index 00000000..8dc1e871 --- /dev/null +++ b/doc/html/fusion/view.html @@ -0,0 +1,65 @@ + + + +View + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + + +

    + 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 are proxies. They provide an efficient yet purely functional way to work + on potentially expensive sequence operations. Views are inherently lazy. Their + elements are only computed on demand only when the elements of the underlying + sequence(s) are actually accessed. Views' lazy nature make them very cheap + to copy and be passed around by value. +

    +

    + + Header +

    +
    +#include <boost/fusion/view.hpp>
    +#include <boost/fusion/include/view.hpp>
    +
    +
    + + + +
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/fusion/view/filter_view.html b/doc/html/fusion/view/filter_view.html new file mode 100644 index 00000000..bea903b7 --- /dev/null +++ b/doc/html/fusion/view/filter_view.html @@ -0,0 +1,242 @@ + + + +filter_view + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +

    + + Description +

    +

    + 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_. +

    +

    + + Header +

    +
    +#include <boost/fusion/view/filter_view.hpp>
    +#include <boost/fusion/include/filter_view.hpp>
    +
    +

    + + Synopsis +

    +
    +template <typename Sequence, typename Pred>
    +struct filter_view;
    +
    +

    + + Template parameters +

    +
    +++++ + + + + + + + + + + + + + + + + + +
    +

    + Parameter +

    +
    +

    + Description +

    +
    +

    + Default +

    +
    +

    + Sequence +

    +
    +

    + A Forward + Sequence +

    +
    +

    +

    +
    +

    + Pred +

    +
    +

    + Unary Metafunction returning an mpl::bool_ +

    +
    +

    +

    +
    +

    + + Model of +

    + +
    +

    Notation

    +
    +
    F
    +

    + A filter_view type +

    +
    f, + f2
    +

    + Instances of filter_view +

    +
    s
    +

    + A Forward Sequence +

    +
    +
    +

    + + Expression Semantics +

    +

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

    +
    ++++ + + + + + + + + + + + + + + + + + + +
    +

    + Expression +

    +
    +

    + Semantics +

    +
    +

    + F(s) +

    +
    +

    + Creates a filter_view + given a sequence, s. +

    +
    +

    + 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. +

    +
    +

    + + Example +

    +
    +using boost::mpl::_;
    +using boost::mpl::not_;
    +using boost::is_class;
    +
    +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);
    +std::cout << view << std::endl;
    +
    +
    + + + +
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/fusion/view/iterator_range.html b/doc/html/fusion/view/iterator_range.html new file mode 100644 index 00000000..b140cf2d --- /dev/null +++ b/doc/html/fusion/view/iterator_range.html @@ -0,0 +1,257 @@ + + + +iterator_range + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +

    + + Description +

    +

    + iterator_range presents a + sub-range of its underlying sequence delimited by a pair of iterators. +

    +

    + + Header +

    +
    +#include <boost/fusion/view/iterator_range.hpp>
    +#include <boost/fusion/include/iterator_range.hpp>
    +
    +

    + + Synopsis +

    +
    +template <typename First, typename Last>
    +struct iterator_range;
    +
    +

    + + Template parameters +

    +
    +++++ + + + + + + + + + + + + + + + + + +
    +

    + Parameter +

    +
    +

    + Description +

    +
    +

    + Default +

    +
    +

    + First +

    +
    +

    + A fusion Iterator +

    +
    +

    +

    +
    +

    + Last +

    +
    +

    + A fusion Iterator +

    +
    +

    +

    +
    +

    + + Model of +

    +
    +
    +

    Notation

    +
    +
    IR
    +

    + An iterator_range type +

    +
    f
    +

    + An instance of First +

    +
    l
    +

    + An instance of Last +

    +
    ir, + ir2
    +

    + Instances of iterator_range +

    +
    +
    +

    + + Expression + Semantics +

    +

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

    +
    ++++ + + + + + + + + + + + + + + + + + + +
    +

    + Expression +

    +
    +

    + Semantics +

    +
    +

    + 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 = + ir2 +

    +
    +

    + Assigns to a iterator_range, + ir, from another + iterator_range, + ir2. +

    +
    +

    + + Example +

    +
    +char const* s = "Ruby";
    +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;
    +
    +C c(vec);
    +D d(vec);
    +
    +iterator_range<C, D> range(c, d);
    +std::cout << range << std::endl;
    +
    +
    + + + +
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/fusion/view/joint_view.html b/doc/html/fusion/view/joint_view.html new file mode 100644 index 00000000..a01ff66e --- /dev/null +++ b/doc/html/fusion/view/joint_view.html @@ -0,0 +1,243 @@ + + + +joint_view + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +

    + + Description +

    +

    + joint_view presents a view + which is a concatenation of two sequences. +

    +

    + + Header +

    +
    +#include <boost/fusion/view/joint_view.hpp>
    +#include <boost/fusion/include/joint_view.hpp>
    +
    +

    + + Synopsis +

    +
    +template <typename Sequence1, typename Sequence2>
    +struct joint_view;
    +
    +

    + + Template parameters +

    +
    +++++ + + + + + + + + + + + + + + + + + +
    +

    + Parameter +

    +
    +

    + Description +

    +
    +

    + Default +

    +
    +

    + Sequence1 +

    +
    +

    + A Forward + Sequence +

    +
    +

    +

    +
    +

    + Sequence2 +

    +
    +

    + A Forward + Sequence +

    +
    +

    +

    +
    +

    + + Model of +

    + +
    +

    Notation

    +
    +
    JV
    +

    + A joint_view type +

    +
    s1
    +

    + An instance of Sequence1 +

    +
    s2
    +

    + An instance of Sequence2 +

    +
    jv, + jv2
    +

    + Instances of joint_view +

    +
    +
    +

    + + Expression Semantics +

    +

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

    +
    ++++ + + + + + + + + + + + + + + + + + + +
    +

    + Expression +

    +
    +

    + Semantics +

    +
    +

    + 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 = + 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);
    +joint_view<
    +    vector<int, char>
    +  , vector<std::string, int>
    +> view(v1, v2);
    +std::cout << view << std::endl;
    +
    +
    + + + +
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/fusion/view/reverse_view.html b/doc/html/fusion/view/reverse_view.html new file mode 100644 index 00000000..99587150 --- /dev/null +++ b/doc/html/fusion/view/reverse_view.html @@ -0,0 +1,215 @@ + + + +reverse_view + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +

    + 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 +

    +
    +#include <boost/fusion/view/reverse_view.hpp>
    +#include <boost/fusion/include/reverse_view.hpp>
    +
    +

    + + Synopsis +

    +
    +template <typename Sequence>
    +struct reverse_view;
    +
    +

    + + Template parameters +

    +
    +++++ + + + + + + + + + + +
    +

    + Parameter +

    +
    +

    + Description +

    +
    +

    + Default +

    +
    +

    + Sequence +

    +
    +

    + A Bidirectional + Sequence +

    +
    +

    +

    +
    +

    + + Model of +

    + +
    +

    Notation

    +
    +
    RV
    +

    + A reverse_view type +

    +
    s
    +

    + An instance of Sequence +

    +
    rv, + rv2
    +

    + Instances of reverse_view +

    +
    +
    +

    + + Expression + Semantics +

    +

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

    +
    ++++ + + + + + + + + + + + + + + + + + + +
    +

    + Expression +

    +
    +

    + Semantics +

    +
    +

    + RV(s) +

    +
    +

    + Creates a unary reverse_view + given sequence, s. +

    +
    +

    + 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. +

    +
    +

    + + Example +

    +
    +typedef vector<int, short, double> vector_type;
    +vector_type vec(2, 5, 3.3);
    +
    +reverse_view<vector_type> reverse(vec);
    +std::cout << reverse << std::endl;
    +
    +
    + + + +
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/fusion/view/single_view.html b/doc/html/fusion/view/single_view.html new file mode 100644 index 00000000..1502251e --- /dev/null +++ b/doc/html/fusion/view/single_view.html @@ -0,0 +1,207 @@ + + + +single_view + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +

    + single_view is a view into + a value as a single element sequence. +

    +

    + + Header +

    +
    +#include <boost/fusion/view/single_view.hpp>
    +#include <boost/fusion/include/single_view.hpp>
    +
    +

    + + Synopsis +

    +
    +template <typename T>
    +struct single_view;
    +
    +

    + + Template parameters +

    +
    +++++ + + + + + + + + + + +
    +

    + Parameter +

    +
    +

    + Description +

    +
    +

    + Default +

    +
    +

    + T +

    +
    +

    + Any type +

    +
    +

    +

    +
    +

    + + Model of +

    + +
    +

    Notation

    +
    +
    S
    +

    + A single_view type +

    +
    s, + s2
    +

    + Instances of single_view +

    +
    x
    +

    + An instance of T +

    +
    +
    +

    + + Expression Semantics +

    +

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

    +
    ++++ + + + + + + + + + + + + + + + + + + +
    +

    + Expression +

    +
    +

    + Semantics +

    +
    +

    + S(x) +

    +
    +

    + Creates a single_view + from x. +

    +
    +

    + 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. +

    +
    +

    + + Example +

    +
    +single_view<int> view(3);
    +std::cout << view << std::endl;
    +
    +
    + + + +
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/fusion/view/transform_view.html b/doc/html/fusion/view/transform_view.html new file mode 100644 index 00000000..8ae6bdd8 --- /dev/null +++ b/doc/html/fusion/view/transform_view.html @@ -0,0 +1,378 @@ + + + +transform_view + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +

    + 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 + presents a view of 2 underlying sequences, given a binary function object + or function pointer. The transform_view + inherits the traversal characteristics (see Sequence + Traversal Concept) of its underlying sequence or sequences. +

    +

    + + Header +

    +
    +#include <boost/fusion/view/transform_view.hpp>
    +#include <boost/fusion/include/transform_view.hpp>
    +
    +

    + + Synopsis +

    +

    + Unary Version +

    +
    +template <typename Sequence, typename F1>
    +struct transform_view;
    +
    +

    + Binary Version +

    +
    +template <typename Sequence1, typename Sequence2, typename F2>
    +struct transform_view;
    +
    +

    + + Template parameters +

    +
    +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    + Parameter +

    +
    +

    + Description +

    +
    +

    + Default +

    +
    +

    + Sequence +

    +
    +

    + A Forward + Sequence +

    +
    +

    +

    +
    +

    + Sequence1 +

    +
    +

    + A Forward + Sequence +

    +
    +

    +

    +
    +

    + 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 + 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 + in the input sequences. +

    +
    +

    +

    +
    +

    + + Model of +

    +
    +
    +

    Notation

    +
    +
    TV
    +

    + A transform_view type +

    +
    BTV
    +

    + A binary transform_view + type +

    +
    UTV
    +

    + A unary transform_view + type +

    +
    f1
    +

    + An instance of F1 +

    +
    f2
    +

    + An instance of F2 +

    +
    s
    +

    + An instance of Sequence +

    +
    s1
    +

    + An instance of Sequence1 +

    +
    s2
    +

    + An instance of Sequence2 +

    +
    tv, + tv2
    +

    + Instances of transform_view +

    +
    +
    +

    + + 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) + of its underlying sequence or sequences. +

    +
    ++++ + + + + + + + + + + + + + + + + + + + + + + +
    +

    + Expression +

    +
    +

    + Semantics +

    +
    +

    + 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. +

    +
    +

    + 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. +

    +
    +

    + + Example +

    +
    +struct square
    +{
    +    template<typename Sig>
    +    struct result;
    +
    +    template<typename U>
    +    struct result<square(U)>
    +    : remove_reference<U>
    +    {};
    +
    +    template <typename T>
    +    T operator()(T x) const
    +    {
    +        return x * x;
    +    }
    +};
    +
    +typedef vector<int, short, double> vector_type;
    +vector_type vec(2, 5, 3.3);
    +
    +transform_view<vector_type, square> transform(vec, square());
    +std::cout << transform << std::endl;
    +
    +
    + + + +
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/fusion/view/zip_view.html b/doc/html/fusion/view/zip_view.html new file mode 100644 index 00000000..6a35422f --- /dev/null +++ b/doc/html/fusion/view/zip_view.html @@ -0,0 +1,229 @@ + + + +zip_view + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +

    + + 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 + to the component _sequence_s. +

    +

    + + Header +

    +
    +#include <boost/fusion/view/zip_view.hpp>
    +#include <boost/fusion/include/zip_view.hpp>
    +
    +

    + + Synopsis +

    +
    +template <typename Sequences>
    +struct zip_view;
    +
    +

    + + Template parameters +

    +
    +++++ + + + + + + + + + + +
    +

    + Parameter +

    +
    +

    + Description +

    +
    +

    + Default +

    +
    +

    + Sequences +

    +
    +

    + A Forward + Sequence of references to other Fusion _sequence_s +

    +
    +

    +

    +
    +

    + + Model of +

    +
    +
    +

    Notation

    +
    +
    ZV
    +

    + A joint_view type +

    +
    s
    +

    + An instance of Sequences +

    +
    zv1, + zv2
    +

    + Instances of ZV +

    +
    +
    +

    + + Expression Semantics +

    +

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

    +
    ++++ + + + + + + + + + + + + + + + + + + +
    +

    + Expression +

    +
    +

    + Semantics +

    +
    +

    + 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. +

    +
    +

    + zv1 = + zv2 +

    +
    +

    + Assigns to a zip_view, + zv, from another + zip_view, zv2. +

    +
    +

    + + Example +

    +
    +typedef vector<int,int> vec1;
    +typedef vector<char,char> vec2;
    +vec1 v1(1,2);
    +vec2 v2('a','b');
    +typedef vector<vec1&, vec2&> sequences;
    +std::cout << zip_view<sequences>(sequences(v1, v2)) << std::endl; // ((1 a) (2 b))
    +
    +
    + + + +
    Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias + Schwinger
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/index.html b/doc/html/index.html index 7be69e34..2aff713b 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -22,10 +22,19 @@

    Chapter 1. Fusion 2.0

    +

    +Joel de Guzman +

    +

    +Dan Marsden +

    +

    +Tobias Schwinger +

    -

    +

    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)

    @@ -48,142 +57,152 @@
    deduce_sequence
    pair
    -
    Iterators
    +
    Iterator
    -
    Concepts
    +
    Concepts
    -
    Forward +
    Forward Iterator
    -
    Bidirectional +
    Bidirectional Iterator
    -
    Random +
    Random Access Iterator
    -
    Functions
    +
    Functions
    -
    deref
    -
    next
    -
    prior
    -
    distance
    -
    advance
    -
    advance_c
    +
    deref
    +
    next
    +
    prior
    +
    distance
    +
    advance
    +
    advance_c
    -
    Operators
    +
    Operator
    -
    Operator +
    Operator *
    -
    Operator +
    Operator ==
    -
    Operator +
    Operator !=
    -
    Metafunctions
    +
    Metafunctions
    -
    value_of
    -
    deref
    -
    next
    -
    prior
    -
    equal_to
    -
    distance
    -
    advance
    -
    advance_c
    +
    value_of
    +
    deref
    +
    next
    +
    prior
    +
    equal_to
    +
    distance
    +
    advance
    +
    advance_c
    -
    Sequences
    +
    Sequence
    -
    Concepts
    +
    Concepts
    -
    Forward +
    Forward Sequence
    -
    Bidirectional +
    Bidirectional Sequence
    -
    Random +
    Random Access Sequence
    -
    Associative +
    Associative Sequence
    -
    Containers
    +
    Intrinsic
    -
    vector
    -
    cons
    -
    list
    -
    set
    -
    map
    +
    Functions
    +
    Metafunctions
    -
    Views
    +
    Operator
    -
    single_view
    -
    filter_view
    -
    iterator_range
    -
    joint_view
    -
    zip_view
    -
    transform_view
    -
    reverse_view
    -
    -
    Adapted
    -
    -
    std::pair
    -
    mpl sequence
    -
    boost::array
    -
    boost::tuple
    -
    boost::variant
    -
    -
    Intrinsics
    -
    -
    Functions
    -
    Metafunctions
    -
    -
    Generation
    -
    -
    Functions
    -
    MetaFunctions
    -
    -
    Conversion
    -
    -
    Functions
    -
    Metafunctions
    -
    -
    Operators
    -
    -
    I/O
    -
    Comparison
    +
    I/O
    +
    Comparison
    -
    Algorithms
    +
    Container
    -
    Iteration
    +
    vector
    +
    cons
    +
    list
    +
    set
    +
    map
    +
    Generation
    -
    Functions
    -
    Metafunctions
    +
    Functions
    +
    MetaFunctions
    -
    Query
    +
    Conversion
    -
    Functions
    -
    Metafunctions
    -
    -
    Transformation
    -
    -
    Functions
    -
    Metafunctions
    +
    Functions
    +
    Metafunctions
    -
    Tuples
    +
    View
    -
    Class template tuple
    +
    single_view
    +
    filter_view
    +
    iterator_range
    +
    joint_view
    +
    zip_view
    +
    transform_view
    +
    reverse_view
    +
    +
    Adapted
    -
    Construction
    -
    Tuple +
    std::pair
    +
    mpl sequence
    +
    boost::array
    +
    boost::tuple
    +
    boost::variant
    +
    +
    Algorithm
    +
    +
    Iteration
    +
    +
    Functions
    +
    Metafunctions
    +
    +
    Query
    +
    +
    Functions
    +
    Metafunctions
    +
    +
    Transformation
    +
    +
    Functions
    +
    Metafunctions
    +
    +
    +
    Tuple
    +
    +
    Class template tuple
    +
    +
    Construction
    +
    Tuple creation functions
    -
    Tuple +
    Tuple helper classes
    -
    Element +
    Element access
    -
    Relational +
    Relational operators
    -
    Pairs
    +
    Pairs
    Extension
    +
    +
    The Full Extension Mechanism
    +
    Sequence Facade
    +
    Iterator Facade
    +
    Macros
    +
    +
    BOOST_FUSION_ADAPT_STRUCT
    +
    BOOST_FUSION_ADAPT_ASSOC_STRUCT
    +
    +
    Functional
    Concepts
    @@ -225,7 +244,7 @@
    - +

    Last revised: September 22, 2007 at 01:00:16 GMT

    Last revised: November 06, 2007 at 12:07:46 GMT


    diff --git a/doc/iterators.qbk b/doc/iterator.qbk similarity index 94% rename from doc/iterators.qbk rename to doc/iterator.qbk index 1607242a..ebaccc92 100644 --- a/doc/iterators.qbk +++ b/doc/iterator.qbk @@ -1,16 +1,16 @@ -[section Iterators] -Like __mpl__ and __stl__, iterators are a fundamental concept in Fusion. +[section Iterator] + +Like __mpl__ and __stl__, iterators are a fundamental concept in Fusion. As with __mpl__ and __stl__ iterators describe positions, and provide access to data within an underlying __sequence__. -[heading Header] - #include +/iterator.hpp> [section Concepts] 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 +__forward_iterator__ is the most basic concept. __bidirectional_iterator__ +is a refinement of __forward_iterator__. __random_access_iterator__ is a refinement of __bidirectional_iterator__. [section Forward Iterator] @@ -111,7 +111,7 @@ element at a time. __forward_iterator__ [heading Expression requirements] -In addition to the requirements defined in __forward_iterator__, +In addition to the requirements defined in __forward_iterator__, the following expressions must be valid: [table @@ -138,7 +138,7 @@ in __forward_iterator__ ] [heading Invariants] -In addition to the invariants of __forward_iterator__, +In addition to the invariants of __forward_iterator__, the following invariants always hold: * `__prior__(__next__(i)) == i && __prior__(__next__(i)) == __next__(__prior__(i))` @@ -172,7 +172,7 @@ sequence. __bidirectional_iterator__ [heading Expression requirements] -In addition to the requirements defined in __bidirectional_iterator__, +In addition to the requirements defined in __bidirectional_iterator__, the following expressions must be valid: [table @@ -204,7 +204,7 @@ the following expressions must be valid: [endsect] [section Functions] -Fusion provides functions for manipulating iterators, analogous to the similar functions +Fusion provides functions for manipulating iterators, analogous to the similar functions from the __mpl__ library. [section deref] @@ -230,12 +230,11 @@ Deferences an iterator. [*Semantics]: Dereferences the iterator `i`. -[heading Header] - #include +/iterator/deref.hpp> [heading Example] typedef __vector__ vec; - + int i(0); vec v(1,i); assert(__deref__(__begin__(v)) == 1); @@ -267,8 +266,7 @@ Moves an iterator 1 position forwards. [*Semantics]: Returns an iterator to the next element after `i`. -[heading Header] - #include +/iterator/next.hpp> [heading Example] typedef __vector__ vec; @@ -303,8 +301,7 @@ Moves an iterator 1 position backwards. [*Semantics]: Returns an iterator to the element prior to `i`. -[heading Header] - #include +/iterator/prior.hpp> [heading Example] typedef __vector__ vec; @@ -339,8 +336,7 @@ Returns the distance between 2 iterators. [*Semantics]: Returns the distance between iterators `i` and `j`. -[heading Header] - #include +/iterator/distance.hpp> [heading Example] typedef __vector__ vec; @@ -360,7 +356,7 @@ Moves an iterator by a specified distance. typename I, typename M > - typename __result_of_advance__::type advance(I const& i); + typename __result_of_advance__::type advance(I const& i); [table Parameters [[Parameter] [Requirement] [Description]] @@ -375,8 +371,7 @@ Moves an iterator by a specified distance. [*Semantics]: Returns an iterator to the element `M` positions from `i`. If `i` is a __bidirectional_iterator__ then `M` may be negative. -[heading Header] - #include +/iterator/advance.hpp> [heading Example] typedef __vector__ vec; @@ -396,7 +391,7 @@ Moves an iterator by a specified distance. typename I, int N > - typename __result_of_advance_c__::type advance_c(I const& i); + typename __result_of_advance_c__::type advance_c(I const& i); [table Parameters [[Parameter] [Requirement] [Description]] @@ -411,8 +406,7 @@ Moves an iterator by a specified distance. [*Semantics]: Returns an iterator to the element `N` positions from `i`. If `i` is a __bidirectional_iterator__ then `N` may be negative. -[heading Header] - #include +/iterator/advance.hpp> [heading Example] typedef __vector__ vec; @@ -424,7 +418,8 @@ Moves an iterator by a specified distance. [endsect] -[section Operators] +[section Operator] + Overloaded operators are provided to provide a more natural syntax for dereferencing iterators, and comparing them for equality. [section:operator_unary_star Operator *] @@ -450,12 +445,11 @@ Dereferences an iterator. [*Semantics]: Equivalent to `__deref__(i)`. -[heading Header] - #include +/iterator/deref.hpp> [heading Example] typedef __vector__ vec; - + int i(0); vec v(1,i); assert(*__begin__(v) == 1); @@ -488,8 +482,7 @@ Compares 2 iterators for equality. [*Semantics]: Equivalent to `__result_of_equal_to__::value` where `I` and `J` are the types of `i` and `j` respectively. -[heading Header] - #include +/iterator/equal_to.hpp> [endsect] @@ -516,8 +509,7 @@ Compares 2 iterators for inequality. [*Semantics]: Equivalent to `!__result_of_equal_to__::value` where `I` and `J` are the types of `i` and `j` respectively. -[heading Header] - #include +/iterator/equal_to.hpp> [endsect] @@ -552,8 +544,7 @@ Returns the type stored at the position of an iterator. [*Semantics]: Returns the type stored in a sequence at iterator position `I`. -[heading Header] - #include +/iterator/value_of.hpp> [heading Example] typedef __vector__ vec; @@ -593,8 +584,7 @@ Returns the type that will be returned by dereferencing an iterator. [*Semantics]: Returns the result of dereferencing an iterator of type `I`. -[heading Header] - #include +/iterator/deref.hpp> [heading Example] typedef __vector__ vec; @@ -636,8 +626,7 @@ Returns the type of the next iterator in a sequence. [*Semantics]: Returns an iterator to the next element in the sequence after `I`. -[heading Header] - #include +/iterator/next.hpp> [heading Example] typedef __vector__ vec; @@ -673,8 +662,7 @@ Returns the type of the previous iterator in a sequence. [*Semantics]: Returns an iterator to the previous element in the sequence before `I`. -[heading Header] - #include +/iterator/prior.hpp> [heading Example] typedef __vector__ vec; @@ -714,8 +702,7 @@ Returns a true-valued __mpl_integral_constant__ if `I` and `J` are equal. [*Semantics]: Returns `boost::mpl::true_` if `I` and `J` are iterators to the same position. Returns `boost::mpl::false_` otherwise. -[heading Header] - #include +/iterator/equal_to.hpp> [heading Example] typedef __vector__ vec; @@ -753,8 +740,7 @@ Returns the distance between two iterators. [*Semantics]: Returns the distance between iterators of types `I` and `J`. -[heading Header] - #include +/iterator/distance.hpp> [heading Example] typedef __vector__ vec; @@ -795,8 +781,7 @@ Moves an iterator a specified distance. [*Semantics]: Returns an iterator a distance `M` from `I`. If `I` is a __bidirectional_iterator__ then `M` may be negative. -[heading Header] - #include +/iterator/advance.hpp> [heading Example] typedef __vector__ vec; @@ -836,8 +821,7 @@ Moves an iterator by a specified distance. [*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__ >::type`. -[heading Header] - #include +/iterator/advance.hpp> [heading Example] typedef __vector__ vec; diff --git a/doc/organization.qbk b/doc/organization.qbk index cff048f8..2d09da0d 100644 --- a/doc/organization.qbk +++ b/doc/organization.qbk @@ -9,13 +9,20 @@ The library is organized in three layers: [:[$images/fusion_org.png]] -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" in the same directory as "boost/fusion/support". -Everything, except those found inside "detail" directories, is public. The -library is header-only. There is no need to build object files to link -against. +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" in the same directory as +"boost/fusion/support". Everything, except those found inside "detail" +directories, is public. + +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. + +The library is header-only. There is no need to build object files to +link against. [heading Directory] @@ -24,45 +31,50 @@ against. * iteration * query * transformation -* sequence - * adapted - * array - * mpl - * std_pair - * comparison - * container - * list - * map - * set - * vector - * conversion +* 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 - * utility - * view - * filter_view - * iterator_range - * joint_view - * reverse_view - * single_view - * transform_view - * zip_view * iterator * support [heading Example] -If, for example, you want to use `list`, depending on the granularity that +If, for example, you want to use `list`, depending on the granularity that you desire, you may do so by including one of - #include - #include - #include - -The first includes all sequences. The second includes all of sequence -containers. The third includes only `list` [footnote Modules may contain -smaller components. Header file information for each component will be -provided as part of the component's documentation.]. + #include + #include + #include + #include + +The first includes all containers The second includes only `list` +[footnote Modules may contain smaller components. Header file +information for each component will be provided as part of the +component's documentation.]. [endsect] diff --git a/doc/quick_start.qbk b/doc/quick_start.qbk index 8857b5ea..071d44cc 100644 --- a/doc/quick_start.qbk +++ b/doc/quick_start.qbk @@ -5,12 +5,13 @@ 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__`. -For starters, we shall include all of Fusion's __sequence__s [footnote There +For starters, we shall include all of Fusion's __sequence__(s) [footnote There are finer grained header files available if you wish to have more control over which components to include (see section __organization__ for details).]: #include + #include Let's begin with a `__vector__` [footnote Unless otherwise noted, components are in namespace `boost::fusion`. For the sake of simplicity, code in this @@ -32,6 +33,7 @@ the similarity ends there. You can do a lot more with Fusion `__vector__` or First, let's include the algorithms: #include + #include Now, let's write a function object that prints XML of the form data for each member in the tuple. diff --git a/doc/sequence.qbk b/doc/sequence.qbk new file mode 100644 index 00000000..4680a2b9 --- /dev/null +++ b/doc/sequence.qbk @@ -0,0 +1,1818 @@ +[section Sequence] + +Like __mpl__, the Sequence is a fundamental concept in Fusion. A Sequence +may or may not actually store or contain data. __containers__ 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__ type that can be used to iterate through the +Sequence's elements. + +[heading Header] + + #include + #include + +[section Concepts] + +Fusion Sequences are organized into a hierarchy of concepts. + +[heading 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_sequence__. +These concepts pertain to sequence traversal. + +[heading Associativity] + +The __associative_sequence__ concept is orthogonal to traversal. An Associative +Sequence allows efficient retrieval of elements based on keys. + +[section Forward Sequence] + +[heading 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. The requirement of a definite ordering allows the definition of +element-by-element equality (if the container's element type is Equality +Comparable) and of lexicographical ordering (if the container's element +type is LessThan Comparable). + +[variablelist Notation + [[`s`] [A Forward Sequence]] + [[`S`] [A Forward Sequence type]] + [[`o`] [An arbitrary object]] + [[`e`] [A Sequence element]] +] + +[heading Valid Expressions] + +For any Forward Sequence the following expressions must be valid: + +[table + [[Expression] [Return type] [Type Requirements] [Runtime Complexity]] + [[`__begin__(s)`] [__forward_iterator__] [] [Constant]] + [[`__end__(s)`] [__forward_iterator__] [] [Constant]] + [[`__size__(s)`] [__mpl_integral_constant__. + Convertible to int.] [] [Constant]] + [[`__empty__(s)`] [__mpl_boolean_constant__. + Convertible to bool.] [] [Constant]] + [[`__front__(s)`] [Any type] [] [Constant]] + [[`__front__(s) = o`] [Any type] [`s` is mutable and + `e = o`, where `e` + is the first element + in the sequence, is + a valid expression.] [Constant]] +] + +[heading Result Type Expressions] + +[table + [[Expression] [Compile Time Complexity]] + [[`__result_of_begin__::type`] [Amortized constant time]] + [[`__result_of_end__::type`] [Amortized constant time]] + [[`__result_of_size__::type`] [Unspecified]] + [[`__result_of_empty__::type`] [Constant time]] + [[`__result_of_front__::type`] [Amortized constant time]] +] + +[heading Expression Semantics] + +[table + [[Expression] [Semantics]] + [[`__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__.]] + [[`__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__.]] + [[`__front__(s)`] [The first element in the sequence; see __front__.]] +] + +[heading Invariants] + +For any Forward Sequence s the following invariants always hold: + +* `[__begin__(s), __end__(s))` is always a valid range. +* An __algorithm__ that iterates through the range `[__begin__(s), __end__(s))` + will pass through every element of `s` exactly once. +* `__begin__(s)` is identical to `__end__(s))` if and only if `s` is empty. +* Two different iterations through `s` will access its elements in + the same order. + +[heading Models] + +* __std_pair__ +* __boost_array__ +* __vector__ +* __cons__ +* __list__ +* __set__ +* __map__ +* __single_view__ +* __filter_view__ +* __iterator_range__ +* __joint_view__ +* __transform_view__ +* __reverse_view__ +* __zip_view__ + +[endsect] + +[section Bidirectional Sequence] + +[heading Description] + +A Bidirectional Sequence is a __forward_sequence__ whose iterators model +__bidirectional_iterator__. + +[heading Refinement of] + +__forward_sequence__ + +[variablelist Notation + [[`s`] [A Forward Sequence]] + [[`S`] [A Forward Sequence type]] + [[`o`] [An arbitrary object]] + [[`e`] [A Sequence element]] +] + +[heading Valid Expressions] + +In addition to the requirements defined in __forward_sequence__, for any +Bidirectional Sequence the following must be met: + +[table + [[Expression] [Return type] [Type Requirements] [Runtime Complexity]] + [[`__begin__(s)`] [__bidirectional_iterator__] [] [Constant]] + [[`__end__(s)`] [__bidirectional_iterator__] [] [Constant]] + [[`__back__(s)`] [Any type] [] [Constant]] + [[`__back__(s) = o`] [Any type] [`s` is mutable and + `e = o`, where `e` + is the first element + in the sequence, is + a valid expression.] [Constant]] +] + +[heading Result Type Expressions] + +[table + [[Expression] [Compile Time Complexity]] + [[`__result_of_begin__::type`] [Amortized constant time]] + [[`__result_of_end__::type`] [Amortized constant time]] + [[`__result_of_back__::type`] [Amortized constant time]] +] + +[heading Expression Semantics] + +The semantics of an expression are defined only where they differ from, or +are not defined in __forward_sequence__. + +[table + [[Expression] [Semantics]] + [[`__back__(s)`] [The last element in the sequence; see __back__.]] +] + +[heading Models] + +* __std_pair__ +* __boost_array__ +* __vector__ +* __reverse_view__ +* __iterator_range__ (where adapted sequence is a Bidirectional Sequence) +* __transform_view__ (where adapted sequence is a Bidirectional Sequence) +* __zip_view__ (where adapted sequences are models Bidirectional Sequence) + +[endsect] + +[section Random Access Sequence] + +[heading Description] + +A Random Access Sequence is a __bidirectional_sequence__ whose iterators +model __random_access_iterator__. It guarantees constant time access to +arbitrary sequence elements. + +[heading Refinement of] + +__bidirectional_sequence__ + +[variablelist Notation + [[`s`] [A Random Access Sequence]] + [[`S`] [A Random Access Sequence type]] + [[`N`] [An __mpl_integral_constant__]] + [[`o`] [An arbitrary object]] + [[`e`] [A Sequence element]] +] + +[heading Valid Expressions] + +In addition to the requirements defined in __bidirectional_sequence__, for +any Random Access Sequence the following must be met: + +[table + [[Expression] [Return type] [Type Requirements] [Runtime Complexity]] + [[`__begin__(s)`] [__random_access_iterator__] [] [Constant]] + [[`__end__(s)`] [__random_access_iterator__] [] [Constant]] + [[`__at__(s)`] [Any type] [] [Constant]] + [[`__at__(s) = o`] [Any type] [`s` is mutable and + `e = o`, where `e` + is the first element + in the sequence, is + a valid expression.] [Constant]] +] + +[heading Result Type Expressions] + +[table + [[Expression] [Compile Time Complexity]] + [[`__result_of_begin__::type`] [Amortized constant time]] + [[`__result_of_end__::type`] [Amortized constant time]] + [[`__result_of_at__::type`] [Amortized constant time]] + [[`__result_of_value_at__::type`] [Amortized constant time]] +] + +[blurb __note__ `__result_of_at__` returns the actual type returned by +`__at__(s)`. In most cases, this is a reference. Hence, there is no way to +know the exact element type using `__result_of_at__`.The element at `N` +may actually be a reference to begin with. For this purpose, you can use +`__result_of_value_at__`.] + +[heading Expression Semantics] + +The semantics of an expression are defined only where they differ from, or +are not defined in __bidirectional_sequence__. + +[table + [[Expression] [Semantics]] + [[`__at__(s)`] [The Nth element from the beginning of the sequence; see __at__.]] +] + +[heading Models] + +* __std_pair__ +* __boost_array__ +* __vector__ +* __reverse_view__ +* __iterator_range__ (where adapted sequence is a Random Access Sequence) +* __transform_view__ (where adapted sequence is a Random Access Sequence) +* __zip_view__ (where adapted sequences are models Random Access Sequence) + +[endsect] + +[section Associative Sequence] + +[heading Description] + +An Associative Sequence allows efficient retrieval of elements based on keys. +Like associative sequences in __mpl__, and unlike associative containers in +__stl__, Fusion associative sequences have no implied ordering relation. +Instead, type identity is used to impose an equivalence relation on keys, and +the order in which sequence elements are traversed during iteration is left +unspecified. In addition, unlike __stl__, Associative Sequences have mutable +iterators. This is due to the fact that 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. + + +[variablelist Notation + [[`s`] [An Associative Sequence]] + [[`S`] [An Associative Sequence type]] + [[`K`] [An arbitrary /key/ type]] + [[`o`] [An arbitrary object]] + [[`e`] [A Sequence element]] +] + +[heading Valid Expressions] + +For any Associative Sequence the following expressions must be valid: + +[table + [[Expression] [Return type] [Type Requirements] [Runtime Complexity]] + [[`__has_key__(s)`] [__mpl_boolean_constant__. + Convertible to bool.] [] [Constant]] + [[`__at_key__(s)`] [Any type] [] [Constant]] + [[`__at_key__(s) = o`] [Any type] [`s` is mutable and + `e = o`, where `e` + is the first element + in the sequence, is + a valid expression.] [Constant]] +] + +[heading Result Type Expressions] + +[table + [[Expression] [Compile Time Complexity]] + [[`__result_of_has_key__::type`] [Amortized constant time]] + [[`__result_of_at_key__::type`] [Amortized constant time]] + [[`__result_of_value_at_key__::type`] [Amortized constant time]] +] + +[blurb __note__ `__result_of_at_key__` returns the actual type returned +by `__at_key__(s)`. In most cases, this is a reference. Hence, there is no +way to know the exact element type using `__result_of_at_key__`.The +element at `K` may actually be a reference to begin with. For this purpose, +you can use `__result_of_value_at_key__`.] + +[heading Expression Semantics] + +[table + [[Expression] [Semantics]] + [[`__has_key__(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__(s)`] [The element associated with the key + `K` in the sequence `s`; see __at__.]] +] + +[heading Models] + +* __set__ +* __map__ + +[endsect] + +[endsect] + +[section Intrinsic] + +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__[footnote In practice, many of intrinsic functions +have default implementations that will work in majority of cases]. + +[heading Header] + + #include + #include + +[section Functions] + +[section begin] + +[heading Description] + +Returns an iterator pointing to the first element in the sequence. + +[heading Synopsis] + + template + typename __result_of_begin__::type + begin(Sequence& seq); + + template + typename __result_of_begin__::type + begin(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [Model of __forward_sequence__] [The sequence we wish to get an iterator from.]] +] + +[heading 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_access_sequence__. + +[*Semantics]: Returns an iterator pointing to the first element in the sequence. + +[heading Header] + + #include + #include + +[heading Example] + + __vector__ v(1, 2, 3); + assert(__deref__(begin(v)) == 1); + +[endsect] + +[section end] + +[heading Description] + +Returns an iterator pointing to one element past the end of the sequence. + +[heading Synopsis] + + template + typename __result_of_end__::type + end(Sequence& seq); + + template + typename __result_of_end__::type + end(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [Model of __forward_sequence__] [The sequence we wish to get an iterator from.]] +] + +[heading 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_access_sequence__. + +[*Semantics]: Returns an iterator pointing to one element past the end of +the sequence. + +[heading Header] + + #include + #include + +[heading Example] + + __vector__ v(1, 2, 3); + assert(__deref__(__prior__(end(v))) == 3); + +[endsect] + +[section empty] + +[heading Description] + +Returns a type convertible to `bool` that evaluates to `true` if the +sequence is empty, else, evaluates to `false`. + +[heading Synopsis] + + template + typename __result_of_empty__::type + empty(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [Model of __forward_sequence__] [The sequence we wish to investigate.]] +] + +[heading Expression Semantics] + + empty(seq); + +[*Return type]: Convertible to `bool`. + +[*Semantics]: Evaluates to `true` if the sequence is empty, else, evaluates +to `false`. + +[heading Header] + + #include + #include + +[heading Example] + + __vector__ v(1, 2, 3); + assert(empty(v) == false); + +[endsect] + +[section front] + +[heading Description] + +Returns the first element in the sequence. + +[heading Synopsis] + + template + typename __result_of_front__::type + front(Sequence& seq); + + template + typename __result_of_front__::type + front(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [Model of __forward_sequence__] [The sequence we wish to investigate.]] +] + +[heading 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` 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` + +[*Semantics]: Returns the first element in the sequence. + +[heading Header] + + #include + #include + +[heading Example] + + __vector__ v(1, 2, 3); + assert(front(v) == 1); + +[endsect] + +[section back] + +[heading Description] + +Returns the last element in the sequence. + +[heading Synopsis] + + template + typename __result_of_back__::type + back(Sequence& seq); + + template + typename __result_of_back__::type + back(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [Model of __bidirectional_sequence__] [The sequence we wish to investigate.]] +] + +[heading 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` 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` + +[*Semantics]: Returns the last element in the sequence. + +[heading Header] + + #include + #include + +[heading Example] + + __vector__ v(1, 2, 3); + assert(back(v) == 3); + +[endsect] + +[section size] + +[heading Description] + +Returns a type convertible to `int` that evaluates the number of elements +in the sequence. + +[heading Synopsis] + + template + typename __result_of_size__::type + size(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [Model of __forward_sequence__] [The sequence we wish to investigate.]] +] + +[heading Expression Semantics] + + size(seq); + +[*Return type]: Convertible to `int`. + +[*Semantics]: Returns the number of elements in the sequence. + +[heading Header] + + #include + #include + +[heading Example] + + __vector__ v(1, 2, 3); + assert(size(v) == 3); + +[endsect] + +[section at] + +[heading Description] + +Returns the N-th element from the beginning of the sequence. + +[heading Synopsis] + + template + typename __result_of_at__::type + at(Sequence& seq); + + template + typename __result_of_at__::type + at(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [Model of __random_access_sequence__] [The sequence we wish to investigate.]] + [[`N`] [An __mpl_integral_constant__] [An index from the beginning of the + sequence.]] +] + +[heading Expression Semantics] + + at(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` 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)` + +[*Semantics]: Equivalent to + + __deref__(__advance__(__begin__(s))) + +[heading Header] + + #include + #include + +[heading Example] + + __vector__ v(1, 2, 3); + assert(at >(v) == 2); + +[endsect] + +[section at_c] + +[heading Description] + +Returns the N-th element from the beginning of the sequence. + +[heading Synopsis] + + template + typename __result_of_at_c__::type + at_c(Sequence& seq); + + template + typename __result_of_at_c__::type + at_c(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [Model of __random_access_sequence__] [The sequence we wish to investigate.]] + [[`N`] [An integral constant] [An index from the beginning of the + sequence.]] +] + +[heading Expression Semantics] + + at_c(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` 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 < __size__(s)` + +[*Semantics]: Equivalent to + + __deref__(__advance__(__begin__(s))) + +[heading Header] + + #include + #include + +[heading Example] + + __vector__ v(1, 2, 3); + assert(at_c<1>(v) == 2); + +[endsect] + +[section has_key] + +[heading Description] + +Returns a type convertible to `bool` that evaluates to `true` if the +sequence contains an element associated with a Key, else, evaluates to +`false`. + +[heading Synopsis] + + template + typename __result_of_has_key__::type + has_key(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [Model of __associative_sequence__] [The sequence we wish to investigate.]] + [[`Key`] [Any type] [The queried key.]] +] + +[heading Expression Semantics] + + has_key(seq); + +[*Return type]: Convertible to `bool`. + +[*Semantics]: Evaluates to `true` if the sequence contains an element +associated with Key, else, evaluates to `false`. + +[heading Header] + + #include + #include + +[heading Example] + + __set__ s(1, 'x', true); + assert(has_key(s) == true); + +[endsect] + +[section at_key] + +[heading Description] + +Returns the element associated with a Key from the sequence. + +[heading Synopsis] + + template + typename __result_of_at_key__::type + at_key(Sequence& seq); + + template + typename __result_of_at_key__::type + at_key(Sequence const& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`seq`] [Model of __associative_sequence__] [The sequence we wish to investigate.]] + [[`Key`] [Any type] [The queried key.]] +] + +[heading Expression Semantics] + + at_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` is the +element associated with Key, is a valid expression. Else, returns a type +convertable to the element associated with Key. + +[*Precondition]: `has_key(seq) == true` + +[*Semantics]: Returns the element associated with Key. + +[heading Header] + + #include + #include + +[heading Example] + + __set__ s(1, 'x', true); + assert(at_key(s) == 'x'); + +[endsect] + +[section swap] + +[heading Description] + +Performs an element by element swap of the elements in 2 sequences. + +[heading Synopsis] + template + void swap(Seq1& seq1, Seq2& seq2); + +[heading Parameters] + +[table + [[Parameters] [Requirement] [Description]] + [[`seq1`, `seq2`] [Models of __forward_sequence__][The sequences whos elements we wish to swap.]] +] + +[heading Expression Semantics] + + swap(seq1, seq2); + +[*Return type]: `void` + +[*Precondition]: `__size__(seq1) == __size__(seq2)` + +[*Semantics]: Calls `swap(a1, b1)` for corresponding elements in `seq1` and `seq2`. + +/sequence/intrinsic/swap.hpp> + +[heading Example] + __vector__ v1(1, "hello"), v2(2, "world"); + swap(v1, v2); + assert(v1 == __make_vector__(2, "world")); + assert(v2 == __make_vector__(1, "hello")); + +[endsect] + +[endsect] + +[section Metafunctions] + +[section begin] + +[heading Description] +Returns the result type of __begin__. + +[heading Synopsis] + template + struct begin + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Seq`][A model of __forward_sequence__][Argument sequence]] +] + +[heading Expression Semantics] + result_of::begin::type + +[*Return type]: An iterator modelling the same traversal concept as `Seq`. + +[*Semantics]: Returns the type of an iterator to the first element of `Seq`. + +/sequence/intrinsic/begin.hpp> + +[heading Example] + typedef __vector__ vec; + typedef __result_of_begin__::type it; + BOOST_MPL_ASSERT((boost::is_same<__result_of_deref__::type, int&>)) + +[endsect] + +[section end] + +[heading Description] +Returns the result type of __end__. + +[heading Synopsis] + template + struct end + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Seq`][A model of __forward_sequence__][Argument sequence]] +] + +[heading Expression Semantics] + result_of::end::type + +[*Return type]: A model of the same traversal concept as `Seq`. + +[*Semantics]: Returns the type of an iterator one past the end of `Seq`. + +/sequence/intrinsic/end.hpp> + +[heading Example] + typedef __vector__ vec; + typedef __result_of_prior__<__result_of_end__::type>::type first; + BOOST_MPL_ASSERT((__result_of_equal_to__::type>)) + +[endsect] + +[section empty] + +[heading Description] +Returns the result type of __empty__. + +[heading Synopsis] + template + struct empty + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Seq`][A model of __forward_sequence__][Argument sequence]] +] + +[heading Expression Semantics] + result_of::empty::type + +[*Return type]: An __mpl_integral_constant__ + +[*Semantics]: Returns `mpl::true_` if `Seq` has zero elements, `mpl::false_` otherwise. + +/sequence/intrinsic/empty.hpp> + +[heading Example] + typedef __vector__<> empty_vec; + typedef __vector__ vec; + + BOOST_MPL_ASSERT((__result_of_empty__)); + BOOST_MPL_ASSERT_NOT((__result_of_empty__)); + +[endsect] + +[section front] + +[heading Description] +Returns the result type of __front__. + +[heading Synopsis] + template + struct front + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Seq`][A model of __forward_sequence__][Argument sequence]] +] + +[heading Expression Semantics] + result_of::front::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__::type>::type`. + +/sequence/intrinsic/front.hpp> + +[heading Example] + typedef __vector__ vec; + BOOST_MPL_ASSERT((boost::is_same<__result_of_front__::type, int&>)); + +[endsect] + +[section back] + +[heading Description] +Returns the result type of __back__. + +[heading Synopsis] + template + struct back + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Seq`][A model of __forward_sequence__][Argument sequence]] +] + +[heading Expression Semantics] + result_of::back::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__::type>::type>::type`. + +/sequence/intrinsic/back.hpp> + +[heading Example] + typedef __vector__ vec; + BOOST_MPL_ASSERT((boost::is_same<__result_of_back__::type, char&>)); + +[endsect] + +[section size] + +[heading Description] +Returns the result type of __size__. + +[heading Synopsis] + template + struct size + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Seq`][A model of __forward_sequence__][Argument sequence]] +] + +[heading Expression Semantics] + result_of::size::type + +[*Return type]: An __mpl_integral_constant__. + +[*Semantics]: Returns the number of elements in `Seq`. + +/sequence/intrinsic/size.hpp> + +[heading Example] + typedef __vector__ vec; + typedef __result_of_size__::type size_mpl_integral_constant; + BOOST_MPL_ASSERT_RELATION(size_mpl_integral_constant::value, ==, 3); + +[endsect] + +[section at] + +[heading Description] + +Returns the result type of __at__[footnote __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__]. + +[heading Synopsis] + template< + typename Seq, + typename N> + struct at + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Seq`][A model of __forward_sequence__][Argument sequence]] + [[`N`][An __mpl_integral_constant__][Index of element]] +] + +[heading Expression Semantics] + result_of::at::type + +[*Return type]: Any type. + +[*Semantics]: Returns the result type of using __at__ to access the `N`th element of `Seq`. + +/sequence/intrinsic/at.hpp> + +[heading Example] + typedef __vector__ vec; + BOOST_MPL_ASSERT((boost::is_same<__result_of_at__ >::type, float&>)); + +[endsect] + +[section at_c] + +[heading Description] + +Returns the result type of __at_c__[footnote __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__]. + +[heading Synopsis] + template< + typename Seq, + int M> + struct at_c + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Seq`][A model of __forward_sequence__][Argument sequence]] + [[`M`][Positive integer index][Index of element]] +] + +[heading Expression Semantics] + result_of::at_c::type + +[*Return type]: Any type + +[*Semantics]: Returns the result type of using __at_c__ to access the `M`th element of `Seq`. + +/sequence/intrinsic/at.hpp> + +[heading Example] + typedef __vector__ vec; + BOOST_MPL_ASSERT((boost::is_same<__result_of_at_c__::type, float&>)); + +[endsect] + +[section value_at] + +[heading Description] + +Returns the actual type at a given index from the __sequence__. + +[heading Synopsis] + template< + typename Seq, + typename N> + struct value_at + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Seq`][A model of __forward_sequence__][Argument sequence]] + [[`N`][An __mpl_integral_constant__][Index of element]] +] + +[heading Expression Semantics] + result_of::value_at::type + +[*Return type]: Any type. + +[*Semantics]: Returns the actual type at the `N`th element of `Seq`. + +/sequence/intrinsic/value_at.hpp> + +[heading Example] + typedef __vector__ vec; + BOOST_MPL_ASSERT((boost::is_same<__result_of_value_at__ >::type, float>)); + +[endsect] + +[section value_at_c] + +[heading Description] + +Returns the actual type at a given index from the __sequence__. + +[heading Synopsis] + template< + typename Seq, + int M> + struct value_at_c + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Seq`][A model of __forward_sequence__][Argument sequence]] + [[`M`][Positive integer index][Index of element]] +] + +[heading Expression Semantics] + result_of::value_at_c::type + +[*Return type]: Any type + +[*Semantics]: Returns the actual type at the `M`th element of `Seq`. + +/sequence/intrinsic/value_at.hpp> + +[heading Example] + typedef __vector__ vec; + BOOST_MPL_ASSERT((boost::is_same<__result_of_value_at_c__::type, float>)); + +[endsect] + +[section has_key] + +[heading Description] +Returns the result type of __has_key__. + +[heading Synopsis] + template< + typename Seq, + typename Key> + struct has_key + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Seq`][A model of __forward_sequence__][Argument sequence]] + [[`Key`][Any type][Key type]] +] + +[heading Expression Semantics] + result_of::has_key::type + +[*Return type]: An __mpl_integral_constant__. + +[*Semantics]: Returns `mpl::true_` if `Seq` contains an element with key type `Key`, returns `mpl::false_` otherwise. + +/sequence/intrinsic/has_key.hpp> + +[heading Example] + typedef __map__<__pair__, __pair__, __pair__ > mymap; + BOOST_MPL_ASSERT((__result_of_has_key__)); + BOOST_MPL_ASSERT_NOT((__result_of_has_key__)); + +[endsect] + +[section at_key] + +[heading Description] + +Returns the result type of __at_key__[footnote __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__]. + +[heading Synopsis] + template< + typename Seq, + typename Key> + struct at_key + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Seq`][A model of __forward_sequence__][Argument sequence]] + [[`Key`][Any type][Key type]] +] + +[heading Expression Semantics] + result_of::at_key::type + +[*Return type]: Any type. + +[*Semantics]: Returns the result of using __at_key__ to access the element with key type `Key` in `Seq`. + +/sequence/intrinsic/at_key.hpp> + +[heading Example] + typedef __map__<__pair__, __pair__, __pair__ > mymap; + BOOST_MPL_ASSERT((boost::is_same<__result_of_at_key__::type, char&>)); + +[endsect] + +[section value_at_key] + +[heading Description] +Returns the actual element type associated with a Key from the __sequence__. + +[heading Synopsis] + template< + typename Seq, + typename Key> + struct value_at_key + { + typedef __unspecified__ type; + }; + +[table Parameters + [[Parameter] [Requirement] [Description]] + [[`Seq`][A model of __forward_sequence__][Argument sequence]] + [[`Key`][Any type][Key type]] +] + +[heading Expression Semantics] + result_of::value_at_key::type + +[*Return type]: Any type. + +[*Semantics]: Returns the actual element type associated with key type +`Key` in `Seq`. + +/sequence/intrinsic/value_at_key.hpp> + +[heading Example] + typedef __map__<__pair__, __pair__, __pair__ > mymap; + BOOST_MPL_ASSERT((boost::is_same<__result_of_at_key__::type, char>)); + +[endsect] + +[section swap] + +[heading Description] +Returns the return type of swap. + +[heading Synopsis] + template + struct swap + { + typedef void type; + }; + +[table Parameters + [[Parameters] [Requirement] [Description]] + [[`Seq1`, `Seq2`][Models of __forward_sequence__][The sequences being swapped]] +] + +[heading Expression Semantics] + result_of::swap::type + +[*Return type]: `void`. + +[*Semantics]: Always returns `void`. + +/sequence/intrinsic/swap.hpp> + +[endsect] + +[endsect] + +[endsect] + +[section Operator] + +These operators, like the __algorithms__, work generically on all Fusion +sequences. All conforming Fusion sequences automatically get these +operators for free. + +[section 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 default delimiter between the elements is space, and the __sequence__ +is enclosed in parenthesis. For Example: + + __vector__ a(1.0f, 2, std::string("Howdy folks!"); + cout << a; + +outputs the __vector__ as: (1.0 2 Howdy folks!) + +The library defines three manipulators for changing the default behavior: + +[variablelist Manipulators + [[`tuple_open(arg)`] [Defines the character that is output before the first element.]] + [[`tuple_close(arg)`] [Defines the character that is output after the last element.]] + [[`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`, a C-string, or a wide C-string. + +Example: + + std::cout << tuple_open('[') << tuple_close(']') << tuple_delimiter(", ") << 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` stream contains the following data: + + (1 2 3) [4:5] + +The code: + + __vector__ i; + __vector__ 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`. + +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. + +[heading Header] + + #include + #include + +[section in] + +[heading Description] + +Read a __sequence__ from an input stream. + +[heading Synopsis] + + template + IStream& + operator>>(IStream& is, Sequence& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[is] [An input stream.] [Stream to extract information from.]] + [[seq] [A __sequence__.] [The sequence to read.]] +] + +[heading Expression Semantics] + + is >> seq + +[*Return type]: IStream& + +[*Semantics]: For each element, `e`, in sequence, `seq`, call `is >> e`. + +[heading Header] + + #include + #include + +[heading Example] + + __vector__ v; + std::cin >> v; + +[endsect] + +[section out] + +[heading Description] + +Write a __sequence__ to an output stream. + +[heading Synopsis] + + template + OStream& + operator<<(OStream& os, Sequence& seq); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[os] [An output stream.] [Stream to write information to.]] + [[seq] [A __sequence__.] [The sequence to write.]] +] + +[heading Expression Semantics] + + os << seq + +[*Return type]: OStream& + +[*Semantics]: For each element, `e`, in sequence, `seq`, call `os << e`. + +[heading Header] + + #include + #include + +[heading Example] + + std::cout << __make_vector__(123, "Hello", 'x') << std::endl; + +[endsect] + +[endsect] + +[section Comparison] + +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. + +[heading Header] + + #include + #include + +[section equal] + +[heading Description] + +Compare two sequences for equality. + +[heading Synopsis] + + template + bool + operator==(Seq1 const& a, Seq2 const& b); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`a, b`] [Instances of __sequence__] [__sequence__(s) to compare]] +] + +[heading Expression Semantics] + + a == b + +[*Return type]: `bool` + +[*Requirements]: + +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. + +An attempt to compare two Sequences of different lengths results in a +compile time error. + +[*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 __sequence__s, +e and f, e == f returns true. + +[heading Header] + + #include + #include + +[heading Example] + + __vector__ v1(5, 'a'); + __vector__ v2(5, 'a'); + assert(v1 == v2); + +[endsect] + +[section not equal] + +Compare two sequences for inequality. + +[heading Synopsis] + + template + bool + operator!=(Seq1 const& a, Seq2 const& b); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`a, b`] [Instances of __sequence__] [__sequence__(s) to compare]] +] + +[heading Expression Semantics] + + a != b + +[*Return type]: `bool` + +[*Requirements]: + +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. + +An attempt to compare two Sequences of different lengths results in a +compile time error. + +[*Semantics]: + +Returns !(a == b). + +[heading Header] + + #include + #include + +[heading Example] + + __vector__ v3(5, 'b'); + __vector__ t4(2, 'a'); + assert(v1 != v3); + assert(v1 != t4); + assert(!(v1 != v2)); + +[endsect] + +[section less than] + +Lexicographically compare two sequences. + +[heading Synopsis] + + template + bool + operator<(Seq1 const& a, Seq2 const& b); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`a, b`] [Instances of __sequence__] [__sequence__(s) to compare]] +] + +[heading Expression Semantics] + + a < b + +[*Return type]: `bool` + +[*Requirements]: + +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. + +An attempt to compare two Sequences of different lengths results in a +compile time error. + +[*Semantics]: Returns the lexicographical comparison of between `a` and `b`. + +[heading Header] + + #include + #include + +[heading Example] + + __vector__ v1(4, 3.3f); + __vector__ v2(5, 3.3f); + __vector__ v3(5, 4.4); + assert(v1 < v2); + assert(v2 < v3); + +[endsect] + +[section less than equal] + +Lexicographically compare two sequences. + +[heading Synopsis] + + template + bool + operator<=(Seq1 const& a, Seq2 const& b); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`a, b`] [Instances of __sequence__] [__sequence__(s) to compare]] +] + +[heading Expression Semantics] + + a <= b + +[*Return type]: `bool` + +[*Requirements]: + +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. + +An attempt to compare two Sequences of different lengths results in a +compile time error. + +[*Semantics]: Returns !(b < a). + +[heading Header] + + #include + #include + +[heading Example] + + __vector__ v1(4, 3.3f); + __vector__ v2(5, 3.3f); + __vector__ v3(5, 4.4); + assert(v1 <= v2); + assert(v2 <= v3); + +[endsect] + +[section greater than] + +Lexicographically compare two sequences. + +[heading Synopsis] + + template + bool + operator>(Seq1 const& a, Seq2 const& b); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`a, b`] [Instances of __sequence__] [__sequence__(s) to compare]] +] + +[heading Expression Semantics] + + a > b + +[*Return type]: `bool` + +[*Requirements]: + +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. + +An attempt to compare two Sequences of different lengths results in a +compile time error. + +[*Semantics]: Returns b < a. + +[heading Header] + + #include + #include + +[heading Example] + + __vector__ v1(4, 3.3f); + __vector__ v2(5, 3.3f); + __vector__ v3(5, 4.4); + assert(v2 > v1); + assert(v3 > v2); + +[endsect] + +[section greater than equal] + +Lexicographically compare two sequences. + +[heading Synopsis] + + template + bool + operator>=(Seq1 const& a, Seq2 const& b); + +[heading Parameters] + +[table + [[Parameter] [Requirement] [Description]] + [[`a, b`] [Instances of __sequence__] [__sequence__(s) to compare]] +] + +[heading Expression Semantics] + + a >= b + +[*Return type]: `bool` + +[*Requirements]: + +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. + +An attempt to compare two Sequences of different lengths results in a +compile time error. + +[*Semantics]: Returns !(a < b). + +[heading Header] + + #include + #include + +[heading Example] + + __vector__ v1(4, 3.3f); + __vector__ v2(5, 3.3f); + __vector__ v3(5, 4.4); + assert(v2 >= v1); + assert(v3 >= v2); + +[endsect] + +[endsect] + +[endsect] + +[endsect] + diff --git a/doc/sequences.qbk b/doc/sequences.qbk deleted file mode 100644 index ae1ce0ea..00000000 --- a/doc/sequences.qbk +++ /dev/null @@ -1,4036 +0,0 @@ -[section Sequences] - -Like __mpl__, the Sequence is a fundamental concept in Fusion. A Sequence -may or may not actually store or contain data. __containers__ 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__ type that can be used to iterate through the -Sequence's elements. - -[heading Header] - - #include - -[section Concepts] - -Fusion Sequences are organized into a hierarchy of concepts. - -[heading 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_sequence__. -These concepts pertain to sequence traversal. - -[heading Associativity] - -The __associative_sequence__ concept is orthogonal to traversal. An Associative -Sequence allows efficient retrieval of elements based on keys. - -[section Forward Sequence] - -[heading 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. The requirement of a definite ordering allows the definition of -element-by-element equality (if the container's element type is Equality -Comparable) and of lexicographical ordering (if the container's element -type is LessThan Comparable). - -[variablelist Notation - [[`s`] [A Forward Sequence]] - [[`S`] [A Forward Sequence type]] - [[`o`] [An arbitrary object]] - [[`e`] [A Sequence element]] -] - -[heading Valid Expressions] - -For any Forward Sequence the following expressions must be valid: - -[table - [[Expression] [Return type] [Type Requirements] [Runtime Complexity]] - [[`__begin__(s)`] [__forward_iterator__] [] [Constant]] - [[`__end__(s)`] [__forward_iterator__] [] [Constant]] - [[`__size__(s)`] [__mpl_integral_constant__. - Convertible to int.] [] [Constant]] - [[`__empty__(s)`] [__mpl_boolean_constant__. - Convertible to bool.] [] [Constant]] - [[`__front__(s)`] [Any type] [] [Constant]] - [[`__front__(s) = o`] [Any type] [`s` is mutable and - `e = o`, where `e` - is the first element - in the sequence, is - a valid expression.] [Constant]] -] - -[heading Result Type Expressions] - -[table - [[Expression] [Compile Time Complexity]] - [[`__result_of_begin__::type`] [Amortized constant time]] - [[`__result_of_end__::type`] [Amortized constant time]] - [[`__result_of_size__::type`] [Unspecified]] - [[`__result_of_empty__::type`] [Constant time]] - [[`__result_of_front__::type`] [Amortized constant time]] -] - -[heading Expression Semantics] - -[table - [[Expression] [Semantics]] - [[`__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__.]] - [[`__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__.]] - [[`__front__(s)`] [The first element in the sequence; see __front__.]] -] - -[heading Invariants] - -For any Forward Sequence s the following invariants always hold: - -* `[__begin__(s), __end__(s))` is always a valid range. -* An __algorithm__ that iterates through the range `[__begin__(s), __end__(s))` - will pass through every element of `s` exactly once. -* `__begin__(s)` is identical to `__end__(s))` if and only if `s` is empty. -* Two different iterations through `s` will access its elements in - the same order. - -[heading Models] - -* __std_pair__ -* __boost_array__ -* __vector__ -* __cons__ -* __list__ -* __set__ -* __map__ -* __single_view__ -* __filter_view__ -* __iterator_range__ -* __joint_view__ -* __transform_view__ -* __reverse_view__ -* __zip_view__ - -[endsect] - -[section Bidirectional Sequence] - -[heading Description] - -A Bidirectional Sequence is a __forward_sequence__ whose iterators model -__bidirectional_iterator__. - -[heading Refinement of] - -__forward_sequence__ - -[variablelist Notation - [[`s`] [A Forward Sequence]] - [[`S`] [A Forward Sequence type]] - [[`o`] [An arbitrary object]] - [[`e`] [A Sequence element]] -] - -[heading Valid Expressions] - -In addition to the requirements defined in __forward_sequence__, for any -Bidirectional Sequence the following must be met: - -[table - [[Expression] [Return type] [Type Requirements] [Runtime Complexity]] - [[`__begin__(s)`] [__bidirectional_iterator__] [] [Constant]] - [[`__end__(s)`] [__bidirectional_iterator__] [] [Constant]] - [[`__back__(s)`] [Any type] [] [Constant]] - [[`__back__(s) = o`] [Any type] [`s` is mutable and - `e = o`, where `e` - is the first element - in the sequence, is - a valid expression.] [Constant]] -] - -[heading Result Type Expressions] - -[table - [[Expression] [Compile Time Complexity]] - [[`__result_of_begin__::type`] [Amortized constant time]] - [[`__result_of_end__::type`] [Amortized constant time]] - [[`__result_of_back__::type`] [Amortized constant time]] -] - -[heading Expression Semantics] - -The semantics of an expression are defined only where they differ from, or -are not defined in __forward_sequence__. - -[table - [[Expression] [Semantics]] - [[`__back__(s)`] [The last element in the sequence; see __back__.]] -] - -[heading Models] - -* __std_pair__ -* __boost_array__ -* __vector__ -* __reverse_view__ -* __iterator_range__ (where adapted sequence is a Bidirectional Sequence) -* __transform_view__ (where adapted sequence is a Bidirectional Sequence) -* __zip_view__ (where adapted sequences are models Bidirectional Sequence) - -[endsect] - -[section Random Access Sequence] - -[heading Description] - -A Random Access Sequence is a __bidirectional_sequence__ whose iterators -model __random_access_iterator__. It guarantees constant time access to -arbitrary sequence elements. - -[heading Refinement of] - -__bidirectional_sequence__ - -[variablelist Notation - [[`s`] [A Random Access Sequence]] - [[`S`] [A Random Access Sequence type]] - [[`N`] [An __mpl_integral_constant__]] - [[`o`] [An arbitrary object]] - [[`e`] [A Sequence element]] -] - -[heading Valid Expressions] - -In addition to the requirements defined in __bidirectional_sequence__, for -any Random Access Sequence the following must be met: - -[table - [[Expression] [Return type] [Type Requirements] [Runtime Complexity]] - [[`__begin__(s)`] [__random_access_iterator__] [] [Constant]] - [[`__end__(s)`] [__random_access_iterator__] [] [Constant]] - [[`__at__(s)`] [Any type] [] [Constant]] - [[`__at__(s) = o`] [Any type] [`s` is mutable and - `e = o`, where `e` - is the first element - in the sequence, is - a valid expression.] [Constant]] -] - -[heading Result Type Expressions] - -[table - [[Expression] [Compile Time Complexity]] - [[`__result_of_begin__::type`] [Amortized constant time]] - [[`__result_of_end__::type`] [Amortized constant time]] - [[`__result_of_at__::type`] [Amortized constant time]] - [[`__result_of_value_at__::type`] [Amortized constant time]] -] - -[blurb __note__ `__result_of_at__` returns the actual type returned by -`__at__(s)`. In most cases, this is a reference. Hence, there is no way to -know the exact element type using `__result_of_at__`.The element at `N` -may actually be a reference to begin with. For this purpose, you can use -`__result_of_value_at__`.] - -[heading Expression Semantics] - -The semantics of an expression are defined only where they differ from, or -are not defined in __bidirectional_sequence__. - -[table - [[Expression] [Semantics]] - [[`__at__(s)`] [The Nth element from the beginning of the sequence; see __at__.]] -] - -[heading Models] - -* __std_pair__ -* __boost_array__ -* __vector__ -* __reverse_view__ -* __iterator_range__ (where adapted sequence is a Random Access Sequence) -* __transform_view__ (where adapted sequence is a Random Access Sequence) -* __zip_view__ (where adapted sequences are models Random Access Sequence) - -[endsect] - -[section Associative Sequence] - -[heading Description] - -An Associative Sequence allows efficient retrieval of elements based on keys. -Like associative sequences in __mpl__, and unlike associative containers in -__stl__, Fusion associative sequences have no implied ordering relation. -Instead, type identity is used to impose an equivalence relation on keys, and -the order in which sequence elements are traversed during iteration is left -unspecified. In addition, unlike __stl__, Associative Sequences have mutable -iterators. This is due to the fact that 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. - - -[variablelist Notation - [[`s`] [An Associative Sequence]] - [[`S`] [An Associative Sequence type]] - [[`K`] [An arbitrary /key/ type]] - [[`o`] [An arbitrary object]] - [[`e`] [A Sequence element]] -] - -[heading Valid Expressions] - -For any Associative Sequence the following expressions must be valid: - -[table - [[Expression] [Return type] [Type Requirements] [Runtime Complexity]] - [[`__has_key__(s)`] [__mpl_boolean_constant__. - Convertible to bool.] [] [Constant]] - [[`__at_key__(s)`] [Any type] [] [Constant]] - [[`__at_key__(s) = o`] [Any type] [`s` is mutable and - `e = o`, where `e` - is the first element - in the sequence, is - a valid expression.] [Constant]] -] - -[heading Result Type Expressions] - -[table - [[Expression] [Compile Time Complexity]] - [[`__result_of_has_key__::type`] [Amortized constant time]] - [[`__result_of_at_key__::type`] [Amortized constant time]] - [[`__result_of_value_at_key__::type`] [Amortized constant time]] -] - -[blurb __note__ `__result_of_at_key__` returns the actual type returned -by `__at_key__(s)`. In most cases, this is a reference. Hence, there is no -way to know the exact element type using `__result_of_at_key__`.The -element at `K` may actually be a reference to begin with. For this purpose, -you can use `__result_of_value_at_key__`.] - -[heading Expression Semantics] - -[table - [[Expression] [Semantics]] - [[`__has_key__(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__(s)`] [The element associated with the key - `K` in the sequence `s`; see __at__.]] -] - -[heading Models] - -* __set__ -* __map__ - -[endsect] - -[endsect] - -[section Containers] - -Fusion provides a few predefined sequences out of the box. These -/containers/ actually hold heterogenously typed data; unlike -__views__. These containers are more or less counterparts of those in __stl__. - -[heading Header] - - #include - -[section vector] - -[heading Description] - -`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` is the simplest of the Fusion -sequence container, and in many cases the most efficient. - -[heading Header] - - #include - #include - - // numbered forms - #include - #include - #include - #include - #include - -[heading Synopsis] - -[*Numbered forms] - - template <> - struct vector0; - - template - struct vector1; - - template - struct vector2; - - template - struct vector3; - - ... - - template - struct vectorN; - -[*Variadic form] - - template < - typename T0 = __unspecified__ - , typename T1 = __unspecified__ - , typename T2 = __unspecified__ - ... - , typename TN = __unspecified__ - > - struct vector; - -The numbered form accepts the exact number of elements. Example: - - vector3 - -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 - -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 - -[heading Template parameters] - -[table - [[Parameter] [Description] [Default]] - [[`T0`...`TN`] [Element types] [['unspecified]]] -] - -[heading Model of] - -* __random_access_sequence__ - -[variablelist Notation - [[`v`] [Instance of `vector`]] - [[`V`] [A `vector` type]] - [[`e0`...`en`] [Heterogeneous values]] - [[`s`] [A __forward_sequence__]] -] - -[heading Expression Semantics] - -Semantics of an expression is defined only where it differs from, or is not -defined in __random_access_sequence__. - -[table - [[Expression] [Semantics]] - [[`V()`] [Creates a vector with default constructed elements.]] - [[`V(e0, e1,... en)`] [Creates a vector with elements `e0`...`en`.]] - [[`V(s)`] [Copy constructs a vector from a __forward_sequence__, `s`.]] - [[`v = s`] [Assigns to a vector, `v`, from a __forward_sequence__, `s`.]] -] - -[heading Example] - - vector v(12, 5.5f); - std::cout << __at_c__<0>(v) << std::endl; - std::cout << __at_c__<1>(v) << std::endl; - -[endsect] - -[section cons] - -[heading 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 is constructed piecemeal (a data at a -time). The runtime cost of access to each element is peculiarly constant -(see __recursive_inline__). - -[heading Header] - - #include - -[heading Synopsis] - - template - struct cons; - -[heading Template parameters] - -[table - [[Parameter] [Description] [Default]] - [[`Car`] [Head type] []] - [[`Cdr`] [Tail type] [`nil`]] -] - -[heading Model of] - -* __forward_sequence__ - -[variablelist Notation - [[`nil`] [An empty `cons`]] - [[`C`] [A `cons` type]] - [[`l`, `l2`] [Instances of `cons`]] - [[`car`] [An arbitrary data]] - [[`cdr`] [Another `cons` list]] - [[`s`] [A __forward_sequence__]] - [[`N`] [An __mpl_integral_constant__]] -] - -[heading Expression Semantics] - -Semantics of an expression is defined only where it differs from, or is not -defined in __forward_sequence__. - -[table - [[Expression] [Semantics]] - [[`nil()`] [Creates an empty list.]] - [[`C()`] [Creates a cons with default constructed elements.]] - [[`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(s)`] [Copy constructs a cons from a __forward_sequence__, `s`.]] - [[`l = s`] [Assigns to a cons, `l`, from a __forward_sequence__, `s`.]] - [[`__at__(l)`] [The Nth element from the beginning of the sequence; see __at__.]] -] - -[blurb __note__ `__at__(l)` is provided for convenience and compatibility -with the original __tuple__ library, despite `cons` being a -__forward_sequence__ only (`at` is supposed to be a -__random_access_sequence__ requirement). The runtime complexity of __at__ is -constant (see __recursive_inline__).] - -[heading Example] - - cons > l(12, cons(5.5f)); - std::cout << __at_c__<0>(l) << std::endl; - std::cout << __at_c__<1>(l) << std::endl; - -[endsect] - -[section list] - -[heading Description] - -`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_inline__). - -[heading Header] - - #include - #include - -[heading Synopsis] - - template < - typename T0 = __unspecified__ - , typename T1 = __unspecified__ - , typename T2 = __unspecified__ - ... - , typename TN = __unspecified__ - > - 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`. Example: - - list - -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 - -[heading Template parameters] - -[table - [[Parameter] [Description] [Default]] - [[`T0`...`TN`] [Element types] [['unspecified-type]]] -] - -[heading Model of] - -* __forward_sequence__ - -[variablelist Notation - [[`L`] [A `list` type]] - [[`l`] [An instance of `list`]] - [[`e0`...`en`] [Heterogeneous values]] - [[`s`] [A __forward_sequence__]] - [[`N`] [An __mpl_integral_constant__]] -] - -[heading Expression Semantics] - -Semantics of an expression is defined only where it differs from, or is not -defined in __forward_sequence__. - -[table - [[Expression] [Semantics]] - [[`L()`] [Creates a list with default constructed elements.]] - [[`L(e0, e1,... en)`] [Creates a list with elements `e0`...`en`.]] - [[`L(s)`] [Copy constructs a list from a __forward_sequence__, `s`.]] - [[`l = s`] [Assigns to a list, `l`, from a __forward_sequence__, `s`.]] - [[`__at__(l)`] [The Nth element from the beginning of the sequence; see __at__.]] -] - -[blurb __note__ `__at__(l)` is provided for convenience and compatibility -with the original __tuple__ library, despite `list` being a -__forward_sequence__ only (__at__ is supposed to be a -__random_access_sequence__ requirement). The runtime complexity of __at__ is -constant (see __recursive_inline__).] - -[heading Example] - - list l(12, 5.5f); - std::cout << __at_c__<0>(l) << std::endl; - std::cout << __at_c__<1>(l) << std::endl; - -[endsect] - -[section set] - -[heading Description] - -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_functions__). - -[heading Header] - - #include - -[heading Synopsis] - - template < - typename T0 = __unspecified__ - , typename T1 = __unspecified__ - , typename T2 = __unspecified__ - ... - , typename TN = __unspecified__ - > - 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`. Example: - - set - -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 - -[heading Template parameters] - -[table - [[Parameter] [Description] [Default]] - [[`T0`...`TN`] [Element types] [['unspecified-type]]] -] - -[heading Model of] - -* __associative_sequence__ -* __forward_sequence__ - -[variablelist Notation - [[`S`] [A `set` type]] - [[`s`] [An instance of `set`]] - [[`e0`...`en`] [Heterogeneous values]] - [[`fs`] [A __forward_sequence__]] -] - -[heading Expression Semantics] - -Semantics of an expression is defined only where it differs from, or is not -defined in __random_access_sequence__ and __associative_sequence__. - -[table - [[Expression] [Semantics]] - [[`S()`] [Creates a set with default constructed elements.]] - [[`S(e0, e1,... en)`] [Creates a set with elements `e0`...`en`.]] - [[`S(fs)`] [Copy constructs a set from a __forward_sequence__ `fs`.]] - [[`s = fs`] [Assigns to a set, `s`, from a __forward_sequence__ `fs`.]] -] - -[heading Example] - - typedef set S; - S s(12, 5.5f); - std::cout << __at_key__(s) << std::endl; - std::cout << __at_key__(s) << std::endl; - std::cout << __result_of_has_key__::value << std::endl; - -[endsect] - -[section map] - -[heading Description] - -map is an __associative_sequence__ of heteregenous typed data elements. -Each element is a key/data 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__). - -[heading Header] - - #include - -[heading Synopsis] - - template < - typename T0 = __unspecified__ - , typename T1 = __unspecified__ - , typename T2 = __unspecified__ - ... - , typename TN = __unspecified__ - > - 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`. Example: - - map<__pair__, __pair__, __pair__ > - -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 - -[heading Template parameters] - -[table - [[Parameter] [Description] [Default]] - [[`T0`...`TN`] [Element types] [['unspecified-type]]] -] - -[heading Model of] - -* __associative_sequence__ -* __forward_sequence__ - -[variablelist Notation - [[`M`] [A `map` type]] - [[`m`] [An instance of `map`]] - [[`e0`...`en`] [Heterogeneous key/value pairs (see __fusion_pair__)]] - [[`s`] [A __forward_sequence__]] -] - -[heading Expression Semantics] - -Semantics of an expression is defined only where it differs from, or is not -defined in __random_access_sequence__ and __associative_sequence__. - -[table - [[Expression] [Semantics]] - [[`M()`] [Creates a map with default constructed elements.]] - [[`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`] [Assigns to a map, `m`, from a __forward_sequence__ `s`.]] -] - -[heading Example] - - typedef map< - __pair__ - , __pair__ > - map_type; - - map_type m( - __fusion_make_pair__('X') - , __fusion_make_pair__("Men")); - - std::cout << __at_key__(m) << std::endl; - std::cout << __at_key__(m) << std::endl; - -[endsect] - -[endsect] - -[section 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 are proxies. They provide an efficient yet purely -functional way to work on potentially expensive sequence operations. Views -are inherently lazy. Their elements are only computed on demand only when -the elements of the underlying sequence(s) are actually accessed. Views' -lazy nature make them very cheap to copy and be passed around by value. - -[heading Header] - - #include - -[section single_view] - -`single_view` is a view into a value as a single element sequence. - -[heading Header] - - #include - -[heading Synopsis] - - template - struct single_view; - -[heading Template parameters] - -[table - [[Parameter] [Description] [Default]] - [[`T`] [Any type] []] -] - -[heading Model of] - -* __forward_sequence__ - -[variablelist Notation - [[`S`] [A `single_view` type]] - [[`s`, `s2`] [Instances of `single_view`]] - [[`x`] [An instance of `T`]] -] - -[heading Expression Semantics] - -Semantics of an expression is defined only where it differs from, or is not -defined in __forward_sequence__. - -[table - [[Expression] [Semantics]] - [[`S(x)`] [Creates a `single_view` from `x`.]] - [[`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`.]] -] - -[heading Example] - - single_view view(3); - std::cout << view << std::endl; - -[endsect] - -[section filter_view] - -[heading Description] - -`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_`. - -[heading Header] - - #include - -[heading Synopsis] - - template - struct filter_view; - -[heading Template parameters] - -[table - [[Parameter] [Description] [Default]] - [[`Sequence`] [A __forward_sequence__] []] - [[`Pred`] [Unary Metafunction - returning an `mpl::bool_`] []] -] - -[heading Model of] - -* __forward_sequence__ - -[variablelist Notation - [[`F`] [A `filter_view` type]] - [[`f`, `f2`] [Instances of `filter_view`]] - [[`s`] [A __forward_sequence__]] -] - -[heading Expression Semantics] - -Semantics of an expression is defined only where it differs from, or is not -defined in __forward_sequence__. - -[table - [[Expression] [Semantics]] - [[`F(s)`] [Creates a `filter_view` given a sequence, `s`.]] - [[`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`.]] -] - -[heading Example] - - using boost::mpl::_; - using boost::mpl::not_; - using boost::is_class; - - typedef __vector__ vector_type; - - vector_type v("a-string", '@', 987654, true, 6.6); - filter_view > > view(v); - std::cout << view << std::endl; - -[endsect] - -[section iterator_range] - -[heading Description] - -`iterator_range` presents a sub-range of its underlying sequence delimited -by a pair of iterators. - -[heading Header] - - #include - -[heading Synopsis] - - template - struct iterator_range; - -[heading Template parameters] - -[table - [[Parameter] [Description] [Default]] - [[`First`] [A fusion __iterator__] []] - [[`Last`] [A fusion __iterator__] []] -] - -[heading Model of] - -* __forward_sequence__, __bidirectional_sequence__ or -__random_access_sequence__ depending on the traversal characteristics (see -__traversal_concept__) of its underlying sequence. - -[variablelist Notation - [[`IR`] [An `iterator_range` type]] - [[`f`] [An instance of `First`]] - [[`l`] [An instance of `Last`]] - [[`ir`, `ir2`] [Instances of `iterator_range`]] -] - -[heading Expression Semantics] - -Semantics of an expression is defined only where it differs from, or is not -defined in __forward_sequence__. - -[table - [[Expression] [Semantics]] - [[`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 = ir2`] [Assigns to a `iterator_range`, `ir`, from another `iterator_range`, `ir2`.]] -] - -[heading Example] - - char const* s = "Ruby"; - typedef __vector__ vector_type; - vector_type vec(1, 'x', 3.3, s); - - typedef __result_of_begin__::type A; - typedef __result_of_end__::type B; - typedef __result_of_next__::type C; - typedef __result_of_prior__::type D; - - C c(vec); - D d(vec); - - iterator_range range(c, d); - std::cout << range << std::endl; - -[endsect] - -[section joint_view] - -[heading Description] - -`joint_view` presents a view which is a concatenation of two sequences. - -[heading Header] - - #include - -[heading Synopsis] - - template - struct joint_view; - -[heading Template parameters] - -[table - [[Parameter] [Description] [Default]] - [[`Sequence1`] [A __forward_sequence__] []] - [[`Sequence2`] [A __forward_sequence__] []] -] - -[heading Model of] - -* __forward_sequence__ - -[variablelist Notation - [[`JV`] [A `joint_view` type]] - [[`s1`] [An instance of `Sequence1`]] - [[`s2`] [An instance of `Sequence2`]] - [[`jv`, `jv2`] [Instances of `joint_view`]] -] - -[heading Expression Semantics] - -Semantics of an expression is defined only where it differs from, or is not -defined in __forward_sequence__. - -[table - [[Expression] [Semantics]] - [[`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 = jv2`] [Assigns to a `joint_view`, `jv`, from another `joint_view`, `jv2`.]] -] - -[heading Example] - - __vector__ v1(3, 'x'); - __vector__ v2("hello", 123); - joint_view< - __vector__ - , __vector__ - > view(v1, v2); - std::cout << view << std::endl; - -[endsect] - -[section zip_view] - -[heading 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 to the component __sequence__s. - -[heading Header] - - #include - -[heading Synopsis] - - template - struct zip_view; - -[heading Template parameters] - -[table - [[Parameter] [Description] [Default]] - [[`Sequences`] [A __forward_sequence__ of references to other Fusion __sequence__s] []] -] - -[heading Model of] - -* __forward_sequence__, __bidirectional_sequence__ or -__random_access_sequence__ depending on the traversal characteristics (see -__traversal_concept__) of its underlying sequence. - -[variablelist Notation - [[`ZV`] [A `joint_view` type]] - [[`s`] [An instance of `Sequences`]] - [[`zv1`, `zv2`] [Instances of `ZV`]] -] - -[heading Expression Semantics] - -Semantics of an expression is defined only where it differs from, or is not -defined in __forward_sequence__. - -[table - [[Expression] [Semantics]] - [[`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`.]] - [[`zv1 = zv2`] [Assigns to a `zip_view`, `zv`, from another `zip_view`, `zv2`.]] -] - -[heading Example] - typedef __vector__ vec1; - typedef __vector__ vec2; - vec1 v1(1,2); - vec2 v2('a','b'); - typedef __vector__ sequences; - std::cout << zip_view(sequences(v1, v2)) << std::endl; // ((1 a) (2 b)) - -[endsect] - -[section 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` presents a view of 2 underlying sequences, -given a binary function object or function pointer. The `transform_view` -inherits the traversal characteristics (see __traversal_concept__) of -its underlying sequence or sequences. - -[heading Header] - - #include - -[heading Synopsis] - -[*Unary Version] - - template - struct transform_view; - -[*Binary Version] - - template - struct transform_view; - -[heading Template parameters] - -[table - [[Parameter] [Description] [Default]] - [[`Sequence`] [A __forward_sequence__] []] - [[`Sequence1`] [A __forward_sequence__] []] - [[`Sequence2`] [A __forward_sequence__] []] - [[`F1`] [A unary function object or function pointer. `__boost_result_of_call__::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_call__::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.] []] -] - -[heading Model of] - -* __forward_sequence__, __bidirectional_sequence__ or -__random_access_sequence__ depending on the traversal characteristics (see -__traversal_concept__) of its underlying sequence. - -[variablelist Notation - [[`TV`] [A `transform_view` type]] - [[`BTV`] [A binary `transform_view` type]] - [[`UTV`] [A unary `transform_view` type]] - [[`f1`] [An instance of `F1`]] - [[`f2`] [An instance of `F2`]] - [[`s`] [An instance of `Sequence`]] - [[`s1`] [An instance of `Sequence1`]] - [[`s2`] [An instance of `Sequence2`]] - [[`tv`, `tv2`] [Instances of `transform_view`]] -] - -[heading 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 -__traversal_concept__) of its underlying sequence or sequences. - -[table - [[Expression] [Semantics]] - [[`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`.]] - [[`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`.]] -] - -[heading Example] - - struct square - { - template - struct result; - - template - struct result - : remove_reference - {}; - - template - T operator()(T x) const - { - return x * x; - } - }; - - typedef __vector__ vector_type; - vector_type vec(2, 5, 3.3); - - transform_view transform(vec, square()); - std::cout << transform << std::endl; - -[endsect] - -[section reverse_view] - -`reverse_view` presents a reversed view of underlying sequence. The first -element will be its last and the last element will be its first. - -[heading Header] - - #include - -[heading Synopsis] - - template - struct reverse_view; - -[heading Template parameters] - -[table - [[Parameter] [Description] [Default]] - [[`Sequence`] [A __bidirectional_sequence__] []] -] - -[heading Model of] - -* __bidirectional_sequence__ - -[variablelist Notation - [[`RV`] [A `reverse_view` type]] - [[`s`] [An instance of `Sequence`]] - [[`rv`, `rv2`] [Instances of `reverse_view`]] -] - -[heading Expression Semantics] - -Semantics of an expression is defined only where it differs from, or is not -defined in __bidirectional_sequence__. - -[table - [[Expression] [Semantics]] - [[`RV(s)`] [Creates a unary `reverse_view` given sequence, `s`.]] - [[`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`.]] -] - -[heading Example] - - typedef __vector__ vector_type; - vector_type vec(2, 5, 3.3); - - reverse_view reverse(vec); - std::cout << reverse << std::endl; - -[endsect] - -[endsect] - -[section Adapted] - -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. 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 -[footnote Fusion sequences may also be adapted as fully conforming __mpl__ -sequences (see __intrinsics__). That way, we can have 2-way adaptation to -and from __mpl__ and Fusion]. - -[heading Header] - - #include - -[section std::pair] - -This module provides adapters for `std::pair`. Including the module header -makes `std::pair` a fully conforming __random_access_sequence__. - -[heading Header] - - #include - -[heading Model of] - -* __random_access_sequence__ - -[heading Example] - - std::pair p(123, "Hola!!!"); - std::cout << __at_c__<0>(p) << std::endl; - std::cout << __at_c__<1>(p) << std::endl; - std::cout << p << std::endl; - -[heading See also] - -__std_pair_doc__, __tr1_tuple_pair__ - -[endsect] - -[section mpl sequence] - -This module provides adapters for __mpl__ sequences. Including the module -header makes all __mpl__ sequences fully conforming fusion sequences. - -[heading Header] - - #include - -[heading Model of] - -* __forward_sequence__ (If the __mpl__ sequence is a forward sequence.) -* __bidirectional_sequence__ (If the __mpl__ sequence is a bidirectional sequence.) -* __random_access_sequence__ (If the __mpl__ sequence is a random access sequence.) - -[heading Example] - - mpl::vector_c vec_c; - fusion::vector2 v(vec_c); - std::cout << __at_c__<0>(v) << std::endl; - std::cout << __at_c__<1>(v) << std::endl; - - v = mpl::vector_c(); - std::cout << __at_c__<0>(v) << std::endl; - std::cout << __at_c__<1>(v) << std::endl; - -[heading See also] - -__mpl__ - -[endsect] - -[section boost::array] - -This module provides adapters for `boost::array`. Including the module -header makes `boost::array` a fully conforming __random_access_sequence__. - -[heading Header] - - #include - -[heading Model of] - -* __random_access_sequence__ - -[heading Example] - - boost::array 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; - -[heading See also] - -__boost_array_library__ - -[endsect] - -[section boost::tuple] -This module provides adapters for `boost::tuple`. Including the module -header makes `boost::tuple` a fully conforming __forward_sequence__. - -[heading Header] - - #include - -[heading Model of] - -* __forward_sequence__ - -[heading Example] - - boost::tuple example_tuple(101, "hello"); - std::cout << *boost::fusion::begin(example_tuple) << '\n'; - std::cout << *boost::fusion::next(boost::fusion::begin(example_tuple)) << '\n'; - -[heading See also] - -__boost_tuple_library__ - -[endsect] - -[section boost::variant] -This module provides adapters for `boost::variant`. Including the module -header makes `boost::variant` a fully conforming __forward_sequence__. -The variant acts as a sequence of the types that can be contained in the variant. -Accessing types not currently stored int the variant will lead to the variant -being populated with a default constructed value of that type. - -[heading Header] - - #include - -[heading Model of] - -* __forward_sequence__ - -[heading Example] - - boost::variant example_variant = 101; - std::cout << example_variant << '\n'; - *boost::fusion::find(example_variant) = "hello"; - std::cout << example_variant << '\n'; - -[heading See also] - -__boost_variant_library__ - -[endsect] - -[endsect] - -[section Intrinsics] - -Intrinsics 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__[footnote In practice, many of intrinsic functions -have default implementations that will work in majority of cases]. - -[heading Header] - - #include - -[section Functions] - -[section begin] - -[heading Description] - -Returns an iterator pointing to the first element in the sequence. - -[heading Synopsis] - - template - typename __result_of_begin__::type - begin(Sequence& seq); - - template - typename __result_of_begin__::type - begin(Sequence const& seq); - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`seq`] [Model of __forward_sequence__] [The sequence we wish to get an iterator from.]] -] - -[heading 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_access_sequence__. - -[*Semantics]: Returns an iterator pointing to the first element in the sequence. - -[heading Header] - - #include - -[heading Example] - - __vector__ v(1, 2, 3); - assert(__deref__(begin(v)) == 1); - -[endsect] - -[section end] - -[heading Description] - -Returns an iterator pointing to one element past the end of the sequence. - -[heading Synopsis] - - template - typename __result_of_end__::type - end(Sequence& seq); - - template - typename __result_of_end__::type - end(Sequence const& seq); - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`seq`] [Model of __forward_sequence__] [The sequence we wish to get an iterator from.]] -] - -[heading 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_access_sequence__. - -[*Semantics]: Returns an iterator pointing to one element past the end of -the sequence. - -[heading Header] - - #include - -[heading Example] - - __vector__ v(1, 2, 3); - assert(__deref__(__prior__(end(v))) == 3); - -[endsect] - -[section empty] - -[heading Description] - -Returns a type convertible to `bool` that evaluates to `true` if the -sequence is empty, else, evaluates to `false`. - -[heading Synopsis] - - template - typename __result_of_empty__::type - empty(Sequence const& seq); - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`seq`] [Model of __forward_sequence__] [The sequence we wish to investigate.]] -] - -[heading Expression Semantics] - - empty(seq); - -[*Return type]: Convertible to `bool`. - -[*Semantics]: Evaluates to `true` if the sequence is empty, else, evaluates -to `false`. - -[heading Header] - - #include - -[heading Example] - - __vector__ v(1, 2, 3); - assert(empty(v) == false); - -[endsect] - -[section front] - -[heading Description] - -Returns the first element in the sequence. - -[heading Synopsis] - - template - typename __result_of_front__::type - front(Sequence& seq); - - template - typename __result_of_front__::type - front(Sequence const& seq); - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`seq`] [Model of __forward_sequence__] [The sequence we wish to investigate.]] -] - -[heading 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` 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` - -[*Semantics]: Returns the first element in the sequence. - -[heading Header] - - #include - -[heading Example] - - __vector__ v(1, 2, 3); - assert(front(v) == 1); - -[endsect] - -[section back] - -[heading Description] - -Returns the last element in the sequence. - -[heading Synopsis] - - template - typename __result_of_back__::type - back(Sequence& seq); - - template - typename __result_of_back__::type - back(Sequence const& seq); - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`seq`] [Model of __bidirectional_sequence__] [The sequence we wish to investigate.]] -] - -[heading 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` 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` - -[*Semantics]: Returns the last element in the sequence. - -[heading Header] - - #include - -[heading Example] - - __vector__ v(1, 2, 3); - assert(back(v) == 3); - -[endsect] - -[section size] - -[heading Description] - -Returns a type convertible to `int` that evaluates the number of elements -in the sequence. - -[heading Synopsis] - - template - typename __result_of_size__::type - size(Sequence const& seq); - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`seq`] [Model of __forward_sequence__] [The sequence we wish to investigate.]] -] - -[heading Expression Semantics] - - size(seq); - -[*Return type]: Convertible to `int`. - -[*Semantics]: Returns the number of elements in the sequence. - -[heading Header] - - #include - -[heading Example] - - __vector__ v(1, 2, 3); - assert(size(v) == 3); - -[endsect] - -[section at] - -[heading Description] - -Returns the N-th element from the beginning of the sequence. - -[heading Synopsis] - - template - typename __result_of_at__::type - at(Sequence& seq); - - template - typename __result_of_at__::type - at(Sequence const& seq); - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`seq`] [Model of __random_access_sequence__] [The sequence we wish to investigate.]] - [[`N`] [An __mpl_integral_constant__] [An index from the beginning of the - sequence.]] -] - -[heading Expression Semantics] - - at(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` 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)` - -[*Semantics]: Equivalent to - - __deref__(__advance__(__begin__(s))) - -[heading Header] - - #include - -[heading Example] - - __vector__ v(1, 2, 3); - assert(at >(v) == 2); - -[endsect] - -[section at_c] - -[heading Description] - -Returns the N-th element from the beginning of the sequence. - -[heading Synopsis] - - template - typename __result_of_at_c__::type - at_c(Sequence& seq); - - template - typename __result_of_at_c__::type - at_c(Sequence const& seq); - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`seq`] [Model of __random_access_sequence__] [The sequence we wish to investigate.]] - [[`N`] [An integral constant] [An index from the beginning of the - sequence.]] -] - -[heading Expression Semantics] - - at_c(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` 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 < __size__(s)` - -[*Semantics]: Equivalent to - - __deref__(__advance__(__begin__(s))) - -[heading Header] - - #include - -[heading Example] - - __vector__ v(1, 2, 3); - assert(at_c<1>(v) == 2); - -[endsect] - -[section has_key] - -[heading Description] - -Returns a type convertible to `bool` that evaluates to `true` if the -sequence contains an element associated with a Key, else, evaluates to -`false`. - -[heading Synopsis] - - template - typename __result_of_has_key__::type - has_key(Sequence const& seq); - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`seq`] [Model of __associative_sequence__] [The sequence we wish to investigate.]] - [[`Key`] [Any type] [The queried key.]] -] - -[heading Expression Semantics] - - has_key(seq); - -[*Return type]: Convertible to `bool`. - -[*Semantics]: Evaluates to `true` if the sequence contains an element -associated with Key, else, evaluates to `false`. - -[heading Header] - - #include - -[heading Example] - - __set__ s(1, 'x', true); - assert(has_key(s) == true); - -[endsect] - -[section at_key] - -[heading Description] - -Returns the element associated with a Key from the sequence. - -[heading Synopsis] - - template - typename __result_of_at_key__::type - at_key(Sequence& seq); - - template - typename __result_of_at_key__::type - at_key(Sequence const& seq); - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`seq`] [Model of __associative_sequence__] [The sequence we wish to investigate.]] - [[`Key`] [Any type] [The queried key.]] -] - -[heading Expression Semantics] - - at_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` is the -element associated with Key, is a valid expression. Else, returns a type -convertable to the element associated with Key. - -[*Precondition]: `has_key(seq) == true` - -[*Semantics]: Returns the element associated with Key. - -[heading Header] - - #include - -[heading Example] - - __set__ s(1, 'x', true); - assert(at_key(s) == 'x'); - -[endsect] - -[section swap] - -[heading Description] - -Performs an element by element swap of the elements in 2 sequences. - -[heading Synopsis] - template - void swap(Seq1& seq1, Seq2& seq2); - -[heading Parameters] - -[table - [[Parameters] [Requirement] [Description]] - [[`seq1`, `seq2`] [Models of __forward_sequence__][The sequences whos elements we wish to swap.]] -] - -[heading Expression Semantics] - - swap(seq1, seq2); - -[*Return type]: `void` - -[*Precondition]: `__size__(seq1) == __size__(seq2)` - -[*Semantics]: Calls `swap(a1, b1)` for corresponding elements in `seq1` and `seq2`. - -[heading Header] - #include - -[heading Example] - __vector__ v1(1, "hello"), v2(2, "world"); - swap(v1, v2); - assert(v1 == __make_vector__(2, "world")); - assert(v2 == __make_vector__(1, "hello")); - -[endsect] - -[endsect] - -[section Metafunctions] - -[section begin] - -[heading Description] -Returns the result type of __begin__. - -[heading Synopsis] - template - struct begin - { - typedef __unspecified__ type; - }; - -[table Parameters - [[Parameter] [Requirement] [Description]] - [[`Seq`][A model of __forward_sequence__][Argument sequence]] -] - -[heading Expression Semantics] - result_of::begin::type - -[*Return type]: An iterator modelling the same traversal concept as `Seq`. - -[*Semantics]: Returns the type of an iterator to the first element of `Seq`. - -[heading Header] - #include - -[heading Example] - typedef __vector__ vec; - typedef __result_of_begin__::type it; - BOOST_MPL_ASSERT((boost::is_same<__result_of_deref__::type, int&>)) - -[endsect] - -[section end] - -[heading Description] -Returns the result type of __end__. - -[heading Synopsis] - template - struct end - { - typedef __unspecified__ type; - }; - -[table Parameters - [[Parameter] [Requirement] [Description]] - [[`Seq`][A model of __forward_sequence__][Argument sequence]] -] - -[heading Expression Semantics] - result_of::end::type - -[*Return type]: A model of the same traversal concept as `Seq`. - -[*Semantics]: Returns the type of an iterator one past the end of `Seq`. - -[heading Header] - #include - -[heading Example] - typedef __vector__ vec; - typedef __result_of_prior__<__result_of_end__::type>::type first; - BOOST_MPL_ASSERT((__result_of_equal_to__::type>)) - -[endsect] - -[section empty] - -[heading Description] -Returns the result type of __empty__. - -[heading Synopsis] - template - struct empty - { - typedef __unspecified__ type; - }; - -[table Parameters - [[Parameter] [Requirement] [Description]] - [[`Seq`][A model of __forward_sequence__][Argument sequence]] -] - -[heading Expression Semantics] - result_of::empty::type - -[*Return type]: An __mpl_integral_constant__ - -[*Semantics]: Returns `mpl::true_` if `Seq` has zero elements, `mpl::false_` otherwise. - -[heading Header] - #include - -[heading Example] - typedef __vector__<> empty_vec; - typedef __vector__ vec; - - BOOST_MPL_ASSERT((__result_of_empty__)); - BOOST_MPL_ASSERT_NOT((__result_of_empty__)); - -[endsect] - -[section front] - -[heading Description] -Returns the result type of __front__. - -[heading Synopsis] - template - struct front - { - typedef __unspecified__ type; - }; - -[table Parameters - [[Parameter] [Requirement] [Description]] - [[`Seq`][A model of __forward_sequence__][Argument sequence]] -] - -[heading Expression Semantics] - result_of::front::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__::type>::type`. - -[heading Header] - #include - -[heading Example] - typedef __vector__ vec; - BOOST_MPL_ASSERT((boost::is_same<__result_of_front__::type, int&>)); - -[endsect] - -[section back] - -[heading Description] -Returns the result type of __back__. - -[heading Synopsis] - template - struct back - { - typedef __unspecified__ type; - }; - -[table Parameters - [[Parameter] [Requirement] [Description]] - [[`Seq`][A model of __forward_sequence__][Argument sequence]] -] - -[heading Expression Semantics] - result_of::back::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__::type>::type>::type`. - -[heading Header] - #include - -[heading Example] - typedef __vector__ vec; - BOOST_MPL_ASSERT((boost::is_same<__result_of_back__::type, char&>)); - -[endsect] - -[section size] - -[heading Description] -Returns the result type of __size__. - -[heading Synopsis] - template - struct size - { - typedef __unspecified__ type; - }; - -[table Parameters - [[Parameter] [Requirement] [Description]] - [[`Seq`][A model of __forward_sequence__][Argument sequence]] -] - -[heading Expression Semantics] - result_of::size::type - -[*Return type]: An __mpl_integral_constant__. - -[*Semantics]: Returns the number of elements in `Seq`. - -[heading Header] - #include - -[heading Example] - typedef __vector__ vec; - typedef __result_of_size__::type size_mpl_integral_constant; - BOOST_MPL_ASSERT_RELATION(size_mpl_integral_constant::value, ==, 3); - -[endsect] - -[section at] - -[heading Description] - -Returns the result type of __at__[footnote __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__]. - -[heading Synopsis] - template< - typename Seq, - typename N> - struct at - { - typedef __unspecified__ type; - }; - -[table Parameters - [[Parameter] [Requirement] [Description]] - [[`Seq`][A model of __forward_sequence__][Argument sequence]] - [[`N`][An __mpl_integral_constant__][Index of element]] -] - -[heading Expression Semantics] - result_of::at::type - -[*Return type]: Any type. - -[*Semantics]: Returns the result type of using __at__ to access the `N`th element of `Seq`. - -[heading Header] - #include - -[heading Example] - typedef __vector__ vec; - BOOST_MPL_ASSERT((boost::is_same<__result_of_at__ >::type, float&>)); - -[endsect] - -[section at_c] - -[heading Description] - -Returns the result type of __at_c__[footnote __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__]. - -[heading Synopsis] - template< - typename Seq, - int M> - struct at_c - { - typedef __unspecified__ type; - }; - -[table Parameters - [[Parameter] [Requirement] [Description]] - [[`Seq`][A model of __forward_sequence__][Argument sequence]] - [[`M`][Positive integer index][Index of element]] -] - -[heading Expression Semantics] - result_of::at_c::type - -[*Return type]: Any type - -[*Semantics]: Returns the result type of using __at_c__ to access the `M`th element of `Seq`. - -[heading Header] - #include - -[heading Example] - typedef __vector__ vec; - BOOST_MPL_ASSERT((boost::is_same<__result_of_at_c__::type, float&>)); - -[endsect] - -[section value_at] - -[heading Description] - -Returns the actual type at a given index from the __sequence__. - -[heading Synopsis] - template< - typename Seq, - typename N> - struct value_at - { - typedef __unspecified__ type; - }; - -[table Parameters - [[Parameter] [Requirement] [Description]] - [[`Seq`][A model of __forward_sequence__][Argument sequence]] - [[`N`][An __mpl_integral_constant__][Index of element]] -] - -[heading Expression Semantics] - result_of::value_at::type - -[*Return type]: Any type. - -[*Semantics]: Returns the actual type at the `N`th element of `Seq`. - -[heading Header] - #include - -[heading Example] - typedef __vector__ vec; - BOOST_MPL_ASSERT((boost::is_same<__result_of_value_at__ >::type, float>)); - -[endsect] - -[section value_at_c] - -[heading Description] - -Returns the actual type at a given index from the __sequence__. - -[heading Synopsis] - template< - typename Seq, - int M> - struct value_at_c - { - typedef __unspecified__ type; - }; - -[table Parameters - [[Parameter] [Requirement] [Description]] - [[`Seq`][A model of __forward_sequence__][Argument sequence]] - [[`M`][Positive integer index][Index of element]] -] - -[heading Expression Semantics] - result_of::value_at_c::type - -[*Return type]: Any type - -[*Semantics]: Returns the actual type at the `M`th element of `Seq`. - -[heading Header] - #include - -[heading Example] - typedef __vector__ vec; - BOOST_MPL_ASSERT((boost::is_same<__result_of_value_at_c__::type, float>)); - -[endsect] - -[section has_key] - -[heading Description] -Returns the result type of __has_key__. - -[heading Synopsis] - template< - typename Seq, - typename Key> - struct has_key - { - typedef __unspecified__ type; - }; - -[table Parameters - [[Parameter] [Requirement] [Description]] - [[`Seq`][A model of __forward_sequence__][Argument sequence]] - [[`Key`][Any type][Key type]] -] - -[heading Expression Semantics] - result_of::has_key::type - -[*Return type]: An __mpl_integral_constant__. - -[*Semantics]: Returns `mpl::true_` if `Seq` contains an element with key type `Key`, returns `mpl::false_` otherwise. - -[heading Header] - #include - -[heading Example] - typedef __map__<__pair__, __pair__, __pair__ > mymap; - BOOST_MPL_ASSERT((__result_of_has_key__)); - BOOST_MPL_ASSERT_NOT((__result_of_has_key__)); - -[endsect] - -[section at_key] - -[heading Description] - -Returns the result type of __at_key__[footnote __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__]. - -[heading Synopsis] - template< - typename Seq, - typename Key> - struct at_key - { - typedef __unspecified__ type; - }; - -[table Parameters - [[Parameter] [Requirement] [Description]] - [[`Seq`][A model of __forward_sequence__][Argument sequence]] - [[`Key`][Any type][Key type]] -] - -[heading Expression Semantics] - result_of::at_key::type - -[*Return type]: Any type. - -[*Semantics]: Returns the result of using __at_key__ to access the element with key type `Key` in `Seq`. - -[heading Header] - #include - -[heading Example] - typedef __map__<__pair__, __pair__, __pair__ > mymap; - BOOST_MPL_ASSERT((boost::is_same<__result_of_at_key__::type, char&>)); - -[endsect] - -[section value_at_key] - -[heading Description] -Returns the actual element type associated with a Key from the __sequence__. - -[heading Synopsis] - template< - typename Seq, - typename Key> - struct value_at_key - { - typedef __unspecified__ type; - }; - -[table Parameters - [[Parameter] [Requirement] [Description]] - [[`Seq`][A model of __forward_sequence__][Argument sequence]] - [[`Key`][Any type][Key type]] -] - -[heading Expression Semantics] - result_of::value_at_key::type - -[*Return type]: Any type. - -[*Semantics]: Returns the actual element type associated with key type -`Key` in `Seq`. - -[heading Header] - #include - -[heading Example] - typedef __map__<__pair__, __pair__, __pair__ > mymap; - BOOST_MPL_ASSERT((boost::is_same<__result_of_at_key__::type, char>)); - -[endsect] - -[section swap] - -[heading Description] -Returns the return type of swap. - -[heading Synopsis] - template - struct swap - { - typedef void type; - }; - -[table Parameters - [[Parameters] [Requirement] [Description]] - [[`Seq1`, `Seq2`][Models of __forward_sequence__][The sequences being swapped]] -] - -[heading Expression Semantics] - result_of::swap::type - -[*Return type]: `void`. - -[*Semantics]: Always returns `void`. - -[heading Header] - #include - -[endsect] - -[endsect] - -[endsect] - -[section Generation] - -These are the functions that you can use to generate various forms of -__containers__ from elemental values. - -[heading Header] - - #include - -[section Functions] - -[section make_list] - -[heading Description] - -Create a __list__ from one or more values. - -[heading Synopsis] - - template - typename __result_of_make_list__::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` -before including any Fusion header to change the default. Example: - - #define FUSION_MAX_LIST_SIZE 20 - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `make_list`]] -] - -[heading Expression Semantics] - - make_list(x0, x1,... xN); - -[*Return type]: __result_of_make_list__`::type` - -[*Semantics]: Create a __list__ from `x0, x1,... xN`. - -[heading Header] - - #include - -[heading Example] - - make_list(123, "hello", 12.5) - -[heading See also] - -__note_boost_ref__ - -[endsect] - -[section make_cons] - -[heading Description] - -Create a __cons__ from `car` (/head/) and optional `cdr` (/tail/). - -[heading Synopsis] - - template - typename __result_of_make_cons__::type - make_cons(Car const& car); - - template - typename __result_of_make_cons__::type - make_cons(Car const& car, Cdr const& cdr); - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`car`] [Instance of `Car`] [The list's head]] - [[`cdr`] [Instance of `Cdr`] [The list's tail (optional)]] -] - -[heading Expression Semantics] - - make_cons(car, cdr); - -[*Return type]: __result_of_make_cons__`::type` or -__result_of_make_cons__`::type` - -[*Semantics]: Create a __cons__ from `car` (/head/) and optional `cdr` (/tail/). - -[heading Header] - - #include - -[heading Example] - - make_cons('x', make_cons(123)) - -[heading See also] - -__note_boost_ref__ - -[endsect] - -[section make_vector] - -[heading Description] - -Create a __vector__ from one or more values. - -[heading Synopsis] - - template - typename __result_of_make_vector__::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` before including any Fusion header to change the -default. Example: - - #define FUSION_MAX_VECTOR_SIZE 20 - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `make_vector`]] -] - -[heading Expression Semantics] - - make_vector(x0, x1,... xN); - -[*Return type]: __result_of_make_vector__`::type` - -[*Semantics]: Create a __vector__ from `x0, x1,... xN`. - -[heading Header] - - #include - -[heading Example] - - make_vector(123, "hello", 12.5) - -[heading See also] - -__note_boost_ref__ - -[endsect] - -[section make_set] - -[heading Description] - -Create a __set__ from one or more values. - -[heading Synopsis] - - template - typename __result_of_make_set__::type - make_set(T0 const& x0, T1 const& x1... TN const& xN); - -The variadic function accepts `0` to `FUSION_MAX_VECTOR_SIZE`[footnote -`set` is implemented in terms of the vector. That is why we reuse -`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 - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `make_set`]] -] - -[heading Expression Semantics] - - make_set(x0, x1,... xN); - -[*Return type]: __result_of_make_set__`::type` - -[*Semantics]: Create a __set__ from `x0, x1,... xN`. - -[*Precondition]: There may be no duplicate key types. - -[heading Header] - - #include - -[heading Example] - - make_set(123, "hello", 12.5) - -[heading See also] - -__note_boost_ref__ - -[endsect] - -[section make_map] - -[heading Description] - -Create a __map__ from one or more key/data pairs. - -[heading Synopsis] - - template < - typename K0, typename K1,... typename KN - , typename T0, typename T1,... typename TN> - typename __result_of_make_map__::type - make_map(T0 const& x0, T1 const& x1... TN const& xN); - -The variadic function accepts `0` to `FUSION_MAX_VECTOR_SIZE`[footnote -`map` is implemented in terms of the vector. That is why we reuse -`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 - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`K0, K1,... KN`] [The key types] [Keys associated with `x0, x1,... xN`]] - [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `make_map`]] -] - -[heading Expression Semantics] - - make_map(x0, x1,... xN); - -[*Return type]: __result_of_make_map__`::type` - -[*Semantics]: Create a __map__ from `K0, K1,... KN` keys and -`x0, x1,... xN` data. - -[*Precondition]: There may be no duplicate key types. - -[heading Header] - - #include - -[heading Example] - - make_map( - __fusion_make_pair__('X') - , __fusion_make_pair__("Men")) - -[heading See also] - -__note_boost_ref__, __fusion_pair__ - -[endsect] - -[section 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); - -The __vector_tie__ function creates a __vector__ of type -`__vector__`. The same result could be achieved with the call -__make_vector__(__boost_ref_call__(i), __boost_ref_call__(c), __boost_ref_call__(a)) -[footnote see __boost_ref__ for details about `ref`]. - -A /tie/ can be used to 'unpack' another tuple into variables. E.g.: - - int i; char c; double d; - __vector_tie__(i, c, d) = __make_vector__(1,'a', 5.5); - std::cout << i << " " << c << " " << d; - -This code prints 1 a 5.5 to the standard output stream. A sequence -unpacking operation like this is found for example in ML and Python. It is -convenient when calling functions which return sequences. - -[heading Ignore] - -There is also an object called /ignore/ which allows you to ignore an -element assigned by a sequence. The idea is that a function may return a -sequence, only part of which you are interested in. For example: - - char c; - __vector_tie__(ignore, c) = __make_vector__(1, 'a'); - -[endsect] - -[section list_tie] - -[heading Description] - -Constructs a tie using a __list__ sequence. - -[heading Synopsis] - - template - __list__ - 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` -before including any Fusion header to change the default. Example: - - #define FUSION_MAX_LIST_SIZE 20 - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `list_tie`]] -] - -[heading Expression Semantics] - - list_tie(x0, x1,... xN); - -[*Return type]: __list__ - -[*Semantics]: Create a __list__ of references from `x0, x1,... xN`. - -[heading Header] - - #include - -[heading Example] - - int i = 123; - double d = 123.456; - list_tie(i, d) - -[endsect] - -[section vector_tie] - -[heading Description] - -Constructs a tie using a __vector__ sequence. - -[heading Synopsis] - - template - __vector__ - 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` before including any Fusion header to change the -default. Example: - - #define FUSION_MAX_VECTOR_SIZE 20 - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `vector_tie`]] -] - -[heading Expression Semantics] - - vector_tie(x0, x1,... xN); - -[*Return type]: __vector__ - -[*Semantics]: Create a __vector__ of references from `x0, x1,... xN`. - -[heading Header] - - #include - -[heading Example] - - int i = 123; - double d = 123.456; - vector_tie(i, d) - -[endsect] - -[section map_tie] - -[heading Description] - -Constructs a tie using a __map__ sequence. - -[heading Synopsis] - - template - __map__<__pair__, __pair__,... __pair__ > - 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` before -including any Fusion header to change the default. Example: - - #define FUSION_MAX_MAP_SIZE 20 - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`K0, K1,... KN`] [Any type][The key types associated with each of the `x1,x2,...,xN` values]] - [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `map_tie`]] -] - -[heading Expression Semantics] - - map_tie(x0, x1,... xN); - -[*Return type]: __map__<__pair__, __pair__,... __pair__ > - -[*Semantics]: Create a __map__ of references from `x0, x1,... xN` with keys `K0, K1,... KN` - -[heading Header] - - #include - -[heading Example] - - struct int_key; - struct double_key; - ... - int i = 123; - double d = 123.456; - map_tie(i, d) - -[endsect] - -[endsect] - -[section MetaFunctions] - -[section make_list] - -[heading Description] - -Returns the result type of __make_list__. - -[heading Synopsis] - - template - 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` -before including any Fusion header to change the default. Example: - - #define FUSION_MAX_LIST_SIZE 20 - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`T0, T1,... TN`] [Any type] [Template arguments to `make_list`]] -] - -[heading Expression Semantics] - - result_of::make_list::type - -[*Return type]: A __list__ with elements of types converted following the -rules for __element_conversion__. - -[*Semantics]: Create a __list__ from `T0, T1,... TN`. - -[heading Header] - - #include - -[heading Example] - - result_of::make_list::type - -[endsect] - -[section make_cons] - -[heading Description] - -Returns the result type of __make_cons__. - -[heading Synopsis] - - template - struct make_cons; - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`Car`] [Any type] [The list's head type]] - [[`Cdr`] [A `cons`] [The list's tail type (optional)]] -] - -[heading Expression Semantics] - - result_of::make_cons::type - -[*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` (/tail/). - -[heading Header] - - #include - -[heading Example] - - result_of::make_cons::type>::type - -[endsect] - -[section make_vector] - -[heading Description] - -Returns the result type of __make_vector__. - -[heading Synopsis] - - template - 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` before including any Fusion header to change the -default. Example: - - #define FUSION_MAX_VECTOR_SIZE 20 - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`T0, T1,... TN`] [Any type] [Template arguments to `make_vector`]] -] - -[heading Expression Semantics] - - result_of::make_vector::type - -[*Return type]: A __vector__ with elements of types converted following the -rules for __element_conversion__. - -[*Semantics]: Create a __vector__ from `T0, T1,... TN`. - -[heading Header] - - #include - -[heading Example] - - result_of::make_vector::type - -[endsect] - -[section make_set] - -[heading Description] - -Returns the result type of __make_set__. - -[heading Synopsis] - - template - struct make_set; - -The variadic function accepts `0` to `FUSION_MAX_VECTOR_SIZE`[footnote -`set` is implemented in terms of the vector. That is why we reuse -`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 - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`T0, T1,... TN`] [Any type] [The arguments to `make_set`]] -] - -[heading Expression Semantics] - - result_of::make_set::type - -[*Return type]: A __set__ with elements of types converted following the -rules for __element_conversion__. - -[*Semantics]: Create a __set__ from `T0, T1,... TN`. - -[*Precondition]: There may be no duplicate key types. - -[heading Header] - - #include - -[heading Example] - - result_of::make_set::type - -[endsect] - -[section make_map] - -[heading Description] - -Returns the result type of __make_map__. - -[heading Synopsis] - - template < - typename K0, typename K1,... typename KN - , typename T0, typename T1,... typename TN> - struct make_map; - -The variadic function accepts `0` to `FUSION_MAX_VECTOR_SIZE`[footnote -`map` is implemented in terms of the vector. That is why we reuse -`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 - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`K0, K1,... KN`] [Any type] [Keys associated with `T0, T1,... TN`]] - [[`T0, T1,... TN`] [Any type] [Data associated with keys `K0, K1,... KN`]] -] - -[heading Expression Semantics] - - resulf_of::make_map::type; - -[*Return type]: __result_of_make_map__`::type` - -[*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 key types. - -[heading Header] - - #include - -[heading Example] - - result_of::make_map::type - -[heading See also] - -__fusion_pair__ - -[endsect] - -[section list_tie] - -[heading Description] - -Returns the result type of __list_tie__. - -[heading Synopsis] - - template - 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` -before including any Fusion header to change the default. Example: - - #define FUSION_MAX_LIST_SIZE 20 - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`T0, T1,... TN`] [Any type] [The arguments to `list_tie`]] -] - -[heading Expression Semantics] - - result_of::list_tie::type; - -[*Return type]: __list__ - -[*Semantics]: Create a __list__ of references from `T0, T1,... TN`. - -[heading Header] - - #include - -[heading Example] - - result_of::list_tie::type - -[endsect] - -[section vector_tie] - -[heading Description] - -Returns the result type of __vector_tie__. - -[heading Synopsis] - - template - 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` before including any Fusion header to change the -default. Example: - - #define FUSION_MAX_VECTOR_SIZE 20 - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`T0, T1,... TN`] [Any type] [The arguments to `vector_tie`]] -] - -[heading Expression Semantics] - - result_of::vector_tie::type; - -[*Return type]: __vector__ - -[*Semantics]: Create a __vector__ of references from `T0, T1,... TN`. - -[heading Header] - - #include - -[heading Example] - - result_of::vector_tie::type - -[endsect] - -[section map_tie] - -[heading Description] - -Returns the result type of __map_tie__. - -[heading Synopsis] - - template - 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 including any Fusion header to change the -default. Example: - - #define FUSION_MAX_MAP_SIZE 20 - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`K0, K1,... KN`] [Any type] [The key types for `map_tie`]] - [[`D0, D1,... DN`] [Any type] [The arguments types for `map_tie`]] -] - -[heading Expression Semantics] - - result_of::map_tie::type; - -[*Return type]: __map__<__pair__, __pair__,... __pair__ > - -[*Semantics]: Create a __map__ of references from `D0, D1,... DN` with keys `K0, K1,... KN` - -[heading Header] - - #include - -[heading Example] - - struct int_key; - struct double_key; - ... - result_of::map_tie::type - -[endsect] - -[endsect] - -[endsect] - -[section Conversion] - -All fusion sequences can be converted to one of the __containers__ types -using one of these conversion functions. - -[heading Header] - - #include - -[section Functions] - -[section as_list] - -[heading Description] - -Convert a fusion sequence to a __list__. - -[heading Synopsis] - - template - typename result_of::as_list::type - as_list(Sequence& seq); - - template - typename result_of::as_list::type - as_list(Sequence const& seq); - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`seq`] [An instance of Sequence] [The sequence to convert.]] -] - -[heading Expression Semantics] - - as_list(seq); - -[*Return type]: __result_of_as_list__`::type` - -[*Semantics]: Convert a fusion sequence, `seq`, to a __list__. - -[heading Header] - - #include - -[heading Example] - - as_list(__make_vector__('x', 123, "hello")) - -[endsect] - -[section as_vector] - -[heading Description] - -Convert a fusion sequence to a __vector__. - -[heading Synopsis] - - template - typename result_of::as_vector::type - as_vector(Sequence& seq); - - template - typename result_of::as_vector::type - as_vector(Sequence const& seq); - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`seq`] [An instance of Sequence] [The sequence to convert.]] -] - -[heading Expression Semantics] - - as_vector(seq); - -[*Return type]: __result_of_as_vector__`::type` - -[*Semantics]: Convert a fusion sequence, `seq`, to a __vector__. - -[heading Header] - - #include - -[heading Example] - - as_vector(__make_list__('x', 123, "hello")) - -[endsect] - -[section as_set] - -[heading Description] - -Convert a fusion sequence to a __set__. - -[heading Synopsis] - - template - typename result_of::as_set::type - as_set(Sequence& seq); - - template - typename result_of::as_set::type - as_set(Sequence const& seq); - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`seq`] [An instance of Sequence] [The sequence to convert.]] -] - -[heading Expression Semantics] - - as_set(seq); - -[*Return type]: __result_of_as_set__`::type` - -[*Semantics]: Convert a fusion sequence, `seq`, to a __set__. - -[*Precondition]: There may be no duplicate key types. - -[heading Header] - - #include - -[heading Example] - - as_set(__make_vector__('x', 123, "hello")) - -[endsect] - -[section as_map] - -[heading Description] - -Convert a fusion sequence to a __map__. - -[heading Synopsis] - - template - typename result_of::as_map::type - as_map(Sequence& seq); - - template - typename result_of::as_map::type - as_map(Sequence const& seq); - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`seq`] [An instance of Sequence] [The sequence to convert.]] -] - -[heading Expression Semantics] - - as_map(seq); - -[*Return type]: __result_of_as_map__`::type` - -[*Semantics]: Convert a fusion sequence, `seq`, to a __map__. - -[*Precondition]: The elements of the sequence are assumed to be -__fusion_pair__s. There may be no duplicate __fusion_pair__ key types. - -[heading Header] - - #include - -[heading Example] - - as_map(__make_vector__( - __fusion_make_pair__('X') - , __fusion_make_pair__("Men"))) - -[endsect] - -[endsect] - -[section Metafunctions] - -[section as_list] - -[heading Description] - -Returns the result type of __as_list__. - -[heading Synopsis] - - template - struct as_list; - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`Sequence`] [A fusion __sequence__] [The sequence type to convert.]] -] - -[heading Expression Semantics] - - result_of::as_list::type; - -[*Return type]: A __list__ with same elements as the input sequence, -`Sequence`. - -[*Semantics]: Convert a fusion sequence, `Sequence`, to a __list__. - -[heading Header] - - #include - -[heading Example] - - result_of::as_list<__vector__ >::type - -[endsect] - -[section as_vector] - -[heading Description] - -Returns the result type of __as_vector__. - -[heading Synopsis] - - template - struct as_vector; - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`Sequence`] [A fusion __sequence__] [The sequence to convert.]] -] - -[heading Expression Semantics] - - result_of::as_vector::type; - -[*Return type]: A __vector__ with same elements as the input sequence, -`Sequence`. - -[*Semantics]: Convert a fusion sequence, `Sequence`, to a __vector__. - -[heading Header] - - #include - -[heading Example] - - result_of::as_vector<__list__ >::type - -[endsect] - -[section as_set] - -[heading Description] - -Returns the result type of __as_set__. - -[heading Synopsis] - - template - struct as_set; - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`Sequence`] [A fusion __sequence__] [The sequence to convert.]] -] - -[heading Expression Semantics] - - result_of::as_set::type; - -[*Return type]: A __set__ with same elements as the input sequence, -`Sequence`. - -[*Semantics]: Convert a fusion sequence, `Sequence`, to a __set__. - -[*Precondition]: There may be no duplicate key types. - -[heading Header] - - #include - -[heading Example] - - result_of::as_set<__vector__ >::type - -[endsect] - -[section as_map] - -[heading Description] - -Returns the result type of __as_map__. - -[heading Synopsis] - - template - struct as_map; - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`Sequence`] [A fusion __sequence__] [The sequence to convert.]] -] - -[heading Expression Semantics] - - result_of::as_map::type; - -[*Return type]: A __map__ with same elements as the input sequence, -`Sequence`. - -[*Semantics]: Convert a fusion sequence, `Sequence`, to a __map__. - -[*Precondition]: The elements of the sequence are assumed to be -__fusion_pair__s. There may be no duplicate __fusion_pair__ key types. - -[heading Header] - - #include - -[heading Example] - - result_of::as_map<__vector__< - __fusion_pair__ - , __fusion_pair__ > >::type - -[endsect] - -[endsect] - -[endsect] - -[section Operators] - -These operators, like the __algorithms__, work generically on all Fusion -sequences. All conforming Fusion sequences automatically get these -operators for free. - -[section 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 default delimiter between the elements is space, and the __sequence__ -is enclosed in parenthesis. For Example: - - __vector__ a(1.0f, 2, std::string("Howdy folks!"); - cout << a; - -outputs the __vector__ as: (1.0 2 Howdy folks!) - -The library defines three manipulators for changing the default behavior: - -[variablelist Manipulators - [[`tuple_open(arg)`] [Defines the character that is output before the first element.]] - [[`tuple_close(arg)`] [Defines the character that is output after the last element.]] - [[`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`, a C-string, or a wide C-string. - -Example: - - std::cout << tuple_open('[') << tuple_close(']') << tuple_delimiter(", ") << 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` stream contains the following data: - - (1 2 3) [4:5] - -The code: - - __vector__ i; - __vector__ 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`. - -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. - -[heading Header] - - #include - -[section in] - -[heading Description] - -Read a __sequence__ from an input stream. - -[heading Synopsis] - - template - IStream& - operator>>(IStream& is, Sequence& seq); - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[is] [An input stream.] [Stream to extract information from.]] - [[seq] [A __sequence__.] [The sequence to read.]] -] - -[heading Expression Semantics] - - is >> seq - -[*Return type]: IStream& - -[*Semantics]: For each element, `e`, in sequence, `seq`, call `is >> e`. - -[heading Header] - - #include - -[heading Example] - - __vector__ v; - std::cin >> v; - -[endsect] - -[section out] - -[heading Description] - -Write a __sequence__ to an output stream. - -[heading Synopsis] - - template - OStream& - operator<<(OStream& os, Sequence& seq); - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[os] [An output stream.] [Stream to write information to.]] - [[seq] [A __sequence__.] [The sequence to write.]] -] - -[heading Expression Semantics] - - os << seq - -[*Return type]: OStream& - -[*Semantics]: For each element, `e`, in sequence, `seq`, call `os << e`. - -[heading Header] - - #include - -[heading Example] - - std::cout << __make_vector__(123, "Hello", 'x') << std::endl; - -[endsect] - -[endsect] - -[section Comparison] - -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. - -[heading Header] - - #include - -[section equal] - -[heading Description] - -Compare two sequences for equality. - -[heading Synopsis] - - template - bool - operator==(Seq1 const& a, Seq2 const& b); - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`a, b`] [Instances of __sequence__] [__sequence__s to compare]] -] - -[heading Expression Semantics] - - a == b - -[*Return type]: `bool` - -[*Requirements]: - -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. - -An attempt to compare two Sequences of different lengths results in a -compile time error. - -[*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 __sequence__s, -e and f, e == f returns true. - -[heading Header] - - #include - -[heading Example] - - __vector__ v1(5, 'a'); - __vector__ v2(5, 'a'); - assert(v1 == v2); - -[endsect] - -[section not equal] - -Compare two sequences for inequality. - -[heading Synopsis] - - template - bool - operator!=(Seq1 const& a, Seq2 const& b); - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`a, b`] [Instances of __sequence__] [__sequence__s to compare]] -] - -[heading Expression Semantics] - - a != b - -[*Return type]: `bool` - -[*Requirements]: - -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. - -An attempt to compare two Sequences of different lengths results in a -compile time error. - -[*Semantics]: - -Returns !(a == b). - -[heading Header] - - #include - -[heading Example] - - __vector__ v3(5, 'b'); - __vector__ t4(2, 'a'); - assert(v1 != v3); - assert(v1 != t4); - assert(!(v1 != v2)); - -[endsect] - -[section less than] - -Lexicographically compare two sequences. - -[heading Synopsis] - - template - bool - operator<(Seq1 const& a, Seq2 const& b); - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`a, b`] [Instances of __sequence__] [__sequence__s to compare]] -] - -[heading Expression Semantics] - - a < b - -[*Return type]: `bool` - -[*Requirements]: - -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. - -An attempt to compare two Sequences of different lengths results in a -compile time error. - -[*Semantics]: Returns the lexicographical comparison of between `a` and `b`. - -[heading Header] - - #include - -[heading Example] - - __vector__ v1(4, 3.3f); - __vector__ v2(5, 3.3f); - __vector__ v3(5, 4.4); - assert(v1 < v2); - assert(v2 < v3); - -[endsect] - -[section less than equal] - -Lexicographically compare two sequences. - -[heading Synopsis] - - template - bool - operator<=(Seq1 const& a, Seq2 const& b); - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`a, b`] [Instances of __sequence__] [__sequence__s to compare]] -] - -[heading Expression Semantics] - - a <= b - -[*Return type]: `bool` - -[*Requirements]: - -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. - -An attempt to compare two Sequences of different lengths results in a -compile time error. - -[*Semantics]: Returns !(b < a). - -[heading Header] - - #include - -[heading Example] - - __vector__ v1(4, 3.3f); - __vector__ v2(5, 3.3f); - __vector__ v3(5, 4.4); - assert(v1 <= v2); - assert(v2 <= v3); - -[endsect] - -[section greater than] - -Lexicographically compare two sequences. - -[heading Synopsis] - - template - bool - operator>(Seq1 const& a, Seq2 const& b); - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`a, b`] [Instances of __sequence__] [__sequence__s to compare]] -] - -[heading Expression Semantics] - - a > b - -[*Return type]: `bool` - -[*Requirements]: - -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. - -An attempt to compare two Sequences of different lengths results in a -compile time error. - -[*Semantics]: Returns b < a. - -[heading Header] - - #include - -[heading Example] - - __vector__ v1(4, 3.3f); - __vector__ v2(5, 3.3f); - __vector__ v3(5, 4.4); - assert(v2 > v1); - assert(v3 > v2); - -[endsect] - -[section greater than equal] - -Lexicographically compare two sequences. - -[heading Synopsis] - - template - bool - operator>=(Seq1 const& a, Seq2 const& b); - -[heading Parameters] - -[table - [[Parameter] [Requirement] [Description]] - [[`a, b`] [Instances of __sequence__] [__sequence__s to compare]] -] - -[heading Expression Semantics] - - a >= b - -[*Return type]: `bool` - -[*Requirements]: - -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. - -An attempt to compare two Sequences of different lengths results in a -compile time error. - -[*Semantics]: Returns !(a < b). - -[heading Header] - - #include - -[heading Example] - - __vector__ v1(4, 3.3f); - __vector__ v2(5, 3.3f); - __vector__ v3(5, 4.4); - assert(v2 >= v1); - assert(v3 >= v2); - -[endsect] - -[endsect] - -[endsect] - -[endsect] - diff --git a/doc/support.qbk b/doc/support.qbk index 0efd05b2..4abfdbbb 100644 --- a/doc/support.qbk +++ b/doc/support.qbk @@ -40,6 +40,7 @@ specialized to accomodate clients which provide Fusion conforming sequences. [heading Header] #include + #include [heading Example] @@ -93,6 +94,7 @@ may be specialized to accomodate clients providing Fusion conforming views. [heading Header] #include + #include [heading Example] @@ -147,6 +149,7 @@ conforming sequences. [heading Header] #include + #include [heading Example] @@ -243,6 +246,7 @@ __sequence__ or __iterator__. [heading Header] #include + #include [heading Example] @@ -266,6 +270,7 @@ __note_boost_ref__). [heading Header] #include + #include [heading Synopsis] namespace traits @@ -309,6 +314,7 @@ constructor accepting the original type as its argument. [heading Header] #include + #include [heading Synopsis] namespace traits @@ -413,6 +419,7 @@ It is used as elements in __map__s, for example. [heading Header] #include + #include [heading Example] diff --git a/doc/tuples.qbk b/doc/tuple.qbk similarity index 98% rename from doc/tuples.qbk rename to doc/tuple.qbk index 038c8180..1631be25 100644 --- a/doc/tuples.qbk +++ b/doc/tuple.qbk @@ -1,7 +1,8 @@ -[section Tuples] +[section Tuple] + 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 +iteration of the C++ 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 @@ -22,8 +23,7 @@ in future releases of fusion. typename TN = __unspecified__> class tuple; -[heading Header] - #include +/tuple.hpp> [section Construction] @@ -119,7 +119,7 @@ The __tr1__tuple__ provides the `get` function to provide access to it's element template RJ get(T& t); -[*Requires]: `0 < I <= N`. The program is ill formed if `I` is out of bounds. +[*Requires]: `0 < I <= 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__::type`. @@ -129,7 +129,7 @@ The __tr1__tuple__ provides the `get` function to provide access to it's element template PJ get(T const& t); -[*Requires]: `0 < I <= N`. The program is ill formed if `I` is out of bounds. +[*Requires]: `0 < I <= 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__::type`. diff --git a/doc/view.qbk b/doc/view.qbk new file mode 100644 index 00000000..cab2cdd1 --- /dev/null +++ b/doc/view.qbk @@ -0,0 +1,469 @@ +[section View] + +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 are proxies. They provide an efficient yet purely +functional way to work on potentially expensive sequence operations. Views +are inherently lazy. Their elements are only computed on demand only when +the elements of the underlying sequence(s) are actually accessed. Views' +lazy nature make them very cheap to copy and be passed around by value. + +[heading Header] + + #include + #include + +[section single_view] + +`single_view` is a view into a value as a single element sequence. + +[heading Header] + + #include + #include + +[heading Synopsis] + + template + struct single_view; + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`T`] [Any type] []] +] + +[heading Model of] + +* __forward_sequence__ + +[variablelist Notation + [[`S`] [A `single_view` type]] + [[`s`, `s2`] [Instances of `single_view`]] + [[`x`] [An instance of `T`]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is not +defined in __forward_sequence__. + +[table + [[Expression] [Semantics]] + [[`S(x)`] [Creates a `single_view` from `x`.]] + [[`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`.]] +] + +[heading Example] + + single_view view(3); + std::cout << view << std::endl; + +[endsect] + +[section filter_view] + +[heading Description] + +`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_`. + +[heading Header] + + #include + #include + +[heading Synopsis] + + template + struct filter_view; + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`Sequence`] [A __forward_sequence__] []] + [[`Pred`] [Unary Metafunction + returning an `mpl::bool_`] []] +] + +[heading Model of] + +* __forward_sequence__ + +[variablelist Notation + [[`F`] [A `filter_view` type]] + [[`f`, `f2`] [Instances of `filter_view`]] + [[`s`] [A __forward_sequence__]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is not +defined in __forward_sequence__. + +[table + [[Expression] [Semantics]] + [[`F(s)`] [Creates a `filter_view` given a sequence, `s`.]] + [[`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`.]] +] + +[heading Example] + + using boost::mpl::_; + using boost::mpl::not_; + using boost::is_class; + + typedef __vector__ vector_type; + + vector_type v("a-string", '@', 987654, true, 6.6); + filter_view > > view(v); + std::cout << view << std::endl; + +[endsect] + +[section iterator_range] + +[heading Description] + +`iterator_range` presents a sub-range of its underlying sequence delimited +by a pair of iterators. + +[heading Header] + + #include + #include + +[heading Synopsis] + + template + struct iterator_range; + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`First`] [A fusion __iterator__] []] + [[`Last`] [A fusion __iterator__] []] +] + +[heading Model of] + +* __forward_sequence__, __bidirectional_sequence__ or +__random_access_sequence__ depending on the traversal characteristics (see +__traversal_concept__) of its underlying sequence. + +[variablelist Notation + [[`IR`] [An `iterator_range` type]] + [[`f`] [An instance of `First`]] + [[`l`] [An instance of `Last`]] + [[`ir`, `ir2`] [Instances of `iterator_range`]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is not +defined in __forward_sequence__. + +[table + [[Expression] [Semantics]] + [[`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 = ir2`] [Assigns to a `iterator_range`, `ir`, from another `iterator_range`, `ir2`.]] +] + +[heading Example] + + char const* s = "Ruby"; + typedef __vector__ vector_type; + vector_type vec(1, 'x', 3.3, s); + + typedef __result_of_begin__::type A; + typedef __result_of_end__::type B; + typedef __result_of_next__::type C; + typedef __result_of_prior__::type D; + + C c(vec); + D d(vec); + + iterator_range range(c, d); + std::cout << range << std::endl; + +[endsect] + +[section joint_view] + +[heading Description] + +`joint_view` presents a view which is a concatenation of two sequences. + +[heading Header] + + #include + #include + +[heading Synopsis] + + template + struct joint_view; + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`Sequence1`] [A __forward_sequence__] []] + [[`Sequence2`] [A __forward_sequence__] []] +] + +[heading Model of] + +* __forward_sequence__ + +[variablelist Notation + [[`JV`] [A `joint_view` type]] + [[`s1`] [An instance of `Sequence1`]] + [[`s2`] [An instance of `Sequence2`]] + [[`jv`, `jv2`] [Instances of `joint_view`]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is not +defined in __forward_sequence__. + +[table + [[Expression] [Semantics]] + [[`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 = jv2`] [Assigns to a `joint_view`, `jv`, from another `joint_view`, `jv2`.]] +] + +[heading Example] + + __vector__ v1(3, 'x'); + __vector__ v2("hello", 123); + joint_view< + __vector__ + , __vector__ + > view(v1, v2); + std::cout << view << std::endl; + +[endsect] + +[section zip_view] + +[heading 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 to the component __sequence__s. + +[heading Header] + + #include + #include + +[heading Synopsis] + + template + struct zip_view; + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`Sequences`] [A __forward_sequence__ of references to other Fusion __sequence__s] []] +] + +[heading Model of] + +* __forward_sequence__, __bidirectional_sequence__ or +__random_access_sequence__ depending on the traversal characteristics (see +__traversal_concept__) of its underlying sequence. + +[variablelist Notation + [[`ZV`] [A `joint_view` type]] + [[`s`] [An instance of `Sequences`]] + [[`zv1`, `zv2`] [Instances of `ZV`]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is not +defined in __forward_sequence__. + +[table + [[Expression] [Semantics]] + [[`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`.]] + [[`zv1 = zv2`] [Assigns to a `zip_view`, `zv`, from another `zip_view`, `zv2`.]] +] + +[heading Example] + typedef __vector__ vec1; + typedef __vector__ vec2; + vec1 v1(1,2); + vec2 v2('a','b'); + typedef __vector__ sequences; + std::cout << zip_view(sequences(v1, v2)) << std::endl; // ((1 a) (2 b)) + +[endsect] + +[section 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` presents a view of 2 underlying sequences, +given a binary function object or function pointer. The `transform_view` +inherits the traversal characteristics (see __traversal_concept__) of +its underlying sequence or sequences. + +[heading Header] + + #include + #include + +[heading Synopsis] + +[*Unary Version] + + template + struct transform_view; + +[*Binary Version] + + template + struct transform_view; + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`Sequence`] [A __forward_sequence__] []] + [[`Sequence1`] [A __forward_sequence__] []] + [[`Sequence2`] [A __forward_sequence__] []] + [[`F1`] [A unary function object or function pointer. `__boost_result_of_call__::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_call__::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.] []] +] + +[heading Model of] + +* __forward_sequence__, __bidirectional_sequence__ or +__random_access_sequence__ depending on the traversal characteristics (see +__traversal_concept__) of its underlying sequence. + +[variablelist Notation + [[`TV`] [A `transform_view` type]] + [[`BTV`] [A binary `transform_view` type]] + [[`UTV`] [A unary `transform_view` type]] + [[`f1`] [An instance of `F1`]] + [[`f2`] [An instance of `F2`]] + [[`s`] [An instance of `Sequence`]] + [[`s1`] [An instance of `Sequence1`]] + [[`s2`] [An instance of `Sequence2`]] + [[`tv`, `tv2`] [Instances of `transform_view`]] +] + +[heading 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 +__traversal_concept__) of its underlying sequence or sequences. + +[table + [[Expression] [Semantics]] + [[`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`.]] + [[`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`.]] +] + +[heading Example] + + struct square + { + template + struct result; + + template + struct result + : remove_reference + {}; + + template + T operator()(T x) const + { + return x * x; + } + }; + + typedef __vector__ vector_type; + vector_type vec(2, 5, 3.3); + + transform_view transform(vec, square()); + std::cout << transform << std::endl; + +[endsect] + +[section reverse_view] + +`reverse_view` presents a reversed view of underlying sequence. The first +element will be its last and the last element will be its first. + +[heading Header] + + #include + #include + +[heading Synopsis] + + template + struct reverse_view; + +[heading Template parameters] + +[table + [[Parameter] [Description] [Default]] + [[`Sequence`] [A __bidirectional_sequence__] []] +] + +[heading Model of] + +* __bidirectional_sequence__ + +[variablelist Notation + [[`RV`] [A `reverse_view` type]] + [[`s`] [An instance of `Sequence`]] + [[`rv`, `rv2`] [Instances of `reverse_view`]] +] + +[heading Expression Semantics] + +Semantics of an expression is defined only where it differs from, or is not +defined in __bidirectional_sequence__. + +[table + [[Expression] [Semantics]] + [[`RV(s)`] [Creates a unary `reverse_view` given sequence, `s`.]] + [[`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`.]] +] + +[heading Example] + + typedef __vector__ vector_type; + vector_type vec(2, 5, 3.3); + + reverse_view reverse(vec); + std::cout << reverse << std::endl; + +[endsect] + +[endsect] diff --git a/include/boost/fusion/container.hpp b/include/boost/fusion/container.hpp index e41c9cb3..1398197d 100644 --- a/include/boost/fusion/container.hpp +++ b/include/boost/fusion/container.hpp @@ -1,7 +1,7 @@ /*============================================================================= Copyright (c) 2001-2006 Joel de Guzman - Distributed under the Boost Software License, Version 1.0. (See accompanying + Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #if !defined(FUSION_SEQUENCE_CLASS_10022005_0614) @@ -12,5 +12,6 @@ #include #include #include +#include #endif diff --git a/include/boost/fusion/container/generation.hpp b/include/boost/fusion/container/generation.hpp new file mode 100644 index 00000000..7d92bb2f --- /dev/null +++ b/include/boost/fusion/container/generation.hpp @@ -0,0 +1,20 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_SEQUENCE_GENERATION_10022005_0615) +#define FUSION_SEQUENCE_GENERATION_10022005_0615 + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/include/boost/fusion/sequence/generation/cons_tie.hpp b/include/boost/fusion/container/generation/cons_tie.hpp similarity index 100% rename from include/boost/fusion/sequence/generation/cons_tie.hpp rename to include/boost/fusion/container/generation/cons_tie.hpp diff --git a/include/boost/fusion/sequence/generation/deque_tie.hpp b/include/boost/fusion/container/generation/deque_tie.hpp similarity index 96% rename from include/boost/fusion/sequence/generation/deque_tie.hpp rename to include/boost/fusion/container/generation/deque_tie.hpp index 4eeef1a2..bc5e52e2 100644 --- a/include/boost/fusion/sequence/generation/deque_tie.hpp +++ b/include/boost/fusion/container/generation/deque_tie.hpp @@ -33,7 +33,7 @@ namespace boost { namespace fusion #define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)& -#define BOOST_PP_FILENAME_1 +#define BOOST_PP_FILENAME_1 #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE) #include BOOST_PP_ITERATE() diff --git a/include/boost/fusion/sequence/generation/ignore.hpp b/include/boost/fusion/container/generation/ignore.hpp similarity index 100% rename from include/boost/fusion/sequence/generation/ignore.hpp rename to include/boost/fusion/container/generation/ignore.hpp diff --git a/include/boost/fusion/sequence/generation/list_tie.hpp b/include/boost/fusion/container/generation/list_tie.hpp similarity index 97% rename from include/boost/fusion/sequence/generation/list_tie.hpp rename to include/boost/fusion/container/generation/list_tie.hpp index b23cee93..a6c546a4 100644 --- a/include/boost/fusion/sequence/generation/list_tie.hpp +++ b/include/boost/fusion/container/generation/list_tie.hpp @@ -33,7 +33,7 @@ namespace boost { namespace fusion // $$$ shouldn't we remove_reference first to allow references? $$$ #define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)& -#define BOOST_PP_FILENAME_1 +#define BOOST_PP_FILENAME_1 #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_LIST_SIZE) #include BOOST_PP_ITERATE() diff --git a/include/boost/fusion/sequence/generation/make_cons.hpp b/include/boost/fusion/container/generation/make_cons.hpp similarity index 100% rename from include/boost/fusion/sequence/generation/make_cons.hpp rename to include/boost/fusion/container/generation/make_cons.hpp diff --git a/include/boost/fusion/sequence/generation/make_deque.hpp b/include/boost/fusion/container/generation/make_deque.hpp similarity index 97% rename from include/boost/fusion/sequence/generation/make_deque.hpp rename to include/boost/fusion/container/generation/make_deque.hpp index 6d6fc372..ee33b2fe 100644 --- a/include/boost/fusion/sequence/generation/make_deque.hpp +++ b/include/boost/fusion/container/generation/make_deque.hpp @@ -52,7 +52,7 @@ namespace boost { namespace fusion #define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \ typename detail::as_fusion_element::type -#define BOOST_PP_FILENAME_1 +#define BOOST_PP_FILENAME_1 #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE) #include BOOST_PP_ITERATE() diff --git a/include/boost/fusion/sequence/generation/make_list.hpp b/include/boost/fusion/container/generation/make_list.hpp similarity index 97% rename from include/boost/fusion/sequence/generation/make_list.hpp rename to include/boost/fusion/container/generation/make_list.hpp index c2c4d521..6e765f87 100644 --- a/include/boost/fusion/sequence/generation/make_list.hpp +++ b/include/boost/fusion/container/generation/make_list.hpp @@ -45,7 +45,7 @@ namespace boost { namespace fusion #define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \ typename detail::as_fusion_element::type -#define BOOST_PP_FILENAME_1 +#define BOOST_PP_FILENAME_1 #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_LIST_SIZE) #include BOOST_PP_ITERATE() diff --git a/include/boost/fusion/sequence/generation/make_map.hpp b/include/boost/fusion/container/generation/make_map.hpp similarity index 97% rename from include/boost/fusion/sequence/generation/make_map.hpp rename to include/boost/fusion/container/generation/make_map.hpp index 2ab3abb0..54a3ddb1 100644 --- a/include/boost/fusion/sequence/generation/make_map.hpp +++ b/include/boost/fusion/container/generation/make_map.hpp @@ -53,7 +53,7 @@ namespace boost { namespace fusion #define BOOST_FUSION_MAKE_PAIR(z, n, data) \ fusion::make_pair(BOOST_PP_CAT(_, n)) \ -#define BOOST_PP_FILENAME_1 +#define BOOST_PP_FILENAME_1 #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) #include BOOST_PP_ITERATE() diff --git a/include/boost/fusion/sequence/generation/make_set.hpp b/include/boost/fusion/container/generation/make_set.hpp similarity index 97% rename from include/boost/fusion/sequence/generation/make_set.hpp rename to include/boost/fusion/container/generation/make_set.hpp index 7dd9f3ab..ec12f833 100644 --- a/include/boost/fusion/sequence/generation/make_set.hpp +++ b/include/boost/fusion/container/generation/make_set.hpp @@ -46,7 +46,7 @@ namespace boost { namespace fusion #define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \ typename detail::as_fusion_element::type -#define BOOST_PP_FILENAME_1 +#define BOOST_PP_FILENAME_1 #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) #include BOOST_PP_ITERATE() diff --git a/include/boost/fusion/sequence/generation/make_vector.hpp b/include/boost/fusion/container/generation/make_vector.hpp similarity index 97% rename from include/boost/fusion/sequence/generation/make_vector.hpp rename to include/boost/fusion/container/generation/make_vector.hpp index d70b4b02..6bec6848 100644 --- a/include/boost/fusion/sequence/generation/make_vector.hpp +++ b/include/boost/fusion/container/generation/make_vector.hpp @@ -45,7 +45,7 @@ namespace boost { namespace fusion #define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \ typename detail::as_fusion_element::type -#define BOOST_PP_FILENAME_1 +#define BOOST_PP_FILENAME_1 #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) #include BOOST_PP_ITERATE() diff --git a/include/boost/fusion/sequence/generation/map_tie.hpp b/include/boost/fusion/container/generation/map_tie.hpp similarity index 96% rename from include/boost/fusion/sequence/generation/map_tie.hpp rename to include/boost/fusion/container/generation/map_tie.hpp index 1431accc..a3cf3f9a 100644 --- a/include/boost/fusion/sequence/generation/map_tie.hpp +++ b/include/boost/fusion/container/generation/map_tie.hpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include namespace boost { namespace fusion @@ -56,7 +56,7 @@ namespace boost { namespace fusion #define BOOST_FUSION_PAIR_TIE(z, n, data) \ fusion::pair_tie(BOOST_PP_CAT(_, n)) \ -#define BOOST_PP_FILENAME_1 +#define BOOST_PP_FILENAME_1 #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_MAP_SIZE) #include BOOST_PP_ITERATE() diff --git a/include/boost/fusion/sequence/generation/pair_tie.hpp b/include/boost/fusion/container/generation/pair_tie.hpp similarity index 100% rename from include/boost/fusion/sequence/generation/pair_tie.hpp rename to include/boost/fusion/container/generation/pair_tie.hpp diff --git a/include/boost/fusion/sequence/generation/vector_tie.hpp b/include/boost/fusion/container/generation/vector_tie.hpp similarity index 96% rename from include/boost/fusion/sequence/generation/vector_tie.hpp rename to include/boost/fusion/container/generation/vector_tie.hpp index f5fe8572..f5c1cfe6 100644 --- a/include/boost/fusion/sequence/generation/vector_tie.hpp +++ b/include/boost/fusion/container/generation/vector_tie.hpp @@ -32,7 +32,7 @@ namespace boost { namespace fusion #define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)& -#define BOOST_PP_FILENAME_1 +#define BOOST_PP_FILENAME_1 #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) #include BOOST_PP_ITERATE() diff --git a/include/boost/fusion/include/cons_tie.hpp b/include/boost/fusion/include/cons_tie.hpp index 0fa5a592..740e1739 100644 --- a/include/boost/fusion/include/cons_tie.hpp +++ b/include/boost/fusion/include/cons_tie.hpp @@ -7,6 +7,6 @@ #if !defined(FUSION_INCLUDE_CONS_TIE) #define FUSION_INCLUDE_CONS_TIE -#include +#include #endif diff --git a/include/boost/fusion/include/deque_tie.hpp b/include/boost/fusion/include/deque_tie.hpp index 20ab1958..8adbc4c0 100644 --- a/include/boost/fusion/include/deque_tie.hpp +++ b/include/boost/fusion/include/deque_tie.hpp @@ -7,7 +7,7 @@ #if !defined(FUSION_INCLUDE_GENERATION) #define FUSION_INCLUDE_GENERATION -#include +#include #include #endif diff --git a/include/boost/fusion/include/generation.hpp b/include/boost/fusion/include/generation.hpp index 20ab1958..8adbc4c0 100644 --- a/include/boost/fusion/include/generation.hpp +++ b/include/boost/fusion/include/generation.hpp @@ -7,7 +7,7 @@ #if !defined(FUSION_INCLUDE_GENERATION) #define FUSION_INCLUDE_GENERATION -#include +#include #include #endif diff --git a/include/boost/fusion/include/ignore.hpp b/include/boost/fusion/include/ignore.hpp index 20ab1958..8adbc4c0 100644 --- a/include/boost/fusion/include/ignore.hpp +++ b/include/boost/fusion/include/ignore.hpp @@ -7,7 +7,7 @@ #if !defined(FUSION_INCLUDE_GENERATION) #define FUSION_INCLUDE_GENERATION -#include +#include #include #endif diff --git a/include/boost/fusion/include/list_tie.hpp b/include/boost/fusion/include/list_tie.hpp index 20ab1958..8adbc4c0 100644 --- a/include/boost/fusion/include/list_tie.hpp +++ b/include/boost/fusion/include/list_tie.hpp @@ -7,7 +7,7 @@ #if !defined(FUSION_INCLUDE_GENERATION) #define FUSION_INCLUDE_GENERATION -#include +#include #include #endif diff --git a/include/boost/fusion/include/make_cons.hpp b/include/boost/fusion/include/make_cons.hpp index a0181953..76c4caa5 100644 --- a/include/boost/fusion/include/make_cons.hpp +++ b/include/boost/fusion/include/make_cons.hpp @@ -7,6 +7,6 @@ #if !defined(FUSION_INCLUDE_MAKE_CONS) #define FUSION_INCLUDE_MAKE_CONS -#include +#include #endif diff --git a/include/boost/fusion/include/make_deque.hpp b/include/boost/fusion/include/make_deque.hpp index 73ee13d5..35520e8d 100644 --- a/include/boost/fusion/include/make_deque.hpp +++ b/include/boost/fusion/include/make_deque.hpp @@ -7,6 +7,6 @@ #if !defined(FUSION_INCLUDE_MAKE_DEQUE) #define FUSION_INCLUDE_MAKE_DEQUE -#include +#include #endif diff --git a/include/boost/fusion/include/make_list.hpp b/include/boost/fusion/include/make_list.hpp index 2fb5d12e..7adb3507 100644 --- a/include/boost/fusion/include/make_list.hpp +++ b/include/boost/fusion/include/make_list.hpp @@ -7,6 +7,6 @@ #if !defined(FUSION_INCLUDE_MAKE_LIST) #define FUSION_INCLUDE_MAKE_LIST -#include +#include #endif diff --git a/include/boost/fusion/include/make_map.hpp b/include/boost/fusion/include/make_map.hpp index d5e05c94..90d59921 100644 --- a/include/boost/fusion/include/make_map.hpp +++ b/include/boost/fusion/include/make_map.hpp @@ -7,6 +7,6 @@ #if !defined(FUSION_INCLUDE_MAKE_MAP) #define FUSION_INCLUDE_MAKE_MAP -#include +#include #endif diff --git a/include/boost/fusion/include/make_set.hpp b/include/boost/fusion/include/make_set.hpp index a2470ade..19f344f6 100644 --- a/include/boost/fusion/include/make_set.hpp +++ b/include/boost/fusion/include/make_set.hpp @@ -7,6 +7,6 @@ #if !defined(FUSION_INCLUDE_MAKE_SET) #define FUSION_INCLUDE_MAKE_SET -#include +#include #endif diff --git a/include/boost/fusion/include/make_vector.hpp b/include/boost/fusion/include/make_vector.hpp index d2a90cb4..b165ba3e 100644 --- a/include/boost/fusion/include/make_vector.hpp +++ b/include/boost/fusion/include/make_vector.hpp @@ -7,6 +7,6 @@ #if !defined(FUSION_INCLUDE_MAKE_VECTOR) #define FUSION_INCLUDE_MAKE_VECTOR -#include +#include #endif diff --git a/include/boost/fusion/include/map_tie.hpp b/include/boost/fusion/include/map_tie.hpp index 87e4130f..89aeb716 100644 --- a/include/boost/fusion/include/map_tie.hpp +++ b/include/boost/fusion/include/map_tie.hpp @@ -7,6 +7,6 @@ #if !defined(FUSION_INCLUDE_MAP_TIE) #define FUSION_INCLUDE_MAP_TIE -#include +#include #endif diff --git a/include/boost/fusion/include/pair_tie.hpp b/include/boost/fusion/include/pair_tie.hpp index 5096ef4f..ac192cad 100644 --- a/include/boost/fusion/include/pair_tie.hpp +++ b/include/boost/fusion/include/pair_tie.hpp @@ -7,6 +7,6 @@ #if !defined(FUSION_INCLUDE_PAIR_TIE) #define FUSION_INCLUDE_PAIR_TIE -#include +#include #endif diff --git a/include/boost/fusion/include/vector_tie.hpp b/include/boost/fusion/include/vector_tie.hpp index 35f4abed..3a0431c1 100644 --- a/include/boost/fusion/include/vector_tie.hpp +++ b/include/boost/fusion/include/vector_tie.hpp @@ -7,6 +7,6 @@ #if !defined(FUSION_INCLUDE_VECTOR_TIE) #define FUSION_INCLUDE_VECTOR_TIE -#include +#include #endif diff --git a/include/boost/fusion/sequence.hpp b/include/boost/fusion/sequence.hpp index e60fdd7d..9c3ed873 100644 --- a/include/boost/fusion/sequence.hpp +++ b/include/boost/fusion/sequence.hpp @@ -9,7 +9,6 @@ #include #include -#include #include #include #include diff --git a/include/boost/fusion/sequence/generation.hpp b/include/boost/fusion/sequence/generation.hpp deleted file mode 100644 index 2afad632..00000000 --- a/include/boost/fusion/sequence/generation.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2006 Joel de Guzman - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -==============================================================================*/ -#if !defined(FUSION_SEQUENCE_GENERATION_10022005_0615) -#define FUSION_SEQUENCE_GENERATION_10022005_0615 - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif diff --git a/include/boost/fusion/tuple.hpp b/include/boost/fusion/tuple.hpp index c4b56b9e..affcecca 100644 --- a/include/boost/fusion/tuple.hpp +++ b/include/boost/fusion/tuple.hpp @@ -10,6 +10,6 @@ #include #include #include -#include +#include #endif diff --git a/include/boost/fusion/view/ext_/segmented_iterator.hpp b/include/boost/fusion/view/ext_/segmented_iterator.hpp index 2216929b..ad099bed 100755 --- a/include/boost/fusion/view/ext_/segmented_iterator.hpp +++ b/include/boost/fusion/view/ext_/segmented_iterator.hpp @@ -19,7 +19,7 @@ #include #include #include // for nil -#include +#include #include #include #include diff --git a/test/algorithm/clear.cpp b/test/algorithm/clear.cpp index 3ab42030..9122af2c 100644 --- a/test/algorithm/clear.cpp +++ b/test/algorithm/clear.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include diff --git a/test/algorithm/erase.cpp b/test/algorithm/erase.cpp index 44f641f3..310c7260 100644 --- a/test/algorithm/erase.cpp +++ b/test/algorithm/erase.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/algorithm/erase_key.cpp b/test/algorithm/erase_key.cpp index 2685bfd2..56c64780 100644 --- a/test/algorithm/erase_key.cpp +++ b/test/algorithm/erase_key.cpp @@ -6,14 +6,14 @@ ==============================================================================*/ #include #include -#include +#include #include -#include +#include #include #include #include #include -#include +#include #include #include #include diff --git a/test/algorithm/ext_/find_if_s.cpp b/test/algorithm/ext_/find_if_s.cpp index f3b06d2b..7f33ea45 100755 --- a/test/algorithm/ext_/find_if_s.cpp +++ b/test/algorithm/ext_/find_if_s.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/algorithm/ext_/for_each_s.cpp b/test/algorithm/ext_/for_each_s.cpp index bf4e2bbd..63ffed2c 100755 --- a/test/algorithm/ext_/for_each_s.cpp +++ b/test/algorithm/ext_/for_each_s.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include struct print diff --git a/test/algorithm/filter.cpp b/test/algorithm/filter.cpp index 4c21d03a..5bca82bf 100644 --- a/test/algorithm/filter.cpp +++ b/test/algorithm/filter.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/algorithm/filter_if.cpp b/test/algorithm/filter_if.cpp index e1bbb230..f5f1b190 100644 --- a/test/algorithm/filter_if.cpp +++ b/test/algorithm/filter_if.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/algorithm/fold.cpp b/test/algorithm/fold.cpp index 55641677..a890da67 100644 --- a/test/algorithm/fold.cpp +++ b/test/algorithm/fold.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/algorithm/insert.cpp b/test/algorithm/insert.cpp index acbcf9a3..a489d630 100644 --- a/test/algorithm/insert.cpp +++ b/test/algorithm/insert.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/algorithm/insert_range.cpp b/test/algorithm/insert_range.cpp index 4cd3ae41..f4dccb05 100644 --- a/test/algorithm/insert_range.cpp +++ b/test/algorithm/insert_range.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/algorithm/join.cpp b/test/algorithm/join.cpp index 04341160..186876fb 100644 --- a/test/algorithm/join.cpp +++ b/test/algorithm/join.cpp @@ -7,7 +7,7 @@ ==============================================================================*/ #include #include -#include +#include #include #include #include diff --git a/test/algorithm/pop_back.cpp b/test/algorithm/pop_back.cpp index 55d4b7fe..3bd98248 100644 --- a/test/algorithm/pop_back.cpp +++ b/test/algorithm/pop_back.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include diff --git a/test/algorithm/pop_front.cpp b/test/algorithm/pop_front.cpp index c4b797ab..1d187592 100644 --- a/test/algorithm/pop_front.cpp +++ b/test/algorithm/pop_front.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include diff --git a/test/algorithm/push_back.cpp b/test/algorithm/push_back.cpp index a15d4401..420ca3c4 100644 --- a/test/algorithm/push_back.cpp +++ b/test/algorithm/push_back.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/algorithm/push_front.cpp b/test/algorithm/push_front.cpp index 5c9e8fa8..380ddc0c 100644 --- a/test/algorithm/push_front.cpp +++ b/test/algorithm/push_front.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/algorithm/remove.cpp b/test/algorithm/remove.cpp index 95f351ef..479ed56a 100644 --- a/test/algorithm/remove.cpp +++ b/test/algorithm/remove.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/algorithm/remove_if.cpp b/test/algorithm/remove_if.cpp index 9cef9a3d..aa7250d3 100644 --- a/test/algorithm/remove_if.cpp +++ b/test/algorithm/remove_if.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/algorithm/replace.cpp b/test/algorithm/replace.cpp index acdb9761..11525220 100644 --- a/test/algorithm/replace.cpp +++ b/test/algorithm/replace.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include diff --git a/test/algorithm/replace_if.cpp b/test/algorithm/replace_if.cpp index b885976c..322c3028 100644 --- a/test/algorithm/replace_if.cpp +++ b/test/algorithm/replace_if.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include diff --git a/test/algorithm/reverse.cpp b/test/algorithm/reverse.cpp index 4cae9b33..3c06d21a 100644 --- a/test/algorithm/reverse.cpp +++ b/test/algorithm/reverse.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/algorithm/transform.cpp b/test/algorithm/transform.cpp index 1597dfd2..fac0c92a 100644 --- a/test/algorithm/transform.cpp +++ b/test/algorithm/transform.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/algorithm/zip.cpp b/test/algorithm/zip.cpp index e4f9bedb..df7eb599 100644 --- a/test/algorithm/zip.cpp +++ b/test/algorithm/zip.cpp @@ -7,7 +7,7 @@ ==============================================================================*/ #include #include -#include +#include #include #include #include diff --git a/test/functional/fused.cpp b/test/functional/fused.cpp index de974cf8..e2c89395 100644 --- a/test/functional/fused.cpp +++ b/test/functional/fused.cpp @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include diff --git a/test/functional/fused_function_object.cpp b/test/functional/fused_function_object.cpp index 45fab30f..c8d4c590 100644 --- a/test/functional/fused_function_object.cpp +++ b/test/functional/fused_function_object.cpp @@ -12,7 +12,7 @@ #include #include -#include +#include #include namespace fusion = boost::fusion; diff --git a/test/functional/fused_procedure.cpp b/test/functional/fused_procedure.cpp index 34ba09d0..57443c20 100644 --- a/test/functional/fused_procedure.cpp +++ b/test/functional/fused_procedure.cpp @@ -12,7 +12,7 @@ #include #include -#include +#include #include namespace fusion = boost::fusion; diff --git a/test/functional/make_fused.cpp b/test/functional/make_fused.cpp index ba5e604f..aab7928a 100644 --- a/test/functional/make_fused.cpp +++ b/test/functional/make_fused.cpp @@ -12,7 +12,7 @@ #include #include -#include +#include #include namespace fusion = boost::fusion; diff --git a/test/functional/make_fused_function_object.cpp b/test/functional/make_fused_function_object.cpp index f2463003..dec2411a 100644 --- a/test/functional/make_fused_function_object.cpp +++ b/test/functional/make_fused_function_object.cpp @@ -12,7 +12,7 @@ #include #include -#include +#include #include namespace fusion = boost::fusion; diff --git a/test/functional/make_fused_procedure.cpp b/test/functional/make_fused_procedure.cpp index 6a4cf572..754c17bc 100644 --- a/test/functional/make_fused_procedure.cpp +++ b/test/functional/make_fused_procedure.cpp @@ -12,7 +12,7 @@ #include #include -#include +#include #include namespace fusion = boost::fusion; diff --git a/test/sequence/adapt_assoc_struct.cpp b/test/sequence/adapt_assoc_struct.cpp index 277433b3..acab2b97 100644 --- a/test/sequence/adapt_assoc_struct.cpp +++ b/test/sequence/adapt_assoc_struct.cpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/sequence/adapt_struct.cpp b/test/sequence/adapt_struct.cpp index 0f47c648..c9c1d2db 100644 --- a/test/sequence/adapt_struct.cpp +++ b/test/sequence/adapt_struct.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/sequence/as_list.cpp b/test/sequence/as_list.cpp index 72dc9aa4..52846d9d 100644 --- a/test/sequence/as_list.cpp +++ b/test/sequence/as_list.cpp @@ -7,8 +7,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/test/sequence/as_map.cpp b/test/sequence/as_map.cpp index a9364bc6..32e3a420 100644 --- a/test/sequence/as_map.cpp +++ b/test/sequence/as_map.cpp @@ -7,8 +7,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/test/sequence/as_set.cpp b/test/sequence/as_set.cpp index 9bfd5869..12a3641c 100644 --- a/test/sequence/as_set.cpp +++ b/test/sequence/as_set.cpp @@ -7,8 +7,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/test/sequence/as_vector.cpp b/test/sequence/as_vector.cpp index d728c837..27905de5 100644 --- a/test/sequence/as_vector.cpp +++ b/test/sequence/as_vector.cpp @@ -7,8 +7,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/test/sequence/back_extended_deque.cpp b/test/sequence/back_extended_deque.cpp index a2daa4cf..689709f9 100644 --- a/test/sequence/back_extended_deque.cpp +++ b/test/sequence/back_extended_deque.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include diff --git a/test/sequence/boost_tuple.cpp b/test/sequence/boost_tuple.cpp index 1e3d23b4..07e39695 100644 --- a/test/sequence/boost_tuple.cpp +++ b/test/sequence/boost_tuple.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/sequence/cons.cpp b/test/sequence/cons.cpp index b27345e6..3bd6437f 100644 --- a/test/sequence/cons.cpp +++ b/test/sequence/cons.cpp @@ -8,10 +8,10 @@ #include #include #include -#include -#include +#include +#include #include -#include +#include #include #include #include diff --git a/test/sequence/deque_copy.cpp b/test/sequence/deque_copy.cpp index 57e7334d..f654277b 100644 --- a/test/sequence/deque_copy.cpp +++ b/test/sequence/deque_copy.cpp @@ -7,8 +7,8 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #include -#include -#include +#include +#include #define FUSION_SEQUENCE deque #include "copy.hpp" diff --git a/test/sequence/deque_make.cpp b/test/sequence/deque_make.cpp index 4dc7346b..e06dea27 100644 --- a/test/sequence/deque_make.cpp +++ b/test/sequence/deque_make.cpp @@ -7,7 +7,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #include -#include +#include #define FUSION_SEQUENCE deque #include "make.hpp" diff --git a/test/sequence/deque_tie.cpp b/test/sequence/deque_tie.cpp index e922335b..e1d855ae 100644 --- a/test/sequence/deque_tie.cpp +++ b/test/sequence/deque_tie.cpp @@ -7,9 +7,9 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #include -#include -#include -#include +#include +#include +#include #define FUSION_SEQUENCE deque #include "tie.hpp" diff --git a/test/sequence/ext_/iterator_range_s.cpp b/test/sequence/ext_/iterator_range_s.cpp index 1468f61b..1ed4243f 100755 --- a/test/sequence/ext_/iterator_range_s.cpp +++ b/test/sequence/ext_/iterator_range_s.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/sequence/filter_view.cpp b/test/sequence/filter_view.cpp index eaefb35e..1abaedff 100644 --- a/test/sequence/filter_view.cpp +++ b/test/sequence/filter_view.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/sequence/front_extended_deque.cpp b/test/sequence/front_extended_deque.cpp index 40100c32..fc049618 100644 --- a/test/sequence/front_extended_deque.cpp +++ b/test/sequence/front_extended_deque.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include diff --git a/test/sequence/io.cpp b/test/sequence/io.cpp index f7692163..d896b88f 100644 --- a/test/sequence/io.cpp +++ b/test/sequence/io.cpp @@ -6,7 +6,7 @@ ==============================================================================*/ #include #include -#include +#include #include #include #include diff --git a/test/sequence/iterator_range.cpp b/test/sequence/iterator_range.cpp index 29993d8e..af42cadd 100644 --- a/test/sequence/iterator_range.cpp +++ b/test/sequence/iterator_range.cpp @@ -6,7 +6,7 @@ ==============================================================================*/ #include #include -#include +#include #include #include #include diff --git a/test/sequence/joint_view.cpp b/test/sequence/joint_view.cpp index 7ce135e7..8dc4eb3c 100644 --- a/test/sequence/joint_view.cpp +++ b/test/sequence/joint_view.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include diff --git a/test/sequence/list_copy.cpp b/test/sequence/list_copy.cpp index 561ab10d..07078344 100644 --- a/test/sequence/list_copy.cpp +++ b/test/sequence/list_copy.cpp @@ -6,8 +6,8 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #include -#include -#include +#include +#include #define FUSION_SEQUENCE list #include "copy.hpp" diff --git a/test/sequence/list_make.cpp b/test/sequence/list_make.cpp index 7e7120fe..39d2a3c9 100644 --- a/test/sequence/list_make.cpp +++ b/test/sequence/list_make.cpp @@ -6,7 +6,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #include -#include +#include #define FUSION_SEQUENCE list #include "make.hpp" diff --git a/test/sequence/list_tie.cpp b/test/sequence/list_tie.cpp index 1a0e73b2..d96bbf4a 100644 --- a/test/sequence/list_tie.cpp +++ b/test/sequence/list_tie.cpp @@ -6,9 +6,9 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #include -#include -#include -#include +#include +#include +#include #define FUSION_SEQUENCE list #include "tie.hpp" diff --git a/test/sequence/make_list.cpp b/test/sequence/make_list.cpp index 7e7120fe..39d2a3c9 100644 --- a/test/sequence/make_list.cpp +++ b/test/sequence/make_list.cpp @@ -6,7 +6,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #include -#include +#include #define FUSION_SEQUENCE list #include "make.hpp" diff --git a/test/sequence/make_vector.cpp b/test/sequence/make_vector.cpp index 228fbb77..efd9f068 100644 --- a/test/sequence/make_vector.cpp +++ b/test/sequence/make_vector.cpp @@ -6,7 +6,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #include -#include +#include #define FUSION_SEQUENCE vector #include "make.hpp" diff --git a/test/sequence/map.cpp b/test/sequence/map.cpp index 689e086d..5f58b9dc 100644 --- a/test/sequence/map.cpp +++ b/test/sequence/map.cpp @@ -6,7 +6,7 @@ ==============================================================================*/ #include #include -#include +#include #include #include #include diff --git a/test/sequence/map_tie.cpp b/test/sequence/map_tie.cpp index aef31c51..1232812d 100644 --- a/test/sequence/map_tie.cpp +++ b/test/sequence/map_tie.cpp @@ -7,7 +7,7 @@ ==============================================================================*/ #include -#include +#include #include struct key_zero; diff --git a/test/sequence/reverse_view.cpp b/test/sequence/reverse_view.cpp index 03d0632f..3fb20e55 100644 --- a/test/sequence/reverse_view.cpp +++ b/test/sequence/reverse_view.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/sequence/set.cpp b/test/sequence/set.cpp index 0c376f3a..95c5b40d 100644 --- a/test/sequence/set.cpp +++ b/test/sequence/set.cpp @@ -6,7 +6,7 @@ ==============================================================================*/ #include #include -#include +#include #include #include #include diff --git a/test/sequence/std_pair.cpp b/test/sequence/std_pair.cpp index 127a1fbc..b5c18d17 100644 --- a/test/sequence/std_pair.cpp +++ b/test/sequence/std_pair.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/sequence/swap.cpp b/test/sequence/swap.cpp index e89542e0..7df7b822 100644 --- a/test/sequence/swap.cpp +++ b/test/sequence/swap.cpp @@ -7,7 +7,7 @@ ==============================================================================*/ #include #include -#include +#include #include #include diff --git a/test/sequence/transform_view.cpp b/test/sequence/transform_view.cpp index e811f5f7..b1a48073 100644 --- a/test/sequence/transform_view.cpp +++ b/test/sequence/transform_view.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/sequence/vector_copy.cpp b/test/sequence/vector_copy.cpp index 9b1e207d..a4c8a3af 100644 --- a/test/sequence/vector_copy.cpp +++ b/test/sequence/vector_copy.cpp @@ -6,8 +6,8 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #include -#include -#include +#include +#include #define FUSION_SEQUENCE vector #include "copy.hpp" diff --git a/test/sequence/vector_make.cpp b/test/sequence/vector_make.cpp index 228fbb77..efd9f068 100644 --- a/test/sequence/vector_make.cpp +++ b/test/sequence/vector_make.cpp @@ -6,7 +6,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #include -#include +#include #define FUSION_SEQUENCE vector #include "make.hpp" diff --git a/test/sequence/vector_tie.cpp b/test/sequence/vector_tie.cpp index 08a82e3d..43895000 100644 --- a/test/sequence/vector_tie.cpp +++ b/test/sequence/vector_tie.cpp @@ -6,9 +6,9 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #include -#include -#include -#include +#include +#include +#include #define FUSION_SEQUENCE vector #include "tie.hpp" diff --git a/test/sequence/zip_view.cpp b/test/sequence/zip_view.cpp index 0fcb438d..7f88f52a 100644 --- a/test/sequence/zip_view.cpp +++ b/test/sequence/zip_view.cpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/sequence/zip_view2.cpp b/test/sequence/zip_view2.cpp index 611c41cb..8a07aa88 100644 --- a/test/sequence/zip_view2.cpp +++ b/test/sequence/zip_view2.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/todo.txt b/todo.txt index c1e0df08..55102184 100644 --- a/todo.txt +++ b/todo.txt @@ -1,7 +1,11 @@ +* Improve extension docs + +* Document sequence/convert + * Consider object equivalent of functions and algorithms (so you can do transform(iterators, deref()) with needing to put together a wrapper for deref). -* Make algorithms work with mutable data +* Make algorithms work with mutable data * Consider segmented sequence / algorithm support @@ -81,17 +85,17 @@ tosh: * Provide infinity-aware default implementation for Incrementable Sequences Thoughts: It would probably be cleaner to have infinity conceptually - orthogonal so there can be infinite Bidi/RA/Assoc Sequences. + orthogonal so there can be infinite Bidi/RA/Assoc Sequences. OTOH it complicates things in way that might not be worth it... -* Implement always_view/always with repetitive_view > +* Implement always_view/always with repetitive_view > semantics - using repetitive_view will for this purpose will be way too much overhead. ? Functional wrappers for intrinsics/algorithms. * Rewrite functional benchmark - + ========================================================== From the fusion review (please mark all done items):