diff --git a/doc/algorithms.qbk b/doc/algorithms.qbk index 1e2f4ef8..08e7d023 100644 --- a/doc/algorithms.qbk +++ b/doc/algorithms.qbk @@ -54,9 +54,6 @@ types. [[`t1 ...tN`][Objects with types `T1 ...TN`]] ] -[heading Refinement of] -__mpl_metafunction_class__ - [heading Expression requirements] [table @@ -515,14 +512,14 @@ Finds the first element of a given type within a sequence. [heading Synopsis] template< - typename Sequence, - typename T + typename T, + typename Sequence > __unspecified__ find(Sequence const& seq); template< - typename Sequence, - typename T + typename T, + typename Sequence > __unspecified__ find(Sequence& seq); @@ -561,14 +558,14 @@ Finds the first element within a sequence with a type for which a given __mpl_la [heading Synopsis] template< - typename Sequence, - typename F + typename F, + typename Sequence > __unspecified__ find_if(Sequence const& seq); template< - typename Sequence, - typename F + typename F, + typename Sequence > __unspecified__ find_if(Sequence& seq); diff --git a/doc/html/fusion/acknowledgements.html b/doc/html/fusion/acknowledgements.html index 16c64ee6..04b602c0 100644 --- a/doc/html/fusion/acknowledgements.html +++ b/doc/html/fusion/acknowledgements.html @@ -3,7 +3,7 @@
@@ -61,39 +61,39 @@
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 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
+ 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
+ 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.
diff --git a/doc/html/fusion/algorithms/concepts.html b/doc/html/fusion/algorithms/concepts.html index 99daa138..492017fe 100644 --- a/doc/html/fusion/algorithms/concepts.html +++ b/doc/html/fusion/algorithms/concepts.html @@ -3,7 +3,7 @@Concepts - + diff --git a/doc/html/fusion/algorithms/concepts/poly.html b/doc/html/fusion/algorithms/concepts/poly.html index ccd7313a..cdfddca7 100644 --- a/doc/html/fusion/algorithms/concepts/poly.html +++ b/doc/html/fusion/algorithms/concepts/poly.html @@ -4,7 +4,7 @@Polymorphic Function Object - + @@ -29,47 +29,39 @@ Object"> Polymorphic Function Object- + Description
- A type of function object with a nested metafunction
result
. -result
returns the result + 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
- F
- A Polymorphic Function Object type
-- +
f
- f
- A Polymorphic Function Object
-- +
T1 - ...TN
- T1 + ...TN
- Arbitrary types
-- +
t1 - ...tN
- t1 + ...tN
- - Objects with types
T1 ...TN
+ Objects with types T1 ...TN- - Refinement - of -
-- MPL Metafunction Class -
- + Expression requirements
@@ -86,8 +78,8 @@ Complexity- diff --git a/doc/html/fusion/algorithms/iteration.html b/doc/html/fusion/algorithms/iteration.html index ada3a8bf..21d00c0c 100644 --- a/doc/html/fusion/algorithms/iteration.html +++ b/doc/html/fusion/algorithms/iteration.html @@ -3,7 +3,7 @@- f(t1, ...tN)
+ F::result<T1, ...TN>::type
f(t1, ...tN) +F::result<T1, ...TN>::type Unspecified Iteration - +- + Header
diff --git a/doc/html/fusion/algorithms/iteration/functions.html b/doc/html/fusion/algorithms/iteration/functions.html index 2bd75e70..5c3db0bd 100644 --- a/doc/html/fusion/algorithms/iteration/functions.html +++ b/doc/html/fusion/algorithms/iteration/functions.html @@ -3,7 +3,7 @@Functions - + diff --git a/doc/html/fusion/algorithms/iteration/functions/accumulate.html b/doc/html/fusion/algorithms/iteration/functions/accumulate.html index ac01f7bf..fa695d10 100644 --- a/doc/html/fusion/algorithms/iteration/functions/accumulate.html +++ b/doc/html/fusion/algorithms/iteration/functions/accumulate.html @@ -3,7 +3,7 @@accumulate - + @@ -26,18 +26,18 @@- + Description
Repeatedly applies binary Polymorphic - Function Object
f
- to each element of a sequence and the previous state.accumulate
is equivalent to -fold
. + Function Object f + to each element of a sequence and the previous state. accumulate is equivalent to + fold.- + Synopsis
@@ -46,11 +46,11 @@ typename State, typename F > -typenameresult_of::accumulate
<Sequence, State, F>::type accumulate( +typename result_of::accumulate<Sequence, State, F>::type accumulate( Sequence& seq, State const& initial_state, F const& f);-Table 1.33. Parameters
+Table 1.33. Parameters
@@ -64,24 +64,24 @@ - + seq
seq A model of Forward - Sequence, f(eN ....f(e2,f(e1,initial_state)))
must be a valid expression for - each elemente1
to -eN
inseq
+ Sequence, f(eN ....f(e2,f(e1,initial_state))) must be a valid expression for + each element e1 to + eN in seqOperation's argument - + initial_state
initial_state Any type Initial state - + f
f A model of binary Polymorphic @@ -93,7 +93,7 @@ - + Expression Semantics
@@ -101,28 +101,28 @@ accumulate(seq, initial_state, f);- Return type: Any type + Return type: Any type
- Semantics: Equivalent to
f(eN ....f(e2,f(e1,initial_state)))
- wheree1 ...eN
are the elements ofseq
. + Semantics: Equivalent to f(eN ....f(e2,f(e1,initial_state))) + where e1 ...eN are the elements of seq.- + Complexity
- Linear, exactly
applications of
result_of::size
<Sequence>::valuef
. + Linear, exactly result_of::size<Sequence>::value applications of f.- + Header
#include <boost/fusion/algorithm/iteration/accumulate.hpp>- + Example
@@ -141,8 +141,8 @@ } }; ... -constvector
<int,int> vec(1,2); -assert(accumulate
(vec,std::string(""), make_string()) == "12"); +const vector<int,int> vec(1,2); +assert(accumulate(vec,std::string(""), make_string()) == "12");
seq |
+seq | A
model of Forward
- Sequence,f(e) must be a valid expression for each
- element e in seq
+ Sequence,f(e) must be a valid expression for each
+ element e in seq
|
Operation's argument |
initial_state |
+initial_state | Any type | Initial state |
f |
+f | A model of binary Polymorphic @@ -91,7 +91,7 @@ |
- Return type: Any type + Return type: Any type
- Semantics: Equivalent to f(eN ....f(e2,f(e1,initial_state)))
- where e1 ...eN
are the elements of seq
.
+ Semantics: Equivalent to f(eN ....f(e2,f(e1,initial_state)))
+ where e1 ...eN are the elements of seq.
- Linear, exactly
applications of result_of::size
<Sequence>::valuef
.
+ Linear, exactly result_of::size<Sequence>::value applications of f.
#include <boost/fusion/algorithm/iteration/fold.hpp>
@@ -139,8 +139,8 @@ } }; ... -constvector
<int,int> vec(1,2); -assert(fold
(vec,std::string(""), make_string()) == "12"); +const vector<int,int> vec(1,2); +assert(fold(vec,std::string(""), make_string()) == "12");
seq |
+seq | A
model of Forward
- Sequence, f(e) must be a valid expression for each
- element e in seq
+ Sequence, f(e) must be a valid expression for each
+ element e in seq
|
Operation's argument |
f |
+f | A unary function object | Operation's argument | @@ -78,36 +78,36 @@
-for_each
(seq, f);
+for_each(seq, f);
- Return type: void
+ Return type: void
- Semantics: Calls f(e)
for each element e
- in seq
.
+ Semantics: Calls f(e) for each element e
+ in seq.
- Linear, exactly
applications of result_of::size
<Sequence>::valuef
.
+ Linear, exactly result_of::size<Sequence>::value applications of f.
#include <boost/fusion/algorithm/iteration/for_each.hpp>
@@ -120,9 +120,9 @@ } }; ... -vector
<int,int> vec(1,2); -for_each
(vec, increment()); -assert(vec ==make_vector
(2,3)); +vector<int,int> vec(1,2); +for_each(vec, increment()); +assert(vec == make_vector(2,3));
Sequence |
+Sequence | A model of Forward @@ -70,15 +70,15 @@ | The sequence to iterate |
State |
+State | Any type | The initial state for the first application of
- F
+ F
|
F |
+F | A model of binary Polymorphic @@ -91,34 +91,34 @@ |
-result_of::accumulate
<Sequence, State, F>::type
+result_of::accumulate<Sequence, State, F>::type
- Return type: Any type + Return type: Any type
- Semantics: Returns the result of applying
- accumulate
to a sequence
- of type Sequence
, with
- an initial state of type State
+ Semantics: Returns the result of applying
+ accumulate to a sequence
+ of type Sequence, with
+ an initial state of type State
and binary Polymorphic
- Function Object of type F
.
+ Function Object of type F.
- Linear, exactly
applications of result_of::size
<Sequence>::valueF
.
+ Linear, exactly result_of::size<Sequence>::value applications of F.
diff --git a/doc/html/fusion/algorithms/iteration/metafunctions/fold.html b/doc/html/fusion/algorithms/iteration/metafunctions/fold.html index 7fc8eb99..ee735622 100644 --- a/doc/html/fusion/algorithms/iteration/metafunctions/fold.html +++ b/doc/html/fusion/algorithms/iteration/metafunctions/fold.html @@ -3,7 +3,7 @@fold - + @@ -26,14 +26,14 @@- + Description
- Returns the result type of
fold
. + Returns the result type of fold.- + Synopsis
@@ -47,7 +47,7 @@ };
-Table 1.35. Parameters
+Table 1.35. Parameters
@@ -61,7 +61,7 @@ - + Sequence
Sequence A model of Forward @@ -70,15 +70,15 @@ The sequence to iterate - + State
State Any type The initial state for the first application of - F
+ F- + F
F A model of binary Polymorphic @@ -91,34 +91,34 @@ - + Expression Semantics
-result_of::fold
<Sequence, State, F>::type +result_of::fold<Sequence, State, F>::type- Return type: Any type + Return type: Any type
- Semantics: Returns the result of applying -
fold
to a sequence of - typeSequence
, with an - initial state of typeState
+ Semantics: Returns the result of applying + fold to a sequence of + type Sequence, with an + initial state of type State and binary Polymorphic - Function Object of typeF
. + Function Object of type F.- + Complexity
- Linear, exactly
applications of
result_of::size
<Sequence>::valueF
. + Linear, exactly result_of::size<Sequence>::value applications of F.- + Header
diff --git a/doc/html/fusion/algorithms/iteration/metafunctions/for_each.html b/doc/html/fusion/algorithms/iteration/metafunctions/for_each.html index 6c18dfa8..6f865f32 100644 --- a/doc/html/fusion/algorithms/iteration/metafunctions/for_each.html +++ b/doc/html/fusion/algorithms/iteration/metafunctions/for_each.html @@ -3,7 +3,7 @@for_each - + @@ -26,15 +26,15 @@- A metafunction returning the result type of applying
for_each
to a sequence. The - return type offor_each
is alwaysvoid
. + A metafunction returning the result type of applying for_each to a sequence. The + return type of for_each is always void.- + Description
- + Synopsis
@@ -48,7 +48,7 @@ };
-Table 1.37. Parameters
+Table 1.37. Parameters
@@ -62,7 +62,7 @@ - + Sequence
Sequence A model of Forward @@ -71,7 +71,7 @@ Operation's argument - + F
F Any type Operation's argument @@ -80,32 +80,32 @@- + Expression Semantics
-result_of::for_each
<Sequence, F>::type +result_of::for_each<Sequence, F>::type- Return type:
void
. + Return type: void.- Semantics: Returns the return type of -
for_each
for a sequence of type -Sequence
and a unary - function objectF
. The - return type is alwaysvoid
. + Semantics: Returns the return type of + for_each for a sequence of type + Sequence and a unary + function object F. The + return type is always void.- + Complexity
Constant.
- + Header
diff --git a/doc/html/fusion/algorithms/query.html b/doc/html/fusion/algorithms/query.html index 1f0f9e0a..9b5c8953 100644 --- a/doc/html/fusion/algorithms/query.html +++ b/doc/html/fusion/algorithms/query.html @@ -3,7 +3,7 @@Query - + @@ -33,7 +33,7 @@ The query algorithms provide support for searching and analyzing sequences.- + Header
diff --git a/doc/html/fusion/algorithms/query/functions.html b/doc/html/fusion/algorithms/query/functions.html index 51a98f99..112f1f24 100644 --- a/doc/html/fusion/algorithms/query/functions.html +++ b/doc/html/fusion/algorithms/query/functions.html @@ -3,7 +3,7 @@Functions - + diff --git a/doc/html/fusion/algorithms/query/functions/all.html b/doc/html/fusion/algorithms/query/functions/all.html index 0b6790f5..923fa47a 100644 --- a/doc/html/fusion/algorithms/query/functions/all.html +++ b/doc/html/fusion/algorithms/query/functions/all.html @@ -3,7 +3,7 @@all - + @@ -26,18 +26,18 @@- + Description
- For a sequence
seq
and - unary function objectf
, -all
returns true if -f
returns true for every - element ofseq
. + For a sequence seq and + unary function object f, + all returns true if + f returns true for every + element of seq.- + Synopsis
@@ -45,11 +45,11 @@ typename Sequence, typename F > -typenameresult_of::all
<Sequence,F>::type all( +typename result_of::all<Sequence,F>::type all( Sequence const& seq, F f);-Table 1.39. Parameters
+Table 1.39. Parameters
@@ -63,19 +63,19 @@ - + seq
seq A model of Forward - Sequence, f(e)
is a valid expression, convertible - tobool
, for every element -e
inseq
+ Sequence, f(e) is a valid expression, convertible + to bool, for every element + e in seqThe sequence to search - + f
f A unary function object The search predicate @@ -84,38 +84,38 @@- + Expression Semantics
-all
(seq, f); +all(seq, f);- Return type:
bool
+ Return type: bool- Semantics: Returns true if and only - if
f(e)
- evaluates totrue
for every - elemente
inseq
. + Semantics: Returns true if and only + if f(e) + evaluates to true for every + element e in seq.- + Complexity
- Linear. At most
comparisons. + Linear. At most result_of::size<Sequence>::value comparisons.
result_of::size
<Sequence>::value- + Header
#include <boost/fusion/algorithm/query/all.hpp>- + Example
@@ -128,8 +128,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()));
seq |
+seq | A
model of Forward
- Sequence, f(e) must be a valid expression, convertible
- to bool , for each element
- e in seq
+ Sequence, f(e) must be a valid expression, convertible
+ to bool, for each element
+ e in seq
|
The sequence to search |
f |
+f | A unary function object | The search predicate | @@ -84,38 +84,38 @@
-any
(seq, f);
+any(seq, f);
- Return type: bool
+ Return type: bool
- Semantics: Returns true if and only
- if f(e)
- evaluates to true
for some
- element e
in seq
.
+ Semantics: Returns true if and only
+ if f(e)
+ evaluates to true for some
+ element e in seq.
- Linear. At most
comparisons.
+ Linear. At most result_of::size<Sequence>::value comparisons.
result_of::size
<Sequence>::value
#include <boost/fusion/algorithm/query/any.hpp>
@@ -128,8 +128,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()));
seq |
+seq | A
model of Forward
- Sequence, e == t
- must be a valid expression, convertible to bool ,
- for each element e
- in seq
+ Sequence, e == t
+ must be a valid expression, convertible to bool,
+ for each element e
+ in seq
|
The sequence to search |
T |
+T | Any type | The type to count | @@ -81,42 +81,42 @@
-count
(seq, t);
+count(seq, t);
- Return type: int
+ Return type: int
- Semantics: Returns the number of elements
- of type T
and equal to
- t
in seq
.
+ Semantics: Returns the number of elements
+ of type T and equal to
+ t in seq.
- Linear. At most
comparisons.
+ Linear. At most result_of::size<Sequence>::value comparisons.
result_of::size
<Sequence>::value
#include <boost/fusion/algorithm/query/count.hpp>
-constvector
<double,int,int> vec(1.0,2,3); -assert(count
(vec,2) == 1); +const vector<double,int,int> vec(1.0,2,3); +assert(count(vec,2) == 1);
seq |
+seq | A
model of Forward
- Sequence, f(e) is a valid expression, convertible
- to bool , for each element
- e in seq
+ Sequence, f(e) is a valid expression, convertible
+ to bool, for each element
+ e in seq
|
The sequence to search |
f |
+f | A unary function object | The search predicate | @@ -81,41 +81,41 @@
-count_if
(seq, f)
+count_if(seq, f)
- Return type: int
+ Return type: int
- Semantics: Returns the number of elements
- in seq
where f
evaluates to true
.
+ Semantics: Returns the number of elements
+ in seq where f evaluates to true.
- Linear. At most
comparisons.
+ Linear. At most result_of::size<Sequence>::value comparisons.
result_of::size
<Sequence>::value
#include <boost/fusion/algorithm/query/count_if.hpp>
-constvector
<int,int,int> vec(1,2,3); -assert(count_if
(vec,odd()) == 2); +const vector<int,int,int> vec(1,2,3); +assert(count_if(vec,odd()) == 2);
seq |
+seq | A model of Forward @@ -73,7 +73,7 @@ | The sequence to search |
T |
+T | Any type | The type to search for | @@ -82,45 +82,45 @@
-find
<T>(seq)
+find<T>(seq)
- Return type: A model of the same iterator
- category as the iterators of seq
.
+ Return type: A model of the same iterator
+ category as the iterators of seq.
- Semantics: Returns an iterator to the
- first element of seq
- of type T
, or
if there is no such element. Equivalent
- to end
(seq)
+ Semantics: Returns an iterator to the
+ first element of seq
+ of type T, or end(seq) if there is no such element. Equivalent
+ to find_if<boost::is_same<_, T> >(seq)
find_if
<boost::is_same<_, T> >(seq)
- Linear. At most
comparisons.
+ Linear. At most result_of::size<Sequence>::value comparisons.
result_of::size
<Sequence>::value
#include <boost/fusion/algorithm/query/find.hpp>
-constvector
<char,int> vec('a','0'); -assert(*find
<int>(vec) == '0'); -assert(find
<double>(vec) ==end
(vec)); +const vector<char,int> vec('a','0'); +assert(*find<int>(vec) == '0'); +assert(find<double>(vec) == end(vec));
seq |
+seq | A model of Forward @@ -74,7 +74,7 @@ | The sequence to search |
F |
+F | A unary MPL Lambda Expression | The search predicate | @@ -83,46 +83,46 @@
-find_if
<F>(seq)
+find_if<F>(seq)
- Return type: An iterator of the same
- iterator category as the iterators of seq
.
+ Return type: An iterator of the same
+ iterator category as the iterators of seq.
- Semantics: Returns the first element
- of seq
for which MPL
- Lambda Expression F
evaluates
- to boost::mpl::true_
, or
+ 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.
end
(seq)
- Linear. At most
comparisons.
+ Linear. At most result_of::size<Sequence>::value comparisons.
result_of::size
<Sequence>::value
#include <boost/fusion/algorithm/query/find_if.hpp>
-constvector
<double,int> vec(1.0,2); -assert(*find_if
<is_integral<mpl::_> >(vec) == 2); -assert(find_if
<is_class<mpl::_> >(vec) ==end
(vec)); +const vector<double,int> vec(1.0,2); +assert(*find_if<is_integral<mpl::_> >(vec) == 2); +assert(find_if<is_class<mpl::_> >(vec) == end(vec));
seq |
+seq | A
model of Forward
- Sequence, f(e) is a valid expression, convertible
- to bool , for every element
- e in seq
+ Sequence, f(e) is a valid expression, convertible
+ to bool, for every element
+ e in seq
|
The sequence to search |
f |
+f | A unary function object | The search predicate | @@ -84,38 +84,38 @@
-none
(seq, f);
+none(seq, f);
- Return type: bool
+ Return type: bool
- Semantics: Returns true if and only
- if f(e)
- evaluates to false
for every
- element e
in seq
. Result equivalent to !any(seq, f)
.
+ Semantics: Returns true if and only
+ if f(e)
+ evaluates to false for every
+ element e in seq. Result equivalent to !any(seq, f).
- Linear. At most
comparisons.
+ Linear. At most result_of::size<Sequence>::value comparisons.
result_of::size
<Sequence>::value
#include <boost/fusion/algorithm/query/none.hpp>
@@ -128,8 +128,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()));
Sequence |
+Sequence | A model of Forward @@ -70,7 +70,7 @@ | Operation's argument |
F |
+F | A model of unary Polymorphic @@ -82,34 +82,34 @@ |
-result_of::all
<Sequence, F>::type
+result_of::all<Sequence, F>::type
- Return type: bool
.
+ Return type: bool.
- Semantics: Returns the return type of
- all
- given a sequence of type Sequence
+ Semantics: Returns the return type of
+ all
+ given a sequence of type Sequence
and a unary Polymorphic
- Function Object of type F
.
- The return type is always bool
.
+ Function Object of type F.
+ The return type is always bool.
Constant.
diff --git a/doc/html/fusion/algorithms/query/metafunctions/any.html b/doc/html/fusion/algorithms/query/metafunctions/any.html index d72d800d..8be75c89 100644 --- a/doc/html/fusion/algorithms/query/metafunctions/any.html +++ b/doc/html/fusion/algorithms/query/metafunctions/any.html @@ -3,7 +3,7 @@any - + @@ -26,14 +26,14 @@- + Description
- A metafunction returning the result type of
any
. + A metafunction returning the result type of any.- + Synopsis
@@ -47,7 +47,7 @@ };
-Table 1.45. Parameters
+Table 1.45. Parameters
@@ -61,7 +61,7 @@ - + Sequence
Sequence A model of Forward @@ -70,7 +70,7 @@ Operation's argument - + F
F A model of unary Polymorphic @@ -82,34 +82,34 @@ - + Expression Semantics
-result_of::any
<Sequence, F>::type +result_of::any<Sequence, F>::type- Return type:
bool
. + Return type: bool.- Semantics: Returns the return type of -
any
- given a sequence of typeSequence
+ Semantics: Returns the return type of + any + given a sequence of type Sequence and a unary Polymorphic - Function Object of typeF
. - The return type is alwaysbool
. + Function Object of type F. + The return type is always bool.- + Complexity
Constant.
- + Header
diff --git a/doc/html/fusion/algorithms/query/metafunctions/count.html b/doc/html/fusion/algorithms/query/metafunctions/count.html index 2dc89381..112f2ccc 100644 --- a/doc/html/fusion/algorithms/query/metafunctions/count.html +++ b/doc/html/fusion/algorithms/query/metafunctions/count.html @@ -3,7 +3,7 @@count - + @@ -26,15 +26,15 @@- + Description
- A metafunction that returns the result type of
count
+ A metafunction that returns the result type of count given the sequence and search types.- + Synopsis
@@ -48,7 +48,7 @@ };
-Table 1.50. Parameters
+Table 1.50. Parameters
@@ -63,7 +63,7 @@ - + Sequence
Sequence A model of Forward @@ -72,7 +72,7 @@ Operation's argument - + T
T Any type Operation's argument @@ -81,30 +81,30 @@- + Expression Semantics
-result_of::count
<T>::type +result_of::count<T>::type- Return type:
int
. + Return type: int.- Semantics: Returns the return type of -
count
. The return type is always -int
. + Semantics: Returns the return type of + count. The return type is always + int.- + Complexity
Constant.
- + Header
diff --git a/doc/html/fusion/algorithms/query/metafunctions/count_if.html b/doc/html/fusion/algorithms/query/metafunctions/count_if.html index 2d5aea46..a0b2fcb6 100644 --- a/doc/html/fusion/algorithms/query/metafunctions/count_if.html +++ b/doc/html/fusion/algorithms/query/metafunctions/count_if.html @@ -3,7 +3,7 @@count_if - + @@ -26,15 +26,15 @@- + Description
- A metafunction that returns the result type of
count_if
+ A metafunction that returns the result type of count_if given the sequence and predicate types.- + Synopsis
@@ -48,7 +48,7 @@ };
-Table 1.51. Parameters
+Table 1.51. Parameters
@@ -62,7 +62,7 @@ - + Sequence
Sequence A model of Forward @@ -71,7 +71,7 @@ Operation's argument - + Pred
Pred A unary function object Operation's argument @@ -80,30 +80,30 @@- + Expression Semantics
-result_of::count_if
<Sequence, Pred>::type +result_of::count_if<Sequence, Pred>::type- Return type:
int
. + Return type: int.- Semantics: Returns the return type of -
count_if
. The return type is - alwaysint
. + Semantics: Returns the return type of + count_if. The return type is + always int.- + Complexity
Constant.
- + Header
diff --git a/doc/html/fusion/algorithms/query/metafunctions/find.html b/doc/html/fusion/algorithms/query/metafunctions/find.html index a30c2f8e..51823f66 100644 --- a/doc/html/fusion/algorithms/query/metafunctions/find.html +++ b/doc/html/fusion/algorithms/query/metafunctions/find.html @@ -3,7 +3,7 @@find - + @@ -26,15 +26,15 @@- + Description
- Returns the result type of
find
, + Returns the result type of find, given the sequence and search types.- + Synopsis
@@ -48,7 +48,7 @@ };
-Table 1.48. Parameters
+Table 1.48. Parameters
@@ -62,7 +62,7 @@ - + Sequence
Sequence Model of Forward @@ -71,7 +71,7 @@ Operation's argument - + T
T Any type Operation's argument @@ -80,31 +80,31 @@- + Expression Semantics
-result_of::find
<Sequence, T>::type +result_of::find<Sequence, T>::type- Return type: A model of the same iterator - category as the iterators of
Sequence
. + Return type: A model of the same iterator + category as the iterators of Sequence.- Semantics: Returns an iterator to the - first element of type
T
- inSequence
, orif there is no such element. + 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.
result_of::end
<Sequence>::type- + Complexity
- Linear, at most
comparisons. + Linear, at most result_of::size<Sequence>::value comparisons.
result_of::size
<Sequence>::value- + Header
diff --git a/doc/html/fusion/algorithms/query/metafunctions/find_if.html b/doc/html/fusion/algorithms/query/metafunctions/find_if.html index a063defa..1fbcfbcd 100644 --- a/doc/html/fusion/algorithms/query/metafunctions/find_if.html +++ b/doc/html/fusion/algorithms/query/metafunctions/find_if.html @@ -3,7 +3,7 @@find_if - + @@ -26,15 +26,15 @@- + Description
- Returns the result type of
find_if
+ Returns the result type of find_if given the sequence and predicate types.- + Synopsis
@@ -48,7 +48,7 @@ };
-Table 1.49. Parameters
+Table 1.49. Parameters
@@ -62,7 +62,7 @@ - + Sequence
Sequence A model of Forward @@ -71,7 +71,7 @@ Operation's argument - + Pred
Pred A model of MPL Lambda Expression Operation's arguments @@ -80,32 +80,32 @@- + Expression Semantics
-result_of::find_if
<Sequence, Pred>::type +result_of::find_if<Sequence, Pred>::type- Return type: A model of the same iterator - category as the iterators of
Sequence
. + Return type: A model of the same iterator + category as the iterators of Sequence.- Semantics: Returns an iterator to the - first element in
Sequence
- for whichPred
evaluates - to true. Returnsif there is no such element. + Semantics: Returns an iterator to the + first element in Sequence + for which Pred evaluates + to true. Returns result_of::end<Sequence>::type if there is no such element.
result_of::end
<Sequence>::type- + Complexity
- Linear. At most
comparisons. + Linear. At most result_of::size<Sequence>::value comparisons.
result_of::size
<Sequence>::value- + Header
diff --git a/doc/html/fusion/algorithms/query/metafunctions/none.html b/doc/html/fusion/algorithms/query/metafunctions/none.html index 05d9cd69..3b794020 100644 --- a/doc/html/fusion/algorithms/query/metafunctions/none.html +++ b/doc/html/fusion/algorithms/query/metafunctions/none.html @@ -3,7 +3,7 @@none - + @@ -26,14 +26,14 @@- + Description
- A metafunction returning the result type of
none
. + A metafunction returning the result type of none.- + Synopsis
@@ -47,7 +47,7 @@ };
-Table 1.47. Parameters
+Table 1.47. Parameters
@@ -61,7 +61,7 @@ - + Sequence
Sequence A model of Forward @@ -70,7 +70,7 @@ Operation's argument - + F
F A model of unary Polymorphic @@ -82,34 +82,34 @@ - + Expression Semantics
-result_of::none
<Sequence, F>::type +result_of::none<Sequence, F>::type- Return type:
bool
. + Return type: bool.- Semantics: Returns the return type of -
none
given a sequence of type -Sequence
and a unary + Semantics: Returns the return type of + none given a sequence of type + Sequence and a unary Polymorphic Function - Object of typeF
. - The return type is alwaysbool
. + Object of type F. + The return type is always bool.- + Complexity
Constant.
- + Header
diff --git a/doc/html/fusion/algorithms/transformation.html b/doc/html/fusion/algorithms/transformation.html index c9f2ee94..da6c68f9 100644 --- a/doc/html/fusion/algorithms/transformation.html +++ b/doc/html/fusion/algorithms/transformation.html @@ -3,7 +3,7 @@Transformation - + @@ -39,14 +39,14 @@Note
+
As the transformation algorithms return views onto their input arguments, it is important that the lifetime of the input arguments is greater than the period during which you wish to use the results.
diff --git a/doc/html/fusion/algorithms/transformation/functions.html b/doc/html/fusion/algorithms/transformation/functions.html index 3143ea86..49375ca0 100644 --- a/doc/html/fusion/algorithms/transformation/functions.html +++ b/doc/html/fusion/algorithms/transformation/functions.html @@ -3,7 +3,7 @@Functions - + diff --git a/doc/html/fusion/algorithms/transformation/functions/clear.html b/doc/html/fusion/algorithms/transformation/functions/clear.html index 4b1ef20a..6527f7f9 100644 --- a/doc/html/fusion/algorithms/transformation/functions/clear.html +++ b/doc/html/fusion/algorithms/transformation/functions/clear.html @@ -3,7 +3,7 @@clear - + @@ -26,24 +26,24 @@- + Description
-
clear
returns an empty sequence. + clear returns an empty sequence.- + Synposis
template< typename Sequence > -typenameresult_of::clear
<Sequence const>::type clear(Sequence const& seq); +typename result_of::clear<Sequence const>::type clear(Sequence const& seq);-Table 1.61. Parameters
+Table 1.61. Parameters
@@ -56,7 +56,7 @@ Description - + seq
seq A model of Forward @@ -67,42 +67,42 @@ - + Expression Semantics
-clear
(seq); +clear(seq);- Return type: A model of Return type: A model of Forward Sequence.
- Expression Semantics: Returns a sequence + Expression Semantics: Returns a sequence with no elements.
- + Complexity
Constant.
- + Header
#include <boost/fusion/algorithm/transformation/clear.hpp>- + Example
-assert(clear
(make_vector
(1,2,3)) ==make_vector
()); +assert(clear(make_vector(1,2,3)) == make_vector());
seq |
+seq | A model of Forward @@ -77,82 +77,82 @@ | Operation's argument | |
it1 |
+it1 | A model of Forward Iterator | -Iterator into seq
+ | Iterator into seq |
it2 |
+it2 | A model of Forward Iterator | -Iterator into seq
- after it1
+ | Iterator into seq + after it1 |
-erase
(seq, pos);
+erase(seq, pos);
- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, containing
- all the elements of seq
- except the element at pos
.
+ Semantics: Returns a new sequence, containing
+ all the elements of seq
+ except the element at pos.
-erase
(seq, first, last);
+erase(seq, first, last);
- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, with
- all the elements of seq
,
- in their original order, except those in the range [first
,last
).
+ Semantics: Returns a new sequence, with
+ all the elements of seq,
+ in their original order, except those in the range [first,last).
Constant. Returns a view which is lazily evaluated.
#include <boost/fusion/algorithm/transformation/erase.hpp>
-constvector
<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));
seq |
+seq | A model of Associative @@ -73,7 +73,7 @@ | Operation's argument |
Key |
+Key | Any type | Key to erase | @@ -82,43 +82,43 @@
-erase_key
<Key>(seq);
+erase_key<Key>(seq);
- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, containing
- all the elements of seq
,
- except those with key Key
.
+ Semantics: Returns a new sequence, containing
+ all the elements of seq,
+ except those with key Key.
Constant. Returns a view which is lazily evaluated.
#include <boost/fusion/algorithm/transformation/erase_key.hpp>
-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'));
seq |
+seq | A model of Forward @@ -68,7 +68,7 @@ | Operation's argument |
T |
+T | Any type | The type to retain | @@ -77,45 +77,45 @@
-filter
<T>(seq);
+filter<T>(seq);
- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a sequence containing
- all the elements of seq
- of type T
. Equivalent
- to
.
+ Semantics: Returns a sequence containing
+ all the elements of seq
+ of type T. Equivalent
+ to filter_if<boost::same_type<_, T> >(seq).
filter_if
<boost::same_type<_, T> >(seq)
Constant. Returns a view which is lazily evaluated.
#include <boost/fusion/algorithm/transformation/filter.hpp>
-constvector
<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));
seq |
+seq | A model of Forward @@ -69,7 +69,7 @@ | Operation's argument |
Pred |
+Pred | A unary MPL Lambda Expression | The predicate to filter @@ -79,46 +79,46 @@ |
-filter_if
<Pred>(seq);
+filter_if<Pred>(seq);
- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a sequence containing
- all the elements of seq
- with types for which Pred
- evaluates to boost::mpl::true_
. The order of the retained elements
+ Semantics: Returns a sequence containing
+ all the elements of seq
+ with types for which Pred
+ evaluates to boost::mpl::true_. The order of the retained elements
is the same as in the original sequence.
Constant. Returns a view which is lazily evaluated.
#include <boost/fusion/algorithm/transformation/filter_if.hpp>
-constvector
<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));
seq |
+seq | A model of Forward @@ -69,7 +69,7 @@ | Operation's argument |
pos |
+pos | A model of Forward @@ -78,7 +78,7 @@ | The position to insert at |
t |
+t | Any type | The value to insert | @@ -87,46 +87,46 @@
-insert
(seq, p, t);
+insert(seq, p, t);
- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, containing
- all the elements of seq
,
+ Semantics: Returns a new sequence, containing
+ all the elements of seq,
in their original order, and a new element with the type and value of
- t
inserted at iterator
- pos
.
+ t inserted at iterator
+ pos.
Constant. Returns a view which is lazily evaluated.
#include <boost/fusion/algorithm/transformation/insert.hpp>
-constvector
<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));
seq |
+seq | A model of Forward @@ -70,7 +70,7 @@ | Operation's argument |
pos |
+pos | A model of Forward @@ -79,7 +79,7 @@ | The position to insert at |
range |
+range | A model of Forward @@ -91,46 +91,46 @@ |
-insert
(seq, pos, range);
+insert(seq, pos, range);
- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, containing
- all the elements of seq
,
- and the elements of range
- inserted at iterator pos
.
+ Semantics: Returns a new sequence, containing
+ all the elements of seq,
+ and the elements of range
+ inserted at iterator pos.
All elements retaining their ordering from the orignal sequences.
Constant. Returns a view which is lazily evaluated.
#include <boost/fusion/algorithm/transformation/insert_range.hpp>
-constvector
<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));
lhs |
+lhs | A model of Forward @@ -67,7 +67,7 @@ | Operation's argument |
rhs |
+rhs | A model of Forward @@ -79,46 +79,46 @@ |
-join
(lhs, rhs);
+join(lhs, rhs);
- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a sequence containing
- all the elements of lhs
- followed by all the elements of rhs
.
+ Semantics: Returns a sequence containing
+ all the elements of lhs
+ followed by all the elements of rhs.
The order of th elements is preserved.
Constant. Returns a view which is lazily evaluated.
#include <boost/fusion/algorithm/transformation/join.hpp>
-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'));
Description | ||
---|---|---|
seq |
+seq | A model of Forward @@ -67,44 +67,44 @@ |
-pop_back
(seq);
+pop_back(seq);
- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence containing
- all the elements of seq
,
+ Semantics: Returns a new sequence containing
+ all the elements of seq,
except the last element. The elements in the new sequence are in the
- same order as they were in seq
.
+ same order as they were in seq.
Constant. Returns a view which is lazily evaluated.
#include <boost/fusion/algorithm/transformation/pop_back.hpp>
-assert(___pop_back__(make_vector
(1,2,3)) ==make_vector
(1,2)); +assert(___pop_back__(make_vector(1,2,3)) == make_vector(1,2));
Description | ||
---|---|---|
seq |
+seq | A model of Forward @@ -67,44 +67,44 @@ |
-pop_front
(seq);
+pop_front(seq);
- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence containing
- all the elements of seq
,
+ Semantics: Returns a new sequence containing
+ all the elements of seq,
except the first element. The elements in the new sequence are in the
- same order as they were in seq
.
+ same order as they were in seq.
Constant. Returns a view which is lazily evaluated.
#include <boost/fusion/algorithm/transformation/pop_front.hpp>
-assert(pop_front
(make_vector
(1,2,3)) ==make_vector
(2,3)); +assert(pop_front(make_vector(1,2,3)) == make_vector(2,3));
seq |
+seq | A model of Forward @@ -68,7 +68,7 @@ | Operation's argument |
t |
+t | Any type | The value to add to the end | @@ -77,44 +77,44 @@
-push_back
(seq, t);
+push_back(seq, t);
- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, containing
- all the elements of seq
,
- and new element t
appended
- to the end. The elements are in the same order as they were in seq
.
+ Semantics: Returns a new sequence, containing
+ all the elements of seq,
+ and new element t appended
+ to the end. The elements are in the same order as they were in seq.
Constant. Returns a view which is lazily evaluated.
#include <boost/fusion/algorithm/transformation/push_back.hpp>
-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));
seq |
+seq | A model of Forward @@ -68,7 +68,7 @@ | Operation's argument |
t |
+t | Any type | The value to add to the beginning | @@ -77,45 +77,45 @@
-push_back
(seq, t);
+push_back(seq, t);
- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, containing
- all the elements of seq
,
- and new element t
appended
+ Semantics: Returns a new sequence, containing
+ all the elements of seq,
+ and new element t appended
to the beginning. The elements are in the same order as they were in
- seq
.
+ seq.
Constant. Returns a view which is lazily evaluated.
#include <boost/fusion/algorithm/transformation/push_front.hpp>
-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));
seq |
+seq | A model of Forward @@ -68,7 +68,7 @@ | Operation's argument |
T |
+T | Any type | Type to remove | @@ -77,45 +77,45 @@
-remove
<T>(seq);
+remove<T>(seq);
- Return type: A model of 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
.
+ Semantics: Returns a new sequence, containing
+ all the elements of seq,
+ in their original order, except those of type T.
+ Equivalent to remove_if<boost::is_same<_,T> >(seq).
remove_if
<boost::is_same<_,T> >(seq)
Constant. Returns a view which is lazily evaluated.
#include <boost/fusion/algorithm/transformation/remove.hpp>
-constvector
<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));
seq |
+seq | A model of Forward @@ -68,7 +68,7 @@ | Operation's argument |
Pred |
+Pred | A model of unary MPL Lambda Expression | Removal predicate | @@ -77,46 +77,46 @@
-remove_if
<Pred>(seq);
+remove_if<Pred>(seq);
- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, containing
- all the elements of seq
,
+ Semantics: Returns a new sequence, containing
+ all the elements of seq,
in their original order, except those elements with types for which
- Pred
evaluates to boost::mpl::true_
. Equivalent to
.
+ Pred evaluates to boost::mpl::true_. Equivalent to filter<boost::mpl::not_<Pred>
+ >(seq).
filter
<boost::mpl::not_<Pred>
- >(seq)
Constant. Returns a view which is lazily evaluated.
#include <boost/fusion/algorithm/transformation/remove_if.hpp>
-constvector
<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));
seq |
+seq | A
model of Forward
- Sequence, e == old_value
- is a valid expression, convertible to bool ,
- for each element e
- in seq with type
- convertible to T
+ Sequence, e == old_value
+ is a valid expression, convertible to bool,
+ for each element e
+ in seq with type
+ convertible to T
|
Operation's argument |
old_value |
+old_value | Any type | Value to replace |
new_value |
+new_value | Any type | Replacement value | @@ -89,44 +89,44 @@
-replace
(seq, old_value, new_value);
+replace(seq, old_value, new_value);
- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence with
- all the values of seq
- with new_value
assigned
- to elements with the same type and equal to old_value
.
+ Semantics: Returns a new sequence with
+ all the values of seq
+ with new_value assigned
+ to elements with the same type and equal to old_value.
Constant. Returns a view which is lazily evaluated.
#include <boost/fusion/algorithm/transformation/replace.hpp>
-assert(replace
(make_vector
(1,2), 2, 3) ==make_vector
(1,3)); +assert(replace(make_vector(1,2), 2, 3) == make_vector(1,3));
seq |
+seq | A model of Forward @@ -70,16 +70,16 @@ | Operation's argument |
f |
+f | A
- function object for which f(e) is a valid expression, convertible
- to bool , for each element
- e in seq
+ function object for which f(e) is a valid expression, convertible
+ to bool, for each element
+ e in seq
|
Operation's argument |
new_value |
+new_value | Any type | Replacement value | @@ -88,41 +88,41 @@
-replace_if
(seq, f, new_value);
+replace_if(seq, f, new_value);
- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence with
- all the elements of seq
,
- with new_value
assigned
- to each element for which f
- evaluates to true
.
+ Semantics: Returns a new sequence with
+ all the elements of seq,
+ with new_value assigned
+ to each element for which f
+ evaluates to true.
Constant. Returns a view which is lazily evaluated.
#include <boost/fusion/algorithm/transformation/replace_if.hpp>
@@ -135,7 +135,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));
Description | ||
---|---|---|
seq |
+seq | A model of Bidirectional @@ -67,43 +67,43 @@ |
-reverse
(seq);
+reverse(seq);
- Return type: A model of Return type: A model of Bidirectional Sequence.
- Semantics: Returns a new sequence containing
- all the elements of seq
+ Semantics: Returns a new sequence containing
+ all the elements of seq
in reverse order.
Constant. Returns a view which is lazily evaluated.
#include <boost/fusion/algorithm/transformation/reverse.hpp>
-assert(reverse
(make_vector
(1,2,3)) ==make_vector
(3,2,1)); +assert(reverse(make_vector(1,2,3)) == make_vector(3,2,1));
seq |
+seq | A model of Forward @@ -74,12 +74,12 @@ | Operation's argument |
f |
+f | A
model of unary Polymorphic
- Function Object where f(e) is a valid expression for each element
- e of seq
+ Function Object where f(e) is a valid expression for each element
+ e of seq
|
Transformation function | @@ -88,25 +88,25 @@
-transform
(seq, f);
+transform(seq, f);
- Return type: A model of Return type: A model of Forward Sequence
- Semantics: Returns a new sequence, containing
- the return values of f(e)
for each element e
- within seq
.
+ Semantics: Returns a new sequence, containing
+ the return values of f(e) for each element e
+ within seq.
result_of::transform
<Sequence1 const, Sequence2 const, F>::type transform(
+typename result_of::transform<Sequence1 const, Sequence2 const, F>::type transform(
Sequence1 const& seq1, Sequence2 const& seq2, F f);
Table 1.55. Parameters
+Table 1.55. Parameters
seq1 |
+seq1 | A model of Forward @@ -143,7 +143,7 @@ | Operation's argument |
seq2 |
+seq2 | A model of Forward @@ -152,13 +152,13 @@ | Operation's argument |
f |
+f | A
model of binary Polymorphic
- Function Object where f(e1, e2) is a valid expression for each pair
- of elements e1 and
- e2 of seq1 and seq2
+ Function Object where f(e1, e2) is a valid expression for each pair
+ of elements e1 and
+ e2 of seq1 and seq2
respectively |
Transformation function |
- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, containing
- the return values of f(e1, e2)
for each pair of elements e1
and e2
- within seq1
and seq2
respectively.
+ Semantics: Returns a new sequence, containing
+ the return values of f(e1, e2) for each pair of elements e1 and e2
+ within seq1 and seq2 respectively.
Constant. Returns a view which is lazily evaluated.
#include <boost/fusion/algorithm/transformation/transform.hpp>
@@ -209,7 +209,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));
-seq1 to seqN
+seq1 to seqN
|
Each sequence
is a model of - + Expression Semantics
-
- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a sequence containing
- tuples of elements from sequences - + ComplexityConstant. Returns a view which is lazily evaluated. - + Header#include <boost/fusion/algorithm/transformation/zip.hpp> - + Example-
- + Expression Semantics
-
- Return type: A model of Return type: A model of Forward Sequence. - Semantics: Returns an empty sequence. + Semantics: Returns an empty sequence. - + ComplexityConstant. - + Headerdiff --git a/doc/html/fusion/algorithms/transformation/metafunctions/erase.html b/doc/html/fusion/algorithms/transformation/metafunctions/erase.html index 9848b0ef..635dd8c4 100644 --- a/doc/html/fusion/algorithms/transformation/metafunctions/erase.html +++ b/doc/html/fusion/algorithms/transformation/metafunctions/erase.html @@ -3,7 +3,7 @@ struct_type
- and index provide convenient
+ The typedefs struct_type
+ and index provide convenient
access to information we will need later in the implementation.
category allows
- the traits::
+ The typedef category allows
+ the traits::category_of
metafunction to establish the traversal category of the iterator.
example_struct
+ The constructor stores a reference to the example_struct
being iterated over.
We also need to enable tag
dispatching for our iterator type, with another specialization
- 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 @@ -215,29 +215,29 @@
The implementation itself is pretty simple, it just uses 2 partial specializations
- to provide the type of the 2 different members of
- To understand how
template <typename Iterator>
-struct
- So
Ok, lets enable dereferencing of our iterator. In this case we must provide
- a suitable specialization of template<> @@ -275,17 +275,17 @@ }
- The use of namespace result_of { template <typename Iterator> - struct
- So again
- The actual implementation of
- + Implementing the remaining iterator functionality
- Ok, now we have seen the way template<> @@ -356,40 +356,40 @@ };
- This should be very familiar from our
- We also need to provide a suitable
- Full implementations of - + Implementing the intrinsic functions of the sequence
In order that Fusion can correctly identify our sequence as a Fusion sequence,
- we need to enable
@@ -401,14 +401,14 @@
};
- We've some similar formalities to complete, providing
Now we've completed some formalities, on to more interesting features. Lets
- get @@ -431,32 +431,32 @@ |
+
next(i) |
Bidirectional
Iterator |
Constant |
|
+
prior(i) |
Bidirectional
Iterator |
Constant |
|
+
advance_c<N>(i) |
Bidirectional
Iterator |
Constant |
|
+
advance<M>(i) |
Bidirectional
Iterator |
@@ -123,7 +123,7 @@
- + Meta Expressions@@ -137,13 +137,13 @@ | Compile Time Complexity | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
+result_of::prior<I>::type | Amortized constant time |
prior
(i)
i
+ iterator to the element preceding i
@@ -179,44 +179,44 @@ Iterator, the following invariants always hold:
std::pair
+std::pair
iterator
boost::array
+boost::array
iterator
vector
+vector
iterator
iterator_range
+iterator_range
(where adapted sequence is a Bidirectional
Sequence)
transform_view
+transform_view
(where adapted sequence is a Bidirectional
Sequence)
reverse_view
|
+next(i) | Forward Iterator | Constant | |
i ==
- j |
+i == + j | Convertible to bool | Constant | |
i !=
- j |
+i != + j | Convertible to bool | Constant | |
|
+advance_c<N>(i) | Forward Iterator | Constant | |
|
+advance<M>(i) | Forward Iterator | Constant | |
|
-
|
+distance(i, j) | +result_of::distance<I, J>::type | Constant |
|
-
|
+deref(i) | +result_of::deref<I>::type | Constant |
*i |
-
|
+*i | +result_of::deref<I>::type | Constant |
result_of::next
<I>::type
result_of::equal_to
<I, J>::type
result_of::advance_c
<I, N>::type
result_of::advance
<I ,M>::type
result_of::distance
<I ,J>::type
result_of::deref
<I>::type
result_of::value_of
<I>::type
next
(i)
i
+ iterator to the element following i
i ==
- j
i !=
- j
advance_c
<N>(i)
i
+ iterator n elements after i
in the sequenceadvance
<M>(i)
advance_c<M::value>(i)
+ to advance_c<M::value>(i)
distance
(i, j)
i
- and j
+ number of elements between i
+ and j
deref
(i)
i
+ element at positioni
*i
deref(i)
+ to deref(i)
The following invariants always hold:
!(i
- == j) == (i != j)
next
(i) == advance_c
<1>(i)
distance
(i, advance_c
<N>(i)) == N
next
to traverse the
+ Using next to traverse the
sequence will never return to a previously seen position
deref
(i)
- is equivalent to *i
+deref(i)
+ is equivalent to *i
i ==
- j
then *i
is equivalent to *j
+ If i ==
+ j then *i is equivalent to *j
std::pair
+std::pair
iterator
boost::array
+boost::array
iterator
vector
+vector
iterator
cons
+cons
iterator
list
+list
iterator
set
+set
iterator
map
+map
iterator
single_view
+single_view
iterator
filter_view
+filter_view
iterator
iterator_range
+iterator_range
iterator
joint_view
+joint_view
iterator
transform_view
+transform_view
iterator
reverse_view
+reverse_view
iterator
@@ -41,29 +41,29 @@
Notation
i
,
- j
I
,
- J
M
N
next
(i)
prior
(i)
advance_c
<N>(i)
advance
<M>(i)
result_of::advance_c
<I, N>::type
result_of::advance
<I, M>::type
result_of::distance
<I ,J>::type
vector
+vector
iterator
std::pair
+std::pair
iterator
boost::array
+boost::array
iterator
iterator_range
+iterator_range
iterator (where adapted sequence is a Random
Access Sequence)
transform_view
+transform_view
iterator (where adapted sequence is a Random
Access Sequence)
reverse_view
+reverse_view
iterator (where adapted sequence is a Random
Access Sequence)
diff --git a/doc/html/fusion/iterators/functions.html b/doc/html/fusion/iterators/functions.html
index 1a4582f6..cad3aa28 100644
--- a/doc/html/fusion/iterators/functions.html
+++ b/doc/html/fusion/iterators/functions.html
@@ -3,7 +3,7 @@
Moves an iterator by a specified distance.
@@ -41,10 +41,10 @@
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
i |
+i | Model of Forward @@ -67,7 +67,7 @@ | Iterator to move relative to |
N |
+N | An MPL Integral Constant | Number of positions to move | @@ -76,42 +76,42 @@
-advance
<M>(i);
+advance<M>(i);
- Return type: A model of the same iterator
- concept as i
.
+ Return type: A model of the same iterator
+ concept as i.
- Semantics: Returns an iterator to the
- element M
positions from
- i
. If i
+ Semantics: Returns an iterator to the
+ element M positions from
+ i. If i
is a Bidirectional
- Iterator then M
+ Iterator then M
may be negative.
#include <boost/fusion/iterator/advance.hpp>
-typedefvector
<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);
i |
+i | Model of Forward @@ -67,7 +67,7 @@ | Iterator to move relative to |
N |
+N | Integer constant | Number of positions to move | @@ -76,42 +76,42 @@
-advance_c
<N>(i);
+advance_c<N>(i);
- Return type: A model of the same iterator
- concept as i
.
+ Return type: A model of the same iterator
+ concept as i.
- Semantics: Returns an iterator to the
- element N
positions from
- i
. If i
+ Semantics: Returns an iterator to the
+ element N positions from
+ i. If i
is a Bidirectional
- Iterator then N
+ Iterator then N
may be negative.
#include <boost/fusion/iterator/advance.hpp>
-typedefvector
<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);
Description | ||
---|---|---|
i |
+i | Model of Forward @@ -67,39 +67,39 @@ |
-deref
(i);
+deref(i);
- Return type:
+ Return type: result_of::deref<I>::type
result_of::deref
<I>::type
- Semantics: Dereferences the iterator
- i
.
+ Semantics: Dereferences the iterator
+ i.
#include <boost/fusion/iterator/deref.hpp>
-typedefvector
<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);
-i , j
+i, j
|
Models of Forward @@ -69,36 +69,36 @@ |
-distance
(i,j);
+distance(i,j);
- Return type: int
+ Return type: int
- Semantics: Returns the distance between
- iterators i
and j
.
+ Semantics: Returns the distance between
+ iterators i and j.
#include <boost/fusion/iterator/distance.hpp>
-typedefvector
<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);
Description | ||
---|---|---|
i |
+i | Model of Forward @@ -67,7 +67,7 @@ |
- Return type: A model of the same iterator
- concept as i
.
+ Return type: A model of the same iterator
+ concept as i.
- Semantics: Returns an iterator to the
- next element after i
.
+ Semantics: Returns an iterator to the
+ next element after i.
#include <boost/fusion/iterator/next.hpp>
-typedefvector
<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);
Description | ||
---|---|---|
i |
+i | Model of Bidirectional @@ -67,38 +67,38 @@ |
-prior
(i);
+prior(i);
- Return type: A model of the same iterator
- concept as i
.
+ Return type: A model of the same iterator
+ concept as i.
- Semantics: Returns an iterator to the
- element prior to i
.
+ Semantics: Returns an iterator to the
+ element prior to i.
#include <boost/fusion/iterator/prior.hpp>
-typedefvector
<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);
I |
+I | Model of Forward @@ -70,7 +70,7 @@ | Iterator to move relative to |
M |
+M | Model of MPL Integral Constant | Number of positions to move | @@ -79,43 +79,43 @@
-result_of::advance
<I,M>::type
+result_of::advance<I,M>::type
- Return type: A model of the same iterator
- concept as I
.
+ Return type: A model of the same iterator
+ concept as I.
- Semantics: Returns an iterator a distance
- M
from I
.
- If I
is a Semantics: Returns an iterator a distance
+ M from I.
+ If I is a Bidirectional
- Iterator then M
+ Iterator then M
may be negative.
#include <boost/fusion/iterator/advance.hpp>
-typedefvector
<int,double,char> vec; -typedefresult_of::begin
<vec>::type first; -typedefresult_of::next
<first>::type second; -typedefresult_of::next
<second>::type third; +typedef vector<int,double,char> vec; +typedef result_of::begin<vec>::type first; +typedef result_of::next<first>::type second; +typedef result_of::next<second>::type third; -BOOST_MPL_ASSERT((result_of::equal_to
<result_of::advance
<first, boost::mpl::int_<2> >::type, third>)); +BOOST_MPL_ASSERT((result_of::equal_to<result_of::advance<first, boost::mpl::int_<2> >::type, third>));
I |
+I | Model of Forward @@ -70,7 +70,7 @@ | Iterator to move relative to |
N |
+N | Integer constant | Number of positions to move | @@ -79,43 +79,43 @@
-result_of::advance_c
<I, N>::type
+result_of::advance_c<I, N>::type
- Return type: A model of the same iterator
- concept as I
.
+ Return type: A model of the same iterator
+ concept as I.
- Semantics: Returns an iterator a distance
- N
from I
.
- If I
is a Semantics: Returns an iterator a distance
+ N from I.
+ If I is a Bidirectional
- Iterator then N
- may be negative. Equivalent to
.
+ Iterator then N
+ may be negative. Equivalent to result_of::advance<I, boost::mpl::int_<N> >::type.
result_of::advance
<I, boost::mpl::int_<N> >::type
#include <boost/fusion/iterator/advance.hpp>
-typedefvector
<int,double,char> vec; -typedefresult_of::begin
<vec>::type first; -typedefresult_of::next
<first>::type second; -typedefresult_of::next
<second>::type third; +typedef vector<int,double,char> vec; +typedef result_of::begin<vec>::type first; +typedef result_of::next<first>::type second; +typedef result_of::next<second>::type third; -BOOST_MPL_ASSERT((result_of::equal_to
<result_of::advance_c
<first, 2>::type, third>)); +BOOST_MPL_ASSERT((result_of::equal_to<result_of::advance_c<first, 2>::type, third>));
Description | ||
---|---|---|
I |
+I | Model of Forward @@ -70,42 +70,42 @@ |
-result_of::deref
<I>::type
+result_of::deref<I>::type
- Return type: Any type + Return type: Any type
- Semantics: Returns the result of dereferencing
- an iterator of type I
.
+ Semantics: Returns the result of dereferencing
+ an iterator of type I.
#include <boost/fusion/iterator/deref.hpp>
-typedefvector
<int,int&> vec; +typedef vector<int,int&> vec; typedef const vec const_vec; -typedefresult_of::begin
<vec>::type first; -typedefresult_of::next
<first>::type second; +typedef result_of::begin<vec>::type first; +typedef result_of::next<first>::type second; -typedefresult_of::begin
<const_vec>::type const_first; -typedefresult_of::next
<const_first>::type const_second; +typedef result_of::begin<const_vec>::type const_first; +typedef result_of::next<const_first>::type const_second; -BOOST_MPL_ASSERT((boost::is_same<result_of::deref
<first>::type, int&>)); -BOOST_MPL_ASSERT((boost::is_same<result_of::deref
<second>::type, int&>)); +BOOST_MPL_ASSERT((boost::is_same<result_of::deref<first>::type, int&>)); +BOOST_MPL_ASSERT((boost::is_same<result_of::deref<second>::type, int&>));
-I , J
+I, J
|
Models of Forward @@ -72,38 +72,38 @@ |
-result_of::distance
<I, J>::type
+result_of::distance<I, J>::type
- Return type: A model of MPL Integral Constant. + Return type: A model of MPL Integral Constant.
- Semantics: Returns the distance between
- iterators of types I
and
- J
.
+ Semantics: Returns the distance between
+ iterators of types I and
+ J.
#include <boost/fusion/iterator/distance.hpp>
-typedefdiff --git a/doc/html/fusion/iterators/metafunctions/equal_to.html b/doc/html/fusion/iterators/metafunctions/equal_to.html index 57fa267a..bfa507f1 100644 --- a/doc/html/fusion/iterators/metafunctions/equal_to.html +++ b/doc/html/fusion/iterators/metafunctions/equal_to.html @@ -3,7 +3,7 @@vector
<int,double,char> vec; -typedefresult_of::begin
<vec>::type first; -typedefresult_of::next
<first>::type second; -typedefresult_of::next
<second>::type third; -typedefresult_of::distance
<first,third>::type dist; +typedef vector<int,double,char> vec; +typedef result_of::begin<vec>::type first; +typedef result_of::next<first>::type second; +typedef result_of::next<second>::type third; +typedef result_of::distance<first,third>::type dist; BOOST_MPL_ASSERT_RELATION(dist::value, ==, 2);
- Returns a true-valued MPL Integral Constant if I
- and J
are equal.
+ Returns a true-valued MPL Integral Constant if I
+ and J are equal.
@@ -48,7 +48,7 @@
};
Table 1.15. Parameters
+Table 1.15. Parameters
-I , J
+I, J
|
Any fusion iterators | Operation's @@ -71,38 +71,38 @@ |
-result_of::equal_to
<I, J>::type
+result_of::equal_to<I, J>::type
- Return type: A model of MPL Integral Constant. + Return type: A model of MPL Integral Constant.
- Semantics: Returns boost::mpl::true_
- if I
and J
are iterators to the same position.
- Returns boost::mpl::false_
otherwise.
+ Semantics: Returns boost::mpl::true_
+ if I and J are iterators to the same position.
+ Returns boost::mpl::false_ otherwise.
#include <boost/fusion/iterator/equal_to.hpp>
-typedefvector
<int,double> vec; -typedefresult_of::begin
<vec>::type first; -typedefresult_of::end
<vec>::type last; -BOOST_MPL_ASSERT((result_of::equal_to
<first, first>)); -BOOST_MPL_ASSERT_NOT((result_of::equal_to
<first,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>));
Description | ||
---|---|---|
I |
+I | Model of Forward @@ -70,37 +70,37 @@ |
-result_of::next
<I>::type
+result_of::next<I>::type
- Return type: A model of the same iterator
- concept as I
.
+ Return type: A model of the same iterator
+ concept as I.
- Semantics: Returns an iterator to the
- next element in the sequence after I
.
+ Semantics: Returns an iterator to the
+ next element in the sequence after I.
#include <boost/fusion/iterator/next.hpp>
-typedefvector
<int,double> vec; -typedefresult_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>)); +BOOST_MPL_ASSERT((boost::is_same<result_of::value_of<second>::type, double>));
Description | ||
---|---|---|
I |
+I | Model of Bidirectional @@ -70,40 +70,40 @@ |
-result_of::prior
<I>::type
+result_of::prior<I>::type
- Return type: A model of the same iterator
- concept as I
.
+ Return type: A model of the same iterator
+ concept as I.
- Semantics: Returns an iterator to the
- previous element in the sequence before I
.
+ Semantics: Returns an iterator to the
+ previous element in the sequence before I.
#include <boost/fusion/iterator/prior.hpp>
-typedefvector
<int,double> vec; -typedefresult_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>)); +BOOST_MPL_ASSERT((boost::is_same<result_of::value_of<second>::type, double>)); -typedefresult_of::prior
<second>::type first; -BOOST_MPL_ASSERT((boost::is_same<result_of::value_of
<first>::type, int>)); +typedef result_of::prior<second>::type first; +BOOST_MPL_ASSERT((boost::is_same<result_of::value_of<first>::type, int>));
Description | ||
---|---|---|
I |
+I | Model of Forward @@ -70,40 +70,40 @@ |
-result_of::value_of
<I>::type
+result_of::value_of<I>::type
- Return type: Any type + Return type: Any type
- Semantics: Returns the type stored in
- a sequence at iterator position I
.
+ Semantics: Returns the type stored in
+ a sequence at iterator position I.
#include <boost/fusion/iterator/value_of.hpp>
-typedefvector
<int,int&,const int&> vec; -typedefresult_of::begin
<vec>::type first; -typedefresult_of::next
<first>::type second; -typedefresult_of::next
<second>::type third; +typedef vector<int,int&,const int&> vec; +typedef result_of::begin<vec>::type first; +typedef result_of::next<first>::type second; +typedef result_of::next<second>::type third; -BOOST_MPL_ASSERT((boost::is_same<result_of::value_of
<first>::type, int>)); -BOOST_MPL_ASSERT((boost::is_same<result_of::value_of
<second>::type, int&>)); -BOOST_MPL_ASSERT((boost::is_same<result_of::value_of
<third>::type, const int&>)); +BOOST_MPL_ASSERT((boost::is_same<result_of::value_of<first>::type, int>)); +BOOST_MPL_ASSERT((boost::is_same<result_of::value_of<second>::type, int&>)); +BOOST_MPL_ASSERT((boost::is_same<result_of::value_of<third>::type, const int&>));
-i , j
+i, j
|
Any fusion iterators | Operation's @@ -72,7 +72,7 @@ |
- Return type: Convertible to bool
.
+ Return type: Convertible to bool.
- Semantics: Equivalent to
- where result_of::equal_to
<I,J>::valueI
and J
are the types of i
- and j
respectively.
+ Semantics: Equivalent to result_of::equal_to<I,J>::value
+ where I and J are the types of i
+ and j respectively.
diff --git a/doc/html/fusion/iterators/operators/operator_inequality.html b/doc/html/fusion/iterators/operators/operator_inequality.html index 115065f3..c6328841 100644 --- a/doc/html/fusion/iterators/operators/operator_inequality.html +++ b/doc/html/fusion/iterators/operators/operator_inequality.html @@ -4,7 +4,7 @@Operator != - + Operator !=- + Description
Compares 2 iterators for inequality.
- + Synopsis
@@ -48,7 +48,7 @@ unspecified operator==(I const& i, J const& i);-Table 1.10. Parameters
+Table 1.10. Parameters
@@ -62,7 +62,7 @@ - i
,j
+i, jAny fusion iterators Operation's @@ -71,20 +71,20 @@ - + Expression Semantics
- Return type: Convertible to
bool
. + Return type: Convertible to bool.- Semantics: Equivalent to
!
- whereresult_of::equal_to
<I,J>::valueI
andJ
are the types ofi
- andj
respectively. + Semantics: Equivalent to !result_of::equal_to<I,J>::value + where I and J are the types of i + and j respectively.- + Header
diff --git a/doc/html/fusion/iterators/operators/operator_unary_star.html b/doc/html/fusion/iterators/operators/operator_unary_star.html index bf405c7c..33199e55 100644 --- a/doc/html/fusion/iterators/operators/operator_unary_star.html +++ b/doc/html/fusion/iterators/operators/operator_unary_star.html @@ -4,7 +4,7 @@Operator * - + @@ -30,24 +30,24 @@ *"> Operator *- + Description
Dereferences an iterator.
- + Synopsis
template< typename I > -typenameresult_of::deref
<I>::type operator*(unspecified<I> const& i); +typename result_of::deref<I>::type operator*(unspecified<I> const& i);-Table 1.8. Parameters
+Table 1.8. Parameters
@@ -60,7 +60,7 @@ Description - + i
i Model of Forward @@ -71,7 +71,7 @@ - + Expression Semantics
@@ -79,31 +79,31 @@ *i- Return type: Equivalent to the return - type of
. + Return type: Equivalent to the return + type of deref(i).
deref
(i)- Semantics: Equivalent to
. + Semantics: Equivalent to deref(i).
deref
(i)- + Header
#include <boost/fusion/iterator/deref.hpp>- + Example
-typedefvector
<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);
![]() |
Caution |
---|---|
- The result of | |
+ The result of typeid(x).name() is platform specific. The code here is just for exposition. Of course you already know that :-) |
-
is generic. With
- for_each
print_xml
, you can use it to
+ for_each is generic. With
+ print_xml, you can use it to
print just about any Fusion Sequence.
Let's get a little cleverer. Say we wish to write a generic
function that takes in an arbitrary sequence and XML prints only those elements
- which are pointers. Ah, easy. First, let's include the is_pointer
+ which are pointers. Ah, easy. First, let's include the is_pointer
boost type trait:
@@ -135,36 +135,36 @@ 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()); }
-
is another Fusion
- algorithm. It returns a filter_if
filter_view
, a conforming Fusion sequence.
+ filter_if is another Fusion
+ algorithm. It returns a filter_view, a conforming Fusion sequence.
This view reflects only those elements that pass the given predicate. In this
- case, the predicate is boost::is_pointer<_>
.
- This "filtered view" is then passed to the for_each
algorithm, which then prints
+ case, the predicate is boost::is_pointer<_>.
+ This "filtered view" is then passed to the for_each algorithm, which then prints
the "filtered view" as XML.
Easy, right?
Ok, moving on...
- Apart from
, fusion has a couple
+ Apart from vector, fusion has a couple
of other sequence types to choose from. Each sequence has its own characteristics.
- We have vector
, list
, set
, plus a multitude of map
views
that provide various ways to present
+ We have list, set, map, plus a multitude of views that provide various ways to present
the sequences.
- Fusion's
associate types with elements.
- It can be used as a cleverer replacement of the map
struct
.
+ Fusion's map associate types with elements.
+ It can be used as a cleverer replacement of the struct.
Example:
@@ -174,32 +174,32 @@ struct age; } -typedefmap
< -fusion::pair
<fields::name, std::string> - ,fusion::pair
<fields::age, int> > +typedef map< + fusion::pair<fields::name, std::string> + , fusion::pair<fields::age, int> > person;
-
+ map
is an associative sequence. Its elements are Fusion pairs which differ somewhat
- from map
std::pair
. Fusion pairs only contain one member,
+ from std::pair. Fusion pairs only contain one member,
with the type of their second template parameter. The first type parameter
of the pair is used as an index to the associated element in the sequence.
- For example, given a a_person
- of type, person
, you can do:
+ For example, given a a_person
+ of type, person, you can do:
using namespace fields; -std::string person_name =at_key
<name>(a_person); -int person_age =at_key
<age>(a_person); +std::string person_name = at_key<name>(a_person); +int person_age = at_key<age>(a_person);
- Why go through all this trouble, you say? Well, for one, unlike the struct
, we are dealing with a generic data structure.
+ Why go through all this trouble, you say? Well, for one, unlike the struct, we are dealing with a generic data structure.
There are a multitude of facilities available at your disposal provided out
of the box with fusion or written by others. With these facilities, introspection
comes for free, for example. We can write one serialization function (well,
two, if you consider loading and saving) that will work for all your fusion
-
s.
+ maps.
Example:
map
@@ -215,17 +215,17 @@
template <typename Stuff>
void save(Stuff const& stuff)
{
- for_each
(stuff, saver());
+ for_each(stuff, saver());
}
- The save
function is generic
- and will work for all types of stuff
- regardless if it is a person
,
- a dog
or a whole alternate_universe
.
+ The save function is generic
+ and will work for all types of stuff
+ regardless if it is a person,
+ a dog or a whole alternate_universe.
@@ -236,14 +236,14 @@
[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]
- 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
+
[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/sequences/adapted.html b/doc/html/fusion/sequences/adapted.html index 7e4011e0..cd502cc0 100644 --- a/doc/html/fusion/sequences/adapted.html +++ b/doc/html/fusion/sequences/adapted.html @@ -3,7 +3,7 @@Adapted - + @@ -33,18 +33,18 @@
- Fusion provides a couple of adapters for other sequences such as std::pair
,
+ Fusion provides a couple of adapters for other sequences such as std::pair,
MPL sequences,
- and boost::array
. These adapters are written using
+ 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]
+ [4]
.
@@ -52,7 +52,7 @@
[4] +
[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 diff --git a/doc/html/fusion/sequences/adapted/boost__array.html b/doc/html/fusion/sequences/adapted/boost__array.html index 574ac5e0..d97de732 100644 --- a/doc/html/fusion/sequences/adapted/boost__array.html +++ b/doc/html/fusion/sequences/adapted/boost__array.html @@ -3,7 +3,7 @@
- This module provides adapters for boost::array
.
- Including the module header makes boost::array
+ This module provides adapters for boost::array.
+ Including the module header makes boost::array
a fully conforming Random
Access Sequence.
#include <boost/fusion/sequence/adapted/array.hpp>
boost::array<int,3> arr = {{1,2,3}}; -std::cout << *begin
(arr) << std::endl; -std::cout << *next
(begin
(arr)) << std::endl; -std::cout << *advance_c
<2>(begin
(arr)) << std::endl; -std::cout << *prior
(end
(arr)) << std::endl; -std::cout <<at_c
<2>(arr) << std::endl; +std::cout << *begin(arr) << std::endl; +std::cout << *next(begin(arr)) << std::endl; +std::cout << *advance_c<2>(begin(arr)) << std::endl; +std::cout << *prior(end(arr)) << std::endl; +std::cout << at_c<2>(arr) << std::endl;
diff --git a/doc/html/fusion/sequences/adapted/boost__tuple.html b/doc/html/fusion/sequences/adapted/boost__tuple.html index 7d31fed4..4b280da3 100644 --- a/doc/html/fusion/sequences/adapted/boost__tuple.html +++ b/doc/html/fusion/sequences/adapted/boost__tuple.html @@ -3,7 +3,7 @@
- This module provides adapters for boost::tuple
.
- Including the module header makes boost::tuple
+ This module provides adapters for boost::tuple.
+ Including the module header makes boost::tuple
a fully conforming Forward
Sequence.
#include <boost/fusion/sequence/adapted/boost_tuple.hpp>
@@ -55,7 +55,7 @@ std::cout << *boost::fusion::next(boost::fusion::begin(example_tuple)) << '\n';
diff --git a/doc/html/fusion/sequences/adapted/boost__variant.html b/doc/html/fusion/sequences/adapted/boost__variant.html index 28aedfc1..07f77105 100644 --- a/doc/html/fusion/sequences/adapted/boost__variant.html +++ b/doc/html/fusion/sequences/adapted/boost__variant.html @@ -3,7 +3,7 @@
- This module provides adapters for boost::variant
.
- Including the module header makes 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
@@ -36,21 +36,21 @@
value of that type.
#include <boost/fusion/sequence/adapted/variant.hpp>
@@ -60,7 +60,7 @@ std::cout << example_variant << '\n';
diff --git a/doc/html/fusion/sequences/adapted/mpl_sequence.html b/doc/html/fusion/sequences/adapted/mpl_sequence.html index 1b050496..4f879cf3 100644 --- a/doc/html/fusion/sequences/adapted/mpl_sequence.html +++ b/doc/html/fusion/sequences/adapted/mpl_sequence.html @@ -3,7 +3,7 @@
#include <boost/fusion/sequence/adapted/mpl.hpp>
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; +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; +std::cout << at_c<0>(v) << std::endl; +std::cout << at_c<1>(v) << std::endl;
diff --git a/doc/html/fusion/sequences/adapted/std__pair.html b/doc/html/fusion/sequences/adapted/std__pair.html index 8b89c766..48a4ff9f 100644 --- a/doc/html/fusion/sequences/adapted/std__pair.html +++ b/doc/html/fusion/sequences/adapted/std__pair.html @@ -3,7 +3,7 @@
- This module provides adapters for std::pair
.
- Including the module header makes std::pair
+ This module provides adapters for std::pair.
+ Including the module header makes std::pair
a fully conforming Random
Access Sequence.
#include <boost/fusion/sequence/adapted/std_pair.hpp>
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 << at_c<0>(p) << std::endl; +std::cout << at_c<1>(p) << std::endl; std::cout << p << std::endl;
- std::pair
,
- TR1
- and std::pair
+ std::pair,
+ TR1
+ and std::pair
|
+has_key<K>(s) | MPL Boolean Constant. Convertible to bool. | Constant | |
|
+at_key<K>(s) | Any type | Constant | |
|
+at_key<K>(s) = o | Any type |
-s
- is mutable and e = o ,
- where e is the first
+s
+ is mutable and e = o,
+ where e is the first
element in the sequence, is a valid expression. |
Constant |
result_of::has_key
<S, K>::type
result_of::at_key
<S, K>::type
result_of::value_at_key
<S, K>::type
-
returns the actual type returned by
- result_of::at_key
<S, K>
. In
+ at_key
<K>(s) result_of::at_key<S, K> returns the actual type returned by
+ at_key<K>(s). In
most cases, this is a reference. Hence, there is no way to know the exact
- element type using
.The element at result_of::at_key
<S, K>K
+ element type using result_of::at_key<S, K>.The element at K
may actually be a reference to begin with. For this purpose, you can use
-
.
+ result_of::value_at_key<S, N>.
result_of::value_at_key
<S, N>
has_key
<K>(s)
c
- such that c::value ==
- true
if and only if there
- is one or more elements with the key k
- in s
; see has_key
.at_key
<K>(s)
K
- in the sequence s
;
- see at
.
|
+begin(s) | Bidirectional Iterator | @@ -105,7 +105,7 @@Constant | |
|
+end(s) | Bidirectional Iterator | @@ -113,27 +113,27 @@Constant | |
|
+back(s) | Any type | Constant | |
|
+back(s) = o | Any type |
-s
- is mutable and e = o ,
- where e is the first
+s
+ is mutable and e = o,
+ where e is the first
element in the sequence, is a valid expression. |
Constant |
result_of::begin
<S>::type
result_of::end
<S>::type
result_of::back
<S>::type
back
(s)
back
.std::pair
boost::array
vector
iterator_range
+iterator_range
(where adapted sequence is a Bidirectional Sequence)
transform_view
+transform_view
(where adapted sequence is a Bidirectional Sequence)
reverse_view
|
+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
+s
+ is mutable and e = o,
+ where e is the first
element in the sequence, is a valid expression. |
Constant |
result_of::begin
<S>::type
result_of::end
<S>::type
result_of::size
<S>::type
result_of::empty
<S>::type
result_of::front
<S>::type
begin
(s)
begin
.end
(s)
end
.size
(s)
size
.empty
(s)
c
- such that c::value ==
- true
if and only if the sequence
- is empty; see empty
.front
(s)
front
.@@ -226,41 +226,41 @@
[begin
(s), end
(s))
is always a valid range.
+[begin(s), end(s)) is always a valid range.
[begin
(s), end
(s))
will pass through every element of
- s
exactly once.
+ 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.
+begin(s)
+ is identical to end(s))
+ if and only if s is empty.
s
+ Two different iterations through s
will access its elements in the same order.
|
+begin(s) | Random Access Iterator | @@ -111,7 +111,7 @@Constant | |
|
+end(s) | Random Access Iterator | @@ -119,27 +119,27 @@Constant | |
|
+at<N>(s) | Any type | Constant | |
|
+at<N>(s) = o | Any type |
-s
- is mutable and e = o ,
- where e is the first
+s
+ is mutable and e = o,
+ where e is the first
element in the sequence, is a valid expression. |
Constant |
result_of::begin
<S>::type
result_of::end
<S>::type
result_of::at
<S, N>::type
result_of::value_at
<S, N>::type
-
returns the actual type returned by
- result_of::at
<S, N>
. In
+ at
<N>(s) result_of::at<S, N> returns the actual type returned by
+ at<N>(s). In
most cases, this is a reference. Hence, there is no way to know the exact
- element type using
.The element at result_of::at
<S, N>N
+ element type using result_of::at<S, N>.The element at N
may actually be a reference to begin with. For this purpose, you can use
-
.
+ result_of::value_at<S, N>.
result_of::value_at
<S, N>
at
<N>(s)
at
.std::pair
boost::array
vector
iterator_range
+iterator_range
(where adapted sequence is a Random Access Sequence)
transform_view
+transform_view
(where adapted sequence is a Random Access Sequence)
reverse_view
Car |
+Car | Head type | ||
Cdr |
+Cdr | Tail type | -nil |
+nil |
nil()
C()
C(car)
car
head
+ a cons with car head
and default constructed tail.C(car,
- cdr)
car
head
- and cdr
tail.C(s)
s
.l =
- s
l
, from
+ to a cons, l, from
a Forward
- Sequence, s
.at
<N>(l)
at
.
-
is
+ at
<N>(l) at<N>(l) is
provided for convenience and compatibility with the original Boost.Tuple
- library, despite
cons
being
+ library, despite cons being
a Forward Sequence
- only (at
is supposed to
+ only (at is supposed to
be a Random
- Access Sequence requirement). The runtime complexity of at
is constant (see Recursive
+ Access Sequence requirement). The runtime complexity of at is constant (see Recursive
Inlined Functions).
cons<int, cons<float> > l(12, cons<float>(5.5f)); -std::cout <<at
<0>(l) << std::endl; -std::cout <<at
<1>(l) << std::endl; +std::cout << at<0>(l) << std::endl; +std::cout << at<1>(l) << std::endl;
-T0 ...TN
+T0...TN
|
Element types | unspecified-type |
L()
L(e0, e1,...
- en)
e0
...en
.L(s)
s
.l =
- s
l
, from
+ to a list, l, from
a Forward
- Sequence, s
.at
<N>(l)
at
.
-
is
+ at
<n>(l) at<n>(l) is
provided for convenience and compatibility with the original Boost.Tuple
- library, despite
list
being
+ library, despite list being
a Forward Sequence
- only (at
is supposed to be a at is supposed to be a Random
- Access Sequence requirement). The runtime complexity of at
is constant (see Recursive
+ Access Sequence requirement). The runtime complexity of at is constant (see Recursive
Inlined Functions).
list<int, float> l(12, 5.5f); -std::cout <<at
<0>(l) << std::endl; -std::cout <<at
<1>(l) << std::endl; +std::cout << at<0>(l) << std::endl; +std::cout << at<1>(l) << std::endl;
-T0 ...TN
+T0...TN
|
Element types | unspecified-type |
Notation
M
map
type
+ A map type
m
map
+ An instance of map
e0
...en
fusion::pair
)
+ Heterogeneous key/value pairs (see fusion::pair)
s
M()
M(e0, e1,...
- en)
e0
...en
.M(s)
s
.m =
- s
m
, from
+ to a map, m, from
a Forward
- Sequence s
.typedef map< -pair
<int, char> - ,pair
<double, std::string> > + pair<int, char> + , pair<double, std::string> > map_type; map_type m( -make_pair
<int>('X') - ,make_pair
<double>("Men")); + make_pair<int>('X') + , make_pair<double>("Men")); -std::cout <<at
<int>(m) << std::endl; -std::cout <<at
<double>(m) << std::endl; +std::cout << at<int>(m) << std::endl; +std::cout << at<double>(m) << std::endl;
-T0 ...TN
+T0...TN
|
Element types | unspecified-type |
Notation
S
set
type
+ A set type
s
set
+ An instance of set
e0
...en
fs
S()
S(e0, e1,...
- en)
e0
...en
.S(fs)
fs
.s =
- fs
s
, from
+ to a set, s, from
a Forward
- Sequence fs
.typedef set<int, float> S; S s(12, 5.5f); -std::cout <<at_key
<int>(s) << std::endl; -std::cout <<at_key
<float>(s) << std::endl; -std::cout <<result_of::has_key
<S, double>::value << std::endl; +std::cout << at_key<int>(s) << std::endl; +std::cout << at_key<float>(s) << std::endl; +std::cout << result_of::has_key<S, double>::value << std::endl;
-T0 ...TN
+T0...TN
|
Element types | unspecified |
V()
V(e0, e1,...
- en)
e0
...en
.V(s)
s
.v =
- s
v
, from
+ to a vector, v, from
a Forward
- Sequence, s
.vector<int, float> v(12, 5.5f); -std::cout <<at_c
<0>(v) << std::endl; -std::cout <<at_c
<1>(v) << std::endl; +std::cout << at_c<0>(v) << std::endl; +std::cout << at_c<1>(v) << std::endl;
Description | |||
---|---|---|---|
seq |
+seq | An instance of Sequence | The sequence to convert. |
- Return type: result_of::as_list
<Sequence>::type
+ Return type: result_of::as_list<Sequence>::type
- Semantics: Convert a fusion sequence,
- seq
, to a list
.
+ Semantics: Convert a fusion sequence,
+ seq, to a list.
#include <boost/fusion/sequence/conversion/as_list.hpp>
-as_list(make_vector
('x', 123, "hello"))
+as_list(make_vector('x', 123, "hello"))
Description | |||
---|---|---|---|
seq |
+seq | An instance of Sequence | The sequence to convert. |
- Return type: result_of::as_map
<Sequence>::type
+ Return type: result_of::as_map<Sequence>::type
- Semantics: Convert a fusion sequence,
- seq
, to a map
.
+ Semantics: Convert a fusion sequence,
+ seq, to a map.
- Precondition: The elements of the sequence
+ Precondition: The elements of the sequence
are assumed to be __fusionpair_s.
- There may be no duplicate fusion::pair
key types.
+ There may be no duplicate fusion::pair key types.
#include <boost/fusion/sequence/conversion/as_map.hpp>
-as_map(make_vector
( -make_pair
<int>('X') - ,make_pair
<double>("Men"))) +as_map(make_vector( + make_pair<int>('X') + , make_pair<double>("Men")))
Description | |||
---|---|---|---|
seq |
+seq | An instance of Sequence | The sequence to convert. |
- Return type: result_of::as_set
<Sequence>::type
+ Return type: result_of::as_set<Sequence>::type
- Semantics: Convert a fusion sequence,
- seq
, to a set
.
+ Semantics: Convert a fusion sequence,
+ seq, to a set.
- Precondition: There may be no duplicate + Precondition: There may be no duplicate key types.
#include <boost/fusion/sequence/conversion/as_set.hpp>
-as_set(make_vector
('x', 123, "hello"))
+as_set(make_vector('x', 123, "hello"))
Description | |||
---|---|---|---|
seq |
+seq | An instance of Sequence | The sequence to convert. |
- Return type: result_of::as_vector
<Sequence>::type
+ Return type: result_of::as_vector<Sequence>::type
- Semantics: Convert a fusion sequence,
- seq
, to a vector
.
+ Semantics: Convert a fusion sequence,
+ seq, to a vector.
#include <boost/fusion/sequence/conversion/as_vector.hpp>
-as_vector(make_list
('x', 123, "hello"))
+as_vector(make_list('x', 123, "hello"))
Description | ||
---|---|---|
Sequence |
+Sequence | A fusion Sequence | @@ -65,7 +65,7 @@
- Return type: A list
with same elements as the
- input sequence, Sequence
.
+ Return type: A list with same elements as the
+ input sequence, Sequence.
- Semantics: Convert a fusion sequence,
- Sequence
, to a list
.
+ Semantics: Convert a fusion sequence,
+ Sequence, to a list.
#include <boost/fusion/sequence/conversion/as_list.hpp>
-result_of::as_list<vector
<char, int> >::type
+result_of::as_list<vector<char, int> >::type
Description | ||
---|---|---|
Sequence |
+Sequence | A fusion Sequence | @@ -65,7 +65,7 @@
- Return type: A map
with same elements as the
- input sequence, Sequence
.
+ Return type: A map with same elements as the
+ input sequence, Sequence.
- Semantics: Convert a fusion sequence,
- Sequence
, to a map
.
+ Semantics: Convert a fusion sequence,
+ Sequence, to a map.
- Precondition: The elements of the sequence
+ Precondition: The elements of the sequence
are assumed to be __fusionpair_s.
- There may be no duplicate fusion::pair
key types.
+ There may be no duplicate fusion::pair key types.
#include <boost/fusion/sequence/conversion/as_map.hpp>
-result_of::as_map<vector
< -fusion::pair
<int, char> - ,fusion::pair
<double, std::string> > >::type +result_of::as_map<vector< + fusion::pair<int, char> + , fusion::pair<double, std::string> > >::type
Description | ||
---|---|---|
Sequence |
+Sequence | A fusion Sequence | @@ -65,7 +65,7 @@
- Return type: A set
with same elements as the
- input sequence, Sequence
.
+ Return type: A set with same elements as the
+ input sequence, Sequence.
- Semantics: Convert a fusion sequence,
- Sequence
, to a set
.
+ Semantics: Convert a fusion sequence,
+ Sequence, to a set.
- Precondition: There may be no duplicate + Precondition: There may be no duplicate key types.
#include <boost/fusion/sequence/conversion/as_set.hpp>
-result_of::as_set<vector
<char, int> >::type
+result_of::as_set<vector<char, int> >::type
Description | ||
---|---|---|
Sequence |
+Sequence | A fusion Sequence | @@ -65,7 +65,7 @@
- Return type: A vector
with same elements as
- the input sequence, Sequence
.
+ Return type: A vector with same elements as
+ the input sequence, Sequence.
- Semantics: Convert a fusion sequence,
- Sequence
, to a vector
.
+ Semantics: Convert a fusion sequence,
+ Sequence, to a vector.
#include <boost/fusion/sequence/conversion/as_vector.hpp>
-result_of::as_vector<list
<char, int> >::type
+result_of::as_vector<list<char, int> >::type
Description | |||
---|---|---|---|
x0,
+ |
Instances
- of T0,
+ of T0,
T1,...
- TN
+ TN
|
The
- arguments to list_tie
+ arguments to list_tie
|
- 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.
#include <boost/fusion/sequence/generation/list_tie.hpp>
diff --git a/doc/html/fusion/sequences/generation/functions/make_cons.html b/doc/html/fusion/sequences/generation/functions/make_cons.html index 8b1759d4..509d1f7a 100644 --- a/doc/html/fusion/sequences/generation/functions/make_cons.html +++ b/doc/html/fusion/sequences/generation/functions/make_cons.html @@ -3,7 +3,7 @@make_cons - + @@ -26,29 +26,29 @@- + Description
- Create a
cons
fromcar
- (head) and optionalcdr
+ Create a cons from car + (head) and optional cdr (tail).- + Synopsis
template <typename Car> -typenameresult_of::make_cons
<Car>::type +typename result_of::make_cons<Car>::type make_cons(Car const& car); template <typename Car, typename Cdr> -typenameresult_of::make_cons
<Car, Cdr>::type +typename result_of::make_cons<Car, Cdr>::type make_cons(Car const& car, Cdr const& cdr);- + Parameters
@@ -64,17 +64,17 @@
- + car
car Instance - of Car
+ of CarThe list's head - + cdr
cdr Instance - of Cdr
+ of CdrThe list's tail (optional) @@ -82,7 +82,7 @@- + Expression Semantics
@@ -90,34 +90,34 @@ make_cons(car, cdr);
- Return type: result_of::make_cons
<Car, Cdr>::type
or result_of::make_cons
<Car>::type
+ Return type: result_of::make_cons<Car, Cdr>::type or result_of::make_cons<Car>::type
- Semantics: Create a cons
from car
- (head) and optional cdr
+ Semantics: Create a cons from car
+ (head) and optional cdr
(tail).
#include <boost/fusion/sequence/generation/make_cons.hpp>
make_cons('x', make_cons(123))
- boost::ref
+ boost::ref
Description | |||
---|---|---|---|
x0,
+ |
Instances
- of T0,
+ of T0,
T1,...
- TN
+ TN
|
The
- arguments to make_list
+ arguments to make_list
|
- Return type: result_of::make_list
<T0, T1,... TN>::type
+ Return type: result_of::make_list<T0, T1,... TN>::type
- Semantics: Create a list
from x0, x1,... xN
.
+ Semantics: Create a list from x0, x1,... xN.
#include <boost/fusion/sequence/generation/make_list.hpp>
make_list(123, "hello", 12.5)
- boost::ref
+ boost::ref
K0,
+ |
The key types | -Keys associated with x0, x1,... xN
+ | Keys associated with x0, x1,... xN | |
x0,
+ |
Instances
- of T0,
+ of T0,
T1,...
- TN
+ TN
|
The
- arguments to make_map
+ arguments to make_map
|
- Return type: result_of::make_map
<K0, K0,... KN, T0, T1,... TN>::type
+ Return type: result_of::make_map<K0, K0,... KN, T0, T1,... TN>::type
- Semantics: Create a map
from K0, K1,... KN
- keys and x0,
+ Semantics: Create a map from K0, K1,... KN
+ keys and x0,
x1,...
- xN
data.
+ xN data.
- Precondition: There may be no duplicate + Precondition: There may be no duplicate key types.
#include <boost/fusion/sequence/generation/make_map.hpp>
make_map( -make_pair
<int>('X') - ,make_pair
<double>("Men")) + make_pair<int>('X') + , make_pair<double>("Men"))
- boost::ref
,
- fusion::pair
+ boost::ref,
+ fusion::pair
- Create a set
from one or more values.
+ Create a set from one or more values.
template <typename T0, typename T1,... typename TN>
-typename result_of::make_set
<T0, T1,... TN>::type
+typename result_of::make_set<T0, T1,... TN>::type
make_set(T0 const& x0, T1 const& x1... TN const& xN);
- The variadic function accepts 0
- to FUSION_MAX_VECTOR_SIZE
- [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
+ The variadic function accepts 0
+ to FUSION_MAX_VECTOR_SIZE
+ [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
before including any Fusion header to change the default. Example:
#define FUSION_MAX_VECTOR_SIZE 20
Description | |||
---|---|---|---|
x0,
+ |
Instances
- of T0,
+ of T0,
T1,...
- TN
+ TN
|
The
- arguments to make_set
+ arguments to make_set
|
- Return type: result_of::make_set
<T0, T1,... TN>::type
+ Return type: result_of::make_set<T0, T1,... TN>::type
- Semantics: Create a set
from x0, x1,... xN
.
+ Semantics: Create a set from x0, x1,... xN.
- Precondition: There may be no duplicate + Precondition: There may be no duplicate key types.
#include <boost/fusion/sequence/generation/make_set.hpp>
make_set(123, "hello", 12.5)
- boost::ref
+ boost::ref
- Create a vector
from one or more values.
+ Create a vector from one or more values.
template <typename T0, typename T1,... typename TN>
-typename result_of::make_vector
<T0, T1,... TN>::type
+typename result_of::make_vector<T0, T1,... TN>::type
make_vector(T0 const& x0, T1 const& x1... TN const& xN);
- The variadic function accepts 0
- to FUSION_MAX_VECTOR_SIZE
- elements, where FUSION_MAX_VECTOR_SIZE
- is a user definable predefined maximum that defaults to 10
. You may define the preprocessor constant
- FUSION_MAX_VECTOR_SIZE
+ The variadic function accepts 0
+ to FUSION_MAX_VECTOR_SIZE
+ elements, where FUSION_MAX_VECTOR_SIZE
+ is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant
+ FUSION_MAX_VECTOR_SIZE
before including any Fusion header to change the default. Example:
#define FUSION_MAX_VECTOR_SIZE 20
Description | |||
---|---|---|---|
x0,
+ |
Instances
- of T0,
+ of T0,
T1,...
- TN
+ TN
|
The
- arguments to make_vector
+ arguments to make_vector
|
- Return type: result_of::make_vector
<T0, T1,... TN>::type
+ Return type: result_of::make_vector<T0, T1,... TN>::type
- Semantics: Create a vector
from x0, x1,... xN
.
+ Semantics: Create a vector from x0, x1,... xN.
#include <boost/fusion/sequence/generation/make_vector.hpp>
make_vector(123, "hello", 12.5)
- boost::ref
+ boost::ref
Description | |||
---|---|---|---|
x0,
+ |
Instances
- of T0,
+ of T0,
T1,...
- TN
+ TN
|
The
- arguments to vector_tie
+ arguments to vector_tie
|
- 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.
#include <boost/fusion/sequence/generation/vector_tie.hpp>
diff --git a/doc/html/fusion/sequences/generation/metafunctions.html b/doc/html/fusion/sequences/generation/metafunctions.html index c5cc4937..3143a7b0 100644 --- a/doc/html/fusion/sequences/generation/metafunctions.html +++ b/doc/html/fusion/sequences/generation/metafunctions.html @@ -3,7 +3,7 @@MetaFunctions - + diff --git a/doc/html/fusion/sequences/generation/metafunctions/list_tie.html b/doc/html/fusion/sequences/generation/metafunctions/list_tie.html index 003e5ede..09a5b912 100644 --- a/doc/html/fusion/sequences/generation/metafunctions/list_tie.html +++ b/doc/html/fusion/sequences/generation/metafunctions/list_tie.html @@ -3,7 +3,7 @@list_tie - + @@ -26,14 +26,14 @@- + Description
- Returns the result type of
list_tie
. + Returns the result type of list_tie.- + Synopsis
@@ -41,18 +41,18 @@ struct list_tie;- The variadic function accepts
0
- toFUSION_MAX_LIST_SIZE
- elements, whereFUSION_MAX_LIST_SIZE
- is a user definable predefined maximum that defaults to10
. You may define the preprocessor constant -FUSION_MAX_LIST_SIZE
+ The variadic function accepts 0 + to FUSION_MAX_LIST_SIZE + elements, where FUSION_MAX_LIST_SIZE + is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant + FUSION_MAX_LIST_SIZE before including any Fusion header to change the default. Example:#define FUSION_MAX_LIST_SIZE 20- + Parameters
@@ -67,17 +67,17 @@
Description - T0, +
T0, T1,... - TN + TNAny type -The arguments to list_tie
+The arguments to list_tie - + Expression Semantics
@@ -85,21 +85,21 @@ 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.
#include <boost/fusion/sequence/generation/list_tie.hpp>
diff --git a/doc/html/fusion/sequences/generation/metafunctions/make_cons.html b/doc/html/fusion/sequences/generation/metafunctions/make_cons.html index e7e9865d..e8c27aac 100644 --- a/doc/html/fusion/sequences/generation/metafunctions/make_cons.html +++ b/doc/html/fusion/sequences/generation/metafunctions/make_cons.html @@ -3,7 +3,7 @@make_cons - + @@ -26,14 +26,14 @@- + Description
- Returns the result type of
make_cons
. + Returns the result type of make_cons.- + Synopsis
@@ -41,7 +41,7 @@ struct make_cons;- + Parameters
@@ -57,15 +57,15 @@
- + Car
Car Any type The list's head type - + Cdr
Cdr A - cons
+ consThe list's tail type (optional) @@ -73,7 +73,7 @@- + Expression Semantics
@@ -81,24 +81,24 @@ 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
.
+ conversion, and tail, Cdr.
- Semantics: Create a cons
from Car
- (head) and optional Cdr
+ Semantics: Create a cons from Car
+ (head) and optional Cdr
(tail).
#include <boost/fusion/sequence/generation/make_cons.hpp>
diff --git a/doc/html/fusion/sequences/generation/metafunctions/make_list.html b/doc/html/fusion/sequences/generation/metafunctions/make_list.html index bc2b6d5c..4f6024e6 100644 --- a/doc/html/fusion/sequences/generation/metafunctions/make_list.html +++ b/doc/html/fusion/sequences/generation/metafunctions/make_list.html @@ -3,7 +3,7 @@make_list - + @@ -26,14 +26,14 @@- + Description
- Returns the result type of
make_list
. + Returns the result type of make_list.- + Synopsis
@@ -41,18 +41,18 @@ struct make_list;- The variadic function accepts
0
- toFUSION_MAX_LIST_SIZE
- elements, whereFUSION_MAX_LIST_SIZE
- is a user definable predefined maximum that defaults to10
. You may define the preprocessor constant -FUSION_MAX_LIST_SIZE
+ The variadic function accepts 0 + to FUSION_MAX_LIST_SIZE + elements, where FUSION_MAX_LIST_SIZE + is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant + FUSION_MAX_LIST_SIZE before including any Fusion header to change the default. Example:#define FUSION_MAX_LIST_SIZE 20- + Parameters
@@ -67,17 +67,17 @@
Description - T0, +
T0, T1,... - TN + TNAny type -Template arguments to make_list
+Template arguments to make_list - + Expression Semantics
@@ -85,22 +85,22 @@ 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.
#include <boost/fusion/sequence/generation/make_list.hpp>
diff --git a/doc/html/fusion/sequences/generation/metafunctions/make_map.html b/doc/html/fusion/sequences/generation/metafunctions/make_map.html index 881dd3f4..d1afd7b8 100644 --- a/doc/html/fusion/sequences/generation/metafunctions/make_map.html +++ b/doc/html/fusion/sequences/generation/metafunctions/make_map.html @@ -3,7 +3,7 @@make_map - + @@ -26,14 +26,14 @@- + Description
- Returns the result type of
make_map
. + Returns the result type of make_map.- + Synopsis
@@ -43,19 +43,19 @@ struct make_map;- The variadic function accepts
0
- toFUSION_MAX_VECTOR_SIZE
- [13] - elements, whereFUSION_MAX_VECTOR_SIZE
- is a user definable predefined maximum that defaults to10
. You may define the preprocessor constant -FUSION_MAX_VECTOR_SIZE
+ The variadic function accepts 0 + to FUSION_MAX_VECTOR_SIZE + [13] + elements, where FUSION_MAX_VECTOR_SIZE + is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant + FUSION_MAX_VECTOR_SIZE before including any Fusion header to change the default. Example:#define FUSION_MAX_VECTOR_SIZE 20- + Parameters
@@ -71,27 +71,27 @@
- K0, +
K0, K1,... - KN + KNAny type -Keys associated with T0, T1,... TN
+Keys associated with T0, T1,... TN - T0, +
T0, T1,... - TN + TNAny type -Data associated with keys K0, K1,... KN
+Data associated with keys K0, K1,... KN - + Expression Semantics
@@ -99,44 +99,44 @@ resulf_of::make_map<K0, K1,... KN, T0, T1,... TN>::type;
- Return type: result_of::make_map
<K0, K0,... KN, T0, T1,... TN>::type
+ Return type: result_of::make_map<K0, K0,... KN, T0, T1,... TN>::type
- Semantics: A map
with fusion::pair
elements where the second_type
is converted following
+ Semantics: A map with fusion::pair elements where the second_type is converted following
the rules for element
conversion.
- Precondition: There may be no duplicate + Precondition: There may be no duplicate key types.
#include <boost/fusion/sequence/generation/make_map.hpp>
result_of::make_map<int, double, char, double>::type
- Returns the result type of make_set
.
+ Returns the result type of make_set.
@@ -41,19 +41,19 @@ struct make_set;
- The variadic function accepts 0
- to FUSION_MAX_VECTOR_SIZE
- [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
+ The variadic function accepts 0
+ to FUSION_MAX_VECTOR_SIZE
+ [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
before including any Fusion header to change the default. Example:
#define FUSION_MAX_VECTOR_SIZE 20
Description | ||||
---|---|---|---|---|
T0,
+ |
Any type | -The arguments to make_set
+ | The arguments to make_set |
- 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 + Precondition: There may be no duplicate key types.
#include <boost/fusion/sequence/generation/make_set.hpp>
@@ -113,9 +113,9 @@
- Returns the result type of make_vector
.
+ Returns the result type of make_vector.
@@ -41,18 +41,18 @@ struct make_vector;
- The variadic function accepts 0
- to FUSION_MAX_VECTOR_SIZE
- elements, where FUSION_MAX_VECTOR_SIZE
- is a user definable predefined maximum that defaults to 10
. You may define the preprocessor constant
- FUSION_MAX_VECTOR_SIZE
+ The variadic function accepts 0
+ to FUSION_MAX_VECTOR_SIZE
+ elements, where FUSION_MAX_VECTOR_SIZE
+ is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant
+ FUSION_MAX_VECTOR_SIZE
before including any Fusion header to change the default. Example:
#define FUSION_MAX_VECTOR_SIZE 20
Description | ||||
---|---|---|---|---|
T0,
+ |
Any type | -Template arguments to make_vector
+ | Template arguments to make_vector |
- 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.
#include <boost/fusion/sequence/generation/make_list.hpp>
diff --git a/doc/html/fusion/sequences/generation/metafunctions/vector_tie.html b/doc/html/fusion/sequences/generation/metafunctions/vector_tie.html index b914d310..e310bfac 100644 --- a/doc/html/fusion/sequences/generation/metafunctions/vector_tie.html +++ b/doc/html/fusion/sequences/generation/metafunctions/vector_tie.html @@ -3,7 +3,7 @@vector_tie - + @@ -26,14 +26,14 @@- + Description
- Returns the result type of
vector_tie
. + Returns the result type of vector_tie.- + Synopsis
@@ -41,18 +41,18 @@ struct vector_tie;- The variadic function accepts
0
- toFUSION_MAX_VECTOR_SIZE
- elements, whereFUSION_MAX_VECTOR_SIZE
- is a user definable predefined maximum that defaults to10
. You may define the preprocessor constant -FUSION_MAX_VECTOR_SIZE
+ The variadic function accepts 0 + to FUSION_MAX_VECTOR_SIZE + elements, where FUSION_MAX_VECTOR_SIZE + is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant + FUSION_MAX_VECTOR_SIZE before including any Fusion header to change the default. Example:#define FUSION_MAX_VECTOR_SIZE 20- + Parameters
@@ -67,17 +67,17 @@
Description - T0, +
T0, T1,... - TN + TNAny type -The arguments to vector_tie
+The arguments to vector_tie - + Expression Semantics
@@ -85,21 +85,21 @@ 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.
#include <boost/fusion/sequence/generation/vector_tie.hpp>
diff --git a/doc/html/fusion/sequences/intrinsics.html b/doc/html/fusion/sequences/intrinsics.html index d9e91e0f..bb758b81 100644 --- a/doc/html/fusion/sequences/intrinsics.html +++ b/doc/html/fusion/sequences/intrinsics.html @@ -3,7 +3,7 @@Intrinsics - + @@ -36,11 +36,11 @@ Intrinsic functions, unlike Algorithms, are not generic across the full Sequence repertoire. They need to be implemented for each Fusion Sequence - [5] + [5] .- + Header
@@ -48,7 +48,7 @@diff --git a/doc/html/fusion/sequences/intrinsics/functions/at_key.html b/doc/html/fusion/sequences/intrinsics/functions/at_key.html index 5053a3e4..d534ed7c 100644 --- a/doc/html/fusion/sequences/intrinsics/functions/at_key.html +++ b/doc/html/fusion/sequences/intrinsics/functions/at_key.html @@ -3,7 +3,7 @@
-diff --git a/doc/html/fusion/sequences/intrinsics/functions/at_c.html b/doc/html/fusion/sequences/intrinsics/functions/at_c.html index 4a3b3dbd..93434c67 100644 --- a/doc/html/fusion/sequences/intrinsics/functions/at_c.html +++ b/doc/html/fusion/sequences/intrinsics/functions/at_c.html @@ -3,7 +3,7 @@[5] +
diff --git a/doc/html/fusion/sequences/intrinsics/functions.html b/doc/html/fusion/sequences/intrinsics/functions.html index 640d4768..37df07d8 100644 --- a/doc/html/fusion/sequences/intrinsics/functions.html +++ b/doc/html/fusion/sequences/intrinsics/functions.html @@ -3,7 +3,7 @@[5] In practice, many of intrinsic functions have default implementations that will work in majority of cases
Functions - + diff --git a/doc/html/fusion/sequences/intrinsics/functions/at.html b/doc/html/fusion/sequences/intrinsics/functions/at.html index 5c737b51..7123339a 100644 --- a/doc/html/fusion/sequences/intrinsics/functions/at.html +++ b/doc/html/fusion/sequences/intrinsics/functions/at.html @@ -3,7 +3,7 @@at - + @@ -26,27 +26,27 @@- + Description
Returns the N-th element from the beginning of the sequence.
- + Synopsis
template <typename N, typename Sequence> -typenameresult_of::at
<Sequence, N>::type +typename result_of::at<Sequence, N>::type at(Sequence& seq); template <typename N, typename Sequence> -typenameresult_of::at
<Sequence const, N>::type +typename result_of::at<Sequence const, N>::type at(Sequence const& seq);- + Parameters
@@ -62,7 +62,7 @@
- + seq
seq Model of Random @@ -71,7 +71,7 @@ The sequence we wish to investigate. - + N
N An MPL integral constant @@ -81,7 +81,7 @@- + Expression Semantics
@@ -89,38 +89,38 @@ at<N>(seq);- Return type: Returns a reference to - the N-th element from the beginning of the sequence
seq
- ifseq
is mutable and -e = - o
, wheree
+ 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 <
+ Precondition: 0 + <= N::value < size(s)size
(s)- Semantics: Equivalent to + Semantics: Equivalent to
-deref
(advance
<N>(begin
(s))) +deref(advance<N>(begin(s)))- + Header
#include <boost/fusion/sequence/intrinsic/at.hpp>- + Example
-vector
<int, int, int> v(1, 2, 3); +vector<int, int, int> v(1, 2, 3); assert(at<mpl::int_<1> >(v) == 2);at_c - + @@ -26,27 +26,27 @@- + Description
Returns the N-th element from the beginning of the sequence.
- + Synopsis
template <int N, typename Sequence> -typenameresult_of::at_c
<Sequence, N>::type +typename result_of::at_c<Sequence, N>::type at_c(Sequence& seq); template <int N, typename Sequence> -typenameresult_of::at_c
<Sequence const, N>::type +typename result_of::at_c<Sequence const, N>::type at_c(Sequence const& seq);- + Parameters
@@ -62,7 +62,7 @@
- + seq
seq Model of Random @@ -71,7 +71,7 @@ The sequence we wish to investigate. - + N
N An integral constant An index from the beginning of @@ -80,7 +80,7 @@ - + Expression Semantics
@@ -88,39 +88,39 @@ at_c<N>(seq);- Return type: Returns a reference to - the N-th element from the beginning of the sequence
seq
- ifseq
is mutable and -e = - o
, wheree
+ Return type: Returns a reference to + the N-th element from the beginning of the sequence seq + if seq is mutable and + e = + o, where e is the N-th element from the beginning of the sequence, is a valid expression. Else, returns a type convertable to the N-th element from the beginning of the sequence.- Precondition:
0 + Precondition: 0 <= N - <
+ < size(s)size
(s)- Semantics: Equivalent to + Semantics: Equivalent to
-deref
(advance
<N>(begin
(s))) +deref(advance<N>(begin(s)))- + Header
#include <boost/fusion/sequence/intrinsic/at_c.hpp>- + Example
-vector
<int, int, int> v(1, 2, 3); +vector<int, int, int> v(1, 2, 3); assert(at_c<1>(v) == 2);at_key - + @@ -26,27 +26,27 @@- + Description
Returns the element associated with a Key from the sequence.
- + Synopsis
template <typename Key, typename Sequence> -typenameresult_of::at_key
<Sequence, Key>::type +typename result_of::at_key<Sequence, Key>::type at_key(Sequence& seq); template <typename Key, typename Sequence> -typenameresult_of::at_key
<Sequence const, Key>::type +typename result_of::at_key<Sequence const, Key>::type at_key(Sequence const& seq);- + Parameters
@@ -62,7 +62,7 @@
- + seq
seq Model of Associative @@ -71,7 +71,7 @@ The sequence we wish to investigate. - + Key
Key Any type The queried key. @@ -79,7 +79,7 @@- + Expression Semantics
@@ -87,34 +87,34 @@ at_key<Key>(seq);
- Return type: Returns a reference to
- the element associated with Key from the sequence seq
- if seq
is mutable and
- e =
- o
, where e
+ Return type: Returns a reference to
+ the element associated with Key from the sequence seq
+ if seq is mutable and
+ e =
+ o, where e
is the element associated with Key, is a valid expression. Else, returns
a type convertable to the element associated with Key.
- Precondition: has_key<Key>(seq) == true
+ Precondition: has_key<Key>(seq) == true
- Semantics: Returns the element associated + Semantics: Returns the element associated with Key.
#include <boost/fusion/sequence/intrinsic/at_key.hpp>
-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/sequences/intrinsics/functions/back.html
index b9cce96d..31022b75 100644
--- a/doc/html/fusion/sequences/intrinsics/functions/back.html
+++ b/doc/html/fusion/sequences/intrinsics/functions/back.html
@@ -3,7 +3,7 @@
Returns the last element in the sequence.
template <typename Sequence> -typenameresult_of::back
<Sequence>::type +typename result_of::back<Sequence>::type back(Sequence& seq); template <typename Sequence> -typenameresult_of::back
<Sequence const>::type +typename result_of::back<Sequence const>::type back(Sequence const& seq);
Description | ||
---|---|---|
seq |
+seq | Model of Bidirectional @@ -71,7 +71,7 @@ |
- Return type: Returns a reference to
- the last element in the sequence seq
- if seq
is mutable and
- e =
- o
, where e
+ Return type: Returns a reference to
+ the last element in the sequence seq
+ if seq is mutable and
+ e =
+ o, where e
is the last element in the sequence, is a valid expression. Else, returns
a type convertable to the last element in the sequence.
- Precondition:
+ Precondition: empty(seq) == false
empty
(seq) == false
- Semantics: Returns the last element + Semantics: Returns the last element in the sequence.
#include <boost/fusion/sequence/intrinsic/back.hpp>
-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/sequences/intrinsics/functions/begin.html
index 4b5ca969..2a42fb86 100644
--- a/doc/html/fusion/sequences/intrinsics/functions/begin.html
+++ b/doc/html/fusion/sequences/intrinsics/functions/begin.html
@@ -3,7 +3,7 @@
Returns an iterator pointing to the first element in the sequence.
template <typename Sequence> -typenameresult_of::begin
<Sequence>::type +typename result_of::begin<Sequence>::type begin(Sequence& seq); template <typename Sequence> -typenameresult_of::begin
<Sequence const>::type +typename result_of::begin<Sequence const>::type begin(Sequence const& seq);
Description | ||
---|---|---|
seq |
+seq | Model of Forward @@ -72,7 +72,7 @@ |
- Return type: Return type: Forward
- Iterator if seq
+ Iterator if seq
is a Forward
Sequence else, Bidirectional
- Iterator if seq
+ Iterator if seq
is a Bidirectional
Sequence else, Random
- Access Iterator if seq
+ Access Iterator if seq
is a Random
Access Sequence.
- Semantics: Returns an iterator pointing + Semantics: Returns an iterator pointing to the first element in the sequence.
#include <boost/fusion/sequence/intrinsic/begin.hpp>
-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);
Description | ||
---|---|---|
seq |
+seq | Model of Forward @@ -69,7 +69,7 @@ |
- Return type: Convertible to bool
.
+ Return type: Convertible to bool.
- Semantics: Evaluates to true
if the sequence is empty, else, evaluates
- to false
.
+ Semantics: Evaluates to true if the sequence is empty, else, evaluates
+ to false.
#include <boost/fusion/sequence/intrinsic/empty.hpp>
-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/sequences/intrinsics/functions/end.html
index 160f93ac..b5d4fa03 100644
--- a/doc/html/fusion/sequences/intrinsics/functions/end.html
+++ b/doc/html/fusion/sequences/intrinsics/functions/end.html
@@ -3,7 +3,7 @@
Returns an iterator pointing to one element past the end of the sequence.
template <typename Sequence> -typenameresult_of::end
<Sequence>::type +typename result_of::end<Sequence>::type end(Sequence& seq); template <typename Sequence> -typenameresult_of::end
<Sequence const>::type +typename result_of::end<Sequence const>::type end(Sequence const& seq);
Description | ||
---|---|---|
seq |
+seq | Model of Forward @@ -72,7 +72,7 @@ |
- Return type: Return type: Forward
- Iterator if seq
+ Iterator if seq
is a Forward
Sequence else, Bidirectional
- Iterator if seq
+ Iterator if seq
is a Bidirectional
Sequence else, Random
- Access Iterator if seq
+ Access Iterator if seq
is a Random
Access Sequence.
- Semantics: Returns an iterator pointing + Semantics: Returns an iterator pointing to one element past the end of the sequence.
#include <boost/fusion/sequence/intrinsic/end.hpp>
-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);
Description | ||
---|---|---|
seq |
+seq | Model of Forward @@ -71,7 +71,7 @@ |
- Return type: Returns a reference to
- the first element in the sequence seq
- if seq
is mutable and
- e =
- o
, where e
+ Return type: Returns a reference to
+ the first element in the sequence seq
+ if seq is mutable and
+ e =
+ o, where e
is the first element in the sequence, is a valid expression. Else, returns
a type convertable to the first element in the sequence.
- Precondition:
+ Precondition: empty(seq) == false
empty
(seq) == false
- Semantics: Returns the first element + Semantics: Returns the first element in the sequence.
#include <boost/fusion/sequence/intrinsic/front.hpp>
-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/sequences/intrinsics/functions/has_key.html
index 8225595b..a6563e3d 100644
--- a/doc/html/fusion/sequences/intrinsics/functions/has_key.html
+++ b/doc/html/fusion/sequences/intrinsics/functions/has_key.html
@@ -3,7 +3,7 @@
- Returns a type convertible to bool
- that evaluates to true
if
+ Returns a type convertible to bool
+ that evaluates to true if
the sequence contains an element associated with a Key, else, evaluates
- to false
.
+ to false.
template <typename Key, typename Sequence>
-typename result_of::has_key
<Sequence, Key>::type
+typename result_of::has_key<Sequence, Key>::type
has_key(Sequence const& seq);
seq |
+seq | Model of Associative @@ -70,7 +70,7 @@ | The sequence we wish to investigate. |
Key |
+Key | Any type | The queried key. | @@ -78,7 +78,7 @@
- Return type: Convertible to bool
.
+ Return type: Convertible to bool.
- Semantics: Evaluates to true
if the sequence contains an element
- associated with Key, else, evaluates to false
.
+ Semantics: Evaluates to true if the sequence contains an element
+ associated with Key, else, evaluates to false.
#include <boost/fusion/sequence/intrinsic/has_key.hpp>
-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/sequences/intrinsics/functions/size.html
index 69662615..c6d4a132 100644
--- a/doc/html/fusion/sequences/intrinsics/functions/size.html
+++ b/doc/html/fusion/sequences/intrinsics/functions/size.html
@@ -3,7 +3,7 @@
- Returns a type convertible to int
+ Returns a type convertible to int
that evaluates the number of elements in the sequence.
template <typename Sequence>
-typename result_of::size
<Sequence>::type
+typename result_of::size<Sequence>::type
size(Sequence const& seq);
Description | ||
---|---|---|
seq |
+seq | Model of Forward @@ -68,7 +68,7 @@ |
- Return type: Convertible to int
.
+ Return type: Convertible to int.
- Semantics: Returns the number of elements + Semantics: Returns the number of elements in the sequence.
#include <boost/fusion/sequence/intrinsic/size.hpp>
-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/metafunctions.html b/doc/html/fusion/sequences/intrinsics/metafunctions.html
index f7b21dc8..eafb7ed6 100644
--- a/doc/html/fusion/sequences/intrinsics/metafunctions.html
+++ b/doc/html/fusion/sequences/intrinsics/metafunctions.html
@@ -3,7 +3,7 @@
- Returns the result type of at
- [6]
+ Returns the result type of at
+ [6]
.
@@ -48,7 +48,7 @@
};
Table 1.25. Parameters
+Table 1.25. Parameters
Seq |
+Seq | A model of Forward @@ -71,7 +71,7 @@ | Argument sequence |
N |
+N | An MPL Integral Constant | Index of element | @@ -80,7 +80,7 @@
- Return type: Any type. + Return type: Any type.
- Semantics: Returns the result type of
- using at
to access the N
th element of Seq
.
+ Semantics: Returns the result type of
+ using at to access the Nth element of Seq.
#include <boost/fusion/sequence/intrinsic/at.hpp>
-typedefvector
<int,float,char> vec; -BOOST_MPL_ASSERT((boost::is_same<result_of::at
<vec, boost::mpl::int_<1> >::type, float&>)); +typedef vector<int,float,char> vec; +BOOST_MPL_ASSERT((boost::is_same<result_of::at<vec, boost::mpl::int_<1> >::type, float&>));
[6]
- result_of::at
reflects the actual return
- type of the function at
. _sequence_s
- typically return references to its elements via the at
function. If you want
- to get the actual element type, use result_of::value_at
+
[6] + result_of::at reflects the actual return + type of the function at. _sequence_s + typically return references to its elements via the at function. If you want + to get the actual element type, use result_of::value_at
- Returns the result type of at_c
- [7]
+ Returns the result type of at_c
+ [7]
.
@@ -48,7 +48,7 @@
};
Table 1.26. Parameters
+Table 1.26. Parameters
Seq |
+Seq | A model of Forward @@ -71,7 +71,7 @@ | Argument sequence |
M |
+M | Positive integer index | Index of element | @@ -80,7 +80,7 @@
- Return type: Any type + Return type: Any type
- Semantics: Returns the result type of
- using at_c
to access the M
th element of Seq
.
+ Semantics: Returns the result type of
+ using at_c to access the Mth element of Seq.
#include <boost/fusion/sequence/intrinsic/at.hpp>
-typedefvector
<int,float,char> vec; -BOOST_MPL_ASSERT((boost::is_same<result_of::at_c
<vec, 1>::type, float&>)); +typedef vector<int,float,char> vec; +BOOST_MPL_ASSERT((boost::is_same<result_of::at_c<vec, 1>::type, float&>));
[7]
- result_of::at_c
reflects the actual
- return type of the function at_c
. _sequence_s
- typically return references to its elements via the at_c
function. If you want
- to get the actual element type, use result_of::value_at_c
+
[7] + result_of::at_c reflects the actual + return type of the function at_c. _sequence_s + typically return references to its elements via the at_c function. If you want + to get the actual element type, use result_of::value_at_c
- Returns the result type of at_key
- [8]
+ Returns the result type of at_key
+ [8]
.
@@ -48,7 +48,7 @@
};
Table 1.30. Parameters
+Table 1.30. Parameters
Seq |
+Seq | A model of Forward @@ -71,7 +71,7 @@ | Argument sequence |
Key |
+Key | Any type | Key type | @@ -80,7 +80,7 @@
- Return type: Any type. + Return type: Any type.
- Semantics: Returns the result of using
- at_key
to access the element
- with key type Key
in
- Seq
.
+ Semantics: Returns the result of using
+ at_key to access the element
+ with key type Key in
+ Seq.
#include <boost/fusion/sequence/intrinsic/at_key.hpp>
-typedefmap
<pair
<int, char>,pair
<char, char>,pair
<double, char> > mymap; -BOOST_MPL_ASSERT((boost::is_same<result_of::at_key
<mymap, int>::type, char&>)); +typedef map<pair<int, char>, pair<char, char>, pair<double, char> > mymap; +BOOST_MPL_ASSERT((boost::is_same<result_of::at_key<mymap, int>::type, char&>));
[8]
- result_of::at_key
reflects the actual
- return type of the function at_key
. _sequence_s
- typically return references to its elements via the at_key
function. If you
- want to get the actual element type, use result_of::value_at_key
+
[8] + result_of::at_key reflects the actual + return type of the function at_key. _sequence_s + typically return references to its elements via the at_key function. If you + want to get the actual element type, use result_of::value_at_key
- Returns the result type of back
.
+ Returns the result type of back.
@@ -44,7 +44,7 @@
};
Table 1.23. Parameters
+Table 1.23. Parameters
Description | ||
---|---|---|
Seq |
+Seq | A model of Forward @@ -68,7 +68,7 @@ |
- Return type: Any type + Return type: Any type
- Semantics: The type returned by dereferencing
- an iterator to the last element in the sequence. Equivalent to
.
+ 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.
result_of::deref
<result_of::prior
<result_of::end
<Seq>::type>::type>::type
#include <boost/fusion/sequence/intrinsic/back.hpp>
-typedefvector
<int,char> vec; -BOOST_MPL_ASSERT((boost::is_same<result_of::back
<vec>::type, char&>)); +typedef vector<int,char> vec; +BOOST_MPL_ASSERT((boost::is_same<result_of::back<vec>::type, char&>));
Description | ||
---|---|---|
Seq |
+Seq | A model of Forward @@ -68,7 +68,7 @@ |
- Return type: An iterator modelling the
- same traversal concept as Seq
.
+ Return type: An iterator modelling the
+ same traversal concept as Seq.
- Semantics: Returns the type of an iterator
- to the first element of Seq
.
+ Semantics: Returns the type of an iterator
+ to the first element of Seq.
#include <boost/fusion/sequence/intrinsic/begin.hpp>
-typedefvector
<int> vec; -typedefresult_of::begin
<vec>::type it; -BOOST_MPL_ASSERT((boost::is_same<result_of::deref
<it>::type, int&>)) +typedef vector<int> vec; +typedef result_of::begin<vec>::type it; +BOOST_MPL_ASSERT((boost::is_same<result_of::deref<it>::type, int&>))
Description | ||
---|---|---|
Seq |
+Seq | A model of Forward @@ -68,7 +68,7 @@ |
- Return type: An MPL Integral Constant + Return type: An MPL Integral Constant
- Semantics: Returns mpl::true_
- if Seq
has zero elements,
- mpl::false_
otherwise.
+ Semantics: Returns mpl::true_
+ if Seq has zero elements,
+ mpl::false_ otherwise.
#include <boost/fusion/sequence/intrinsic/empty.hpp>
-typedefvector
<> empty_vec; -typedefvector
<int,float,char> vec; +typedef vector<> empty_vec; +typedef vector<int,float,char> vec; -BOOST_MPL_ASSERT((result_of::empty
<empty_vec>)); -BOOST_MPL_ASSERT_NOT((result_of::empty
<vec>)); +BOOST_MPL_ASSERT((result_of::empty<empty_vec>)); +BOOST_MPL_ASSERT_NOT((result_of::empty<vec>));
Description | ||
---|---|---|
Seq |
+Seq | A model of Forward @@ -68,7 +68,7 @@ |
- Return type: A model of the same traversal
- concept as Seq
.
+ Return type: A model of the same traversal
+ concept as Seq.
- Semantics: Returns the type of an iterator
- one past the end of Seq
.
+ Semantics: Returns the type of an iterator
+ one past the end of Seq.
#include <boost/fusion/sequence/intrinsic/end.hpp>
-typedefvector
<int> vec; -typedefresult_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>))
Description | ||
---|---|---|
Seq |
+Seq | A model of Forward @@ -68,7 +68,7 @@ |
- Return type: Any type + Return type: Any type
- Semantics: The type returned by dereferencing
- an iterator to the first element in Seq
.
- Equivalent to
.
+ 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.
result_of::deref
<result_of::begin
<Seq>::type>::type
#include <boost/fusion/sequence/intrinsic/front.hpp>
-typedefvector
<int,char> vec; -BOOST_MPL_ASSERT((boost::is_same<result_of::front
<vec>::type, int&>)); +typedef vector<int,char> vec; +BOOST_MPL_ASSERT((boost::is_same<result_of::front<vec>::type, int&>));
Seq |
+Seq | A model of Forward @@ -69,7 +69,7 @@ | Argument sequence |
Key |
+Key | Any type | Key type | @@ -78,7 +78,7 @@
- Return type: An MPL Integral Constant. + Return type: An MPL Integral Constant.
- Semantics: Returns mpl::true_
- if Seq
contains an element
- with key type Key
, returns
- mpl::false_
otherwise.
+ Semantics: Returns mpl::true_
+ if Seq contains an element
+ with key type Key, returns
+ mpl::false_ otherwise.
#include <boost/fusion/sequence/intrinsic/has_key.hpp>
-typedefmap
<pair
<int, char>,pair
<char, char>,pair
<double, char> > mymap; -BOOST_MPL_ASSERT((result_of::has_key
<mymap, int>)); -BOOST_MPL_ASSERT_NOT((result_of::has_key
<mymap, void*>)); +typedef map<pair<int, char>, pair<char, char>, pair<double, char> > mymap; +BOOST_MPL_ASSERT((result_of::has_key<mymap, int>)); +BOOST_MPL_ASSERT_NOT((result_of::has_key<mymap, void*>));
Description | ||
---|---|---|
Seq |
+Seq | A model of Forward @@ -68,7 +68,7 @@ |
- Return type: An MPL Integral Constant. + Return type: An MPL Integral Constant.
- Semantics: Returns the number of elements
- in Seq
.
+ Semantics: Returns the number of elements
+ in Seq.
#include <boost/fusion/sequence/intrinsic/size.hpp>
-typedefdiff --git a/doc/html/fusion/sequences/intrinsics/metafunctions/value_at.html b/doc/html/fusion/sequences/intrinsics/metafunctions/value_at.html index 1ee056b3..7791e45b 100644 --- a/doc/html/fusion/sequences/intrinsics/metafunctions/value_at.html +++ b/doc/html/fusion/sequences/intrinsics/metafunctions/value_at.html @@ -3,7 +3,7 @@vector
<int,float,char> vec; -typedefresult_of::size
<vec>::type size_mpl_integral_constant; +typedef vector<int,float,char> vec; +typedef result_of::size<vec>::type size_mpl_integral_constant; BOOST_MPL_ASSERT_RELATION(size_mpl_integral_constant::value, ==, 3);
Returns the actual type at a given index from the Sequence.
@@ -46,7 +46,7 @@
};
Table 1.27. Parameters
+Table 1.27. Parameters
Seq |
+Seq | A model of Forward @@ -69,7 +69,7 @@ | Argument sequence |
N |
+N | An MPL Integral Constant | Index of element | @@ -78,7 +78,7 @@
- Return type: Any type. + Return type: Any type.
- Semantics: Returns the actual type at
- the N
th element of Seq
.
+ Semantics: Returns the actual type at
+ the Nth element of Seq.
#include <boost/fusion/sequence/intrinsic/value_at.hpp>
-typedefvector
<int,float,char> vec; -BOOST_MPL_ASSERT((boost::is_same<result_of::value_at
<vec, boost::mpl::int_<1> >::type, float>)); +typedef vector<int,float,char> vec; +BOOST_MPL_ASSERT((boost::is_same<result_of::value_at<vec, boost::mpl::int_<1> >::type, float>));
Seq |
+Seq | A model of Forward @@ -69,7 +69,7 @@ | Argument sequence |
M |
+M | Positive integer index | Index of element | @@ -78,7 +78,7 @@
- Return type: Any type + Return type: Any type
- Semantics: Returns the actual type at
- the M
th element of Seq
.
+ Semantics: Returns the actual type at
+ the Mth element of Seq.
#include <boost/fusion/sequence/intrinsic/value_at.hpp>
-typedefvector
<int,float,char> vec; -BOOST_MPL_ASSERT((boost::is_same<result_of::value_at_c
<vec, 1>::type, float>)); +typedef vector<int,float,char> vec; +BOOST_MPL_ASSERT((boost::is_same<result_of::value_at_c<vec, 1>::type, float>));
Seq |
+Seq | A model of Forward @@ -69,7 +69,7 @@ | Argument sequence |
Key |
+Key | Any type | Key type | @@ -78,7 +78,7 @@
- Return type: Any type. + Return type: Any type.
- Semantics: Returns the actual element
- type associated with key type Key
- in Seq
.
+ Semantics: Returns the actual element
+ type associated with key type Key
+ in Seq.
#include <boost/fusion/sequence/intrinsic/value_at_key.hpp>
-typedefmap
<pair
<int, char>,pair
<char, char>,pair
<double, char> > mymap; -BOOST_MPL_ASSERT((boost::is_same<result_of::at_key
<mymap, int>::type, char>)); +typedef map<pair<int, char>, pair<char, char>, pair<double, char> > mymap; +BOOST_MPL_ASSERT((boost::is_same<result_of::at_key<mymap, int>::type, char>));
Description | ||
---|---|---|
a,
- b |
+a, + b | Instances of Sequence | @@ -68,7 +68,7 @@
- Return type: bool
+ Return type: bool
- Requirements: + Requirements:
- For each element, e1
,
- in sequence a
, and for
- each element, e2
, in
- sequence b
, a == b
is a valid expression returning a
+ For each element, e1,
+ in sequence a, and for
+ each element, e2, in
+ sequence b, a == b is a valid expression returning a
type that is convertible to bool.
@@ -93,30 +93,30 @@ compile time error.
- Semantics: + Semantics:
- For each element, e1
,
- in sequence a
, and for
- each element, e2
, in
- sequence b
, e1 == e2
returns true. For any 2 zero length
+ For each element, e1,
+ in sequence a, and for
+ each element, e2, in
+ sequence b, e1 == e2 returns true. For any 2 zero length
_sequence_s, e and f, e == f returns
true.
#include <boost/fusion/sequence/comparison/equal_to.hpp>
-diff --git a/doc/html/fusion/sequences/operators/comparison/greater_than.html b/doc/html/fusion/sequences/operators/comparison/greater_than.html index 10187349..9b78fc44 100644 --- a/doc/html/fusion/sequences/operators/comparison/greater_than.html +++ b/doc/html/fusion/sequences/operators/comparison/greater_than.html @@ -4,7 +4,7 @@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);
@@ -43,7 +43,7 @@ operator>(Seq1 const& a, Seq2 const& b);
Description | ||
---|---|---|
a,
- b |
+a, + b | Instances of Sequence | @@ -68,7 +68,7 @@
- Return type: bool
+ Return type: bool
- Requirements: + Requirements:
- For each element, e1
,
- in sequence a
, and for
- each element, e2
, in
- sequence b
, a < b
is a valid expression returning a
+ For each element, e1,
+ in sequence a, and for
+ each element, e2, in
+ sequence b, a < b is a valid expression returning a
type that is convertible to bool.
@@ -93,23 +93,23 @@ compile time error.
- Semantics: Returns b < a. + Semantics: Returns b < a.
#include <boost/fusion/sequence/comparison/less_equal.hpp>
-diff --git a/doc/html/fusion/sequences/operators/comparison/greater_than_equal.html b/doc/html/fusion/sequences/operators/comparison/greater_than_equal.html index b4cdbf9f..01d5a45a 100644 --- a/doc/html/fusion/sequences/operators/comparison/greater_than_equal.html +++ b/doc/html/fusion/sequences/operators/comparison/greater_than_equal.html @@ -4,7 +4,7 @@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);
@@ -42,7 +42,7 @@ operator>=(Seq1 const& a, Seq2 const& b);
Description | ||
---|---|---|
a,
- b |
+a, + b | Instances of Sequence | @@ -67,7 +67,7 @@
- Return type: bool
+ Return type: bool
- Requirements: + Requirements:
- For each element, e1
,
- in sequence a
, and for
- each element, e2
, in
- sequence b
, a < b
is a valid expression returning a
+ For each element, e1,
+ in sequence a, and for
+ each element, e2, in
+ sequence b, a < b is a valid expression returning a
type that is convertible to bool.
@@ -92,23 +92,23 @@ compile time error.
- Semantics: Returns !(a < b). + Semantics: Returns !(a < b).
#include <boost/fusion/sequence/comparison/greater_equal.hpp>
-diff --git a/doc/html/fusion/sequences/operators/comparison/less_than.html b/doc/html/fusion/sequences/operators/comparison/less_than.html index 299f685d..f75e097d 100644 --- a/doc/html/fusion/sequences/operators/comparison/less_than.html +++ b/doc/html/fusion/sequences/operators/comparison/less_than.html @@ -4,7 +4,7 @@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);
@@ -43,7 +43,7 @@ operator<(Seq1 const& a, Seq2 const& b);
Description | ||
---|---|---|
a,
- b |
+a, + b | Instances of Sequence | @@ -68,7 +68,7 @@
- Return type: bool
+ Return type: bool
- Requirements: + Requirements:
- For each element, e1
,
- in sequence a
, and for
- each element, e2
, in
- sequence b
, a < b
is a valid expression returning a
+ For each element, e1,
+ in sequence a, and for
+ each element, e2, in
+ sequence b, a < b is a valid expression returning a
type that is convertible to bool.
@@ -93,25 +93,25 @@ compile time error.
- Semantics: Returns the lexicographical
- comparison of between a
- and b
.
+ Semantics: Returns the lexicographical
+ comparison of between a
+ and b.
#include <boost/fusion/sequence/comparison/less.hpp>
-diff --git a/doc/html/fusion/sequences/operators/comparison/less_than_equal.html b/doc/html/fusion/sequences/operators/comparison/less_than_equal.html index a4862309..ad036f2a 100644 --- a/doc/html/fusion/sequences/operators/comparison/less_than_equal.html +++ b/doc/html/fusion/sequences/operators/comparison/less_than_equal.html @@ -4,7 +4,7 @@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);
@@ -43,7 +43,7 @@ operator<=(Seq1 const& a, Seq2 const& b);
Description | ||
---|---|---|
a,
- b |
+a, + b | Instances of Sequence | @@ -68,7 +68,7 @@
- Return type: bool
+ Return type: bool
- Requirements: + Requirements:
- For each element, e1
,
- in sequence a
, and for
- each element, e2
, in
- sequence b
, a < b
is a valid expression returning a
+ For each element, e1,
+ in sequence a, and for
+ each element, e2, in
+ sequence b, a < b is a valid expression returning a
type that is convertible to bool.
@@ -93,23 +93,23 @@ compile time error.
- Semantics: Returns !(b < a). + Semantics: Returns !(b < a).
#include <boost/fusion/sequence/comparison/less_equal.hpp>
-diff --git a/doc/html/fusion/sequences/operators/comparison/not_equal.html b/doc/html/fusion/sequences/operators/comparison/not_equal.html index a4c1e8f6..bcd67051 100644 --- a/doc/html/fusion/sequences/operators/comparison/not_equal.html +++ b/doc/html/fusion/sequences/operators/comparison/not_equal.html @@ -4,7 +4,7 @@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);
@@ -42,7 +42,7 @@ operator!=(Seq1 const& a, Seq2 const& b);
Description | ||
---|---|---|
a,
- b |
+a, + b | Instances of Sequence | @@ -67,7 +67,7 @@
- Return type: bool
+ Return type: bool
- Requirements: + Requirements:
- For each element, e1
,
- in sequence a
, and for
- each element, e2
, in
- sequence b
, a == b
is a valid expression returning a
+ For each element, e1,
+ in sequence a, and for
+ each element, e2, in
+ sequence b, a == b is a valid expression returning a
type that is convertible to bool.
@@ -92,25 +92,25 @@ compile time error.
- Semantics: + Semantics:
Returns !(a == b).
#include <boost/fusion/sequence/comparison/not_equal_to.hpp>
-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/sequences/operators/i_o.html index 60e4c2d3..9e39d5d4 100644 --- a/doc/html/fusion/sequences/operators/i_o.html +++ b/doc/html/fusion/sequences/operators/i_o.html @@ -3,7 +3,7 @@I/O - + @@ -30,25 +30,25 @@
- The I/O operators: <<
- and >>
work generically
- on all Fusion sequences. The global operator<<
has been overloaded for generic
+ 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>>
+ 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.
+ 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
<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: @@ -56,23 +56,23 @@
Manipulators
tuple_open(arg)
tuple_close(arg)
tuple_delimiter(arg)
- The argument to tuple_open
,
- tuple_close
and tuple_delimiter
may be a char
, wchar_t
,
+ The argument to tuple_open,
+ tuple_close and tuple_delimiter may be a char, wchar_t,
a C-string, or a wide C-string.
@@ -82,12 +82,12 @@ std::cout << tuple_open('[') << tuple_close(']') << tuple_delimiter(", ") << a;
- outputs the same vector
, a
+ outputs the same vector, a
as: [1.0, 2, Howdy folks!]
- The same manipulators work with operator>>
and istream
- as well. Suppose the std::cin
+ The same manipulators work with operator>> and istream
+ as well. Suppose the std::cin
stream contains the following data:
@@ -97,8 +97,8 @@ 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(':'); @@ -106,16 +106,16 @@reads the data into the _vector_s -
i
andj
. + i and j.Note that extracting _sequence_s - with
std::string
or C-style string elements does + with std::string or C-style string elements does not generally work, since the streamed Sequence representation may not be unambiguously parseable.- + Header
diff --git a/doc/html/fusion/sequences/operators/i_o/in.html b/doc/html/fusion/sequences/operators/i_o/in.html index 64e8c2f0..6920479a 100644 --- a/doc/html/fusion/sequences/operators/i_o/in.html +++ b/doc/html/fusion/sequences/operators/i_o/in.html @@ -3,7 +3,7 @@in - + @@ -26,7 +26,7 @@- + Description
@@ -34,7 +34,7 @@ stream.
- + Synopsis
@@ -43,7 +43,7 @@ operator>>(IStream& is, Sequence& seq);- + Parameters
@@ -73,7 +73,7 @@
- + Expression Semantics
@@ -81,26 +81,26 @@ is >> seq- Return type: IStream& + Return type: IStream&
- Semantics: For each element,
e
, in sequence,seq
, - callis >> - e
. + Semantics: For each element, e, in sequence, seq, + call is >> + e.- + Header
#include <boost/fusion/sequence/io/in.hpp>- + Example
-diff --git a/doc/html/fusion/sequences/operators/i_o/out.html b/doc/html/fusion/sequences/operators/i_o/out.html index b8db9e21..03cab0ab 100644 --- a/doc/html/fusion/sequences/operators/i_o/out.html +++ b/doc/html/fusion/sequences/operators/i_o/out.html @@ -3,7 +3,7 @@vector
<int, std::string, char> v; +vector<int, std::string, char> v; std::cin >> v;out - + @@ -26,7 +26,7 @@- + Description
@@ -34,7 +34,7 @@ stream.
- + Synopsis
@@ -43,7 +43,7 @@ operator<<(OStream& os, Sequence& seq);- + Parameters
@@ -73,7 +73,7 @@
- + Expression Semantics
@@ -81,26 +81,26 @@ os << seq
- Return type: OStream& + Return type: OStream&
- Semantics: For each element, e
, in sequence, seq
,
- call os <<
- e
.
+ Semantics: For each element, e, in sequence, seq,
+ call os <<
+ e.
#include <boost/fusion/sequence/io/out.hpp>
-std::cout << make_vector
(123, "Hello", 'x') << std::endl;
+std::cout << make_vector(123, "Hello", 'x') << std::endl;
Sequence |
+Sequence | A Forward @@ -78,16 +78,16 @@ | |
Pred |
+Pred | Unary
- Metafunction returning an mpl::bool_
+ Metafunction returning an mpl::bool_
|
F(s)
filter_view
given
- a sequence, s
.F(f)
filter_view
- from another filter_view
,
- f
.f =
- f2
filter_view
,
- f
, from another
- filter_view
, f2
.@@ -165,7 +165,7 @@ using boost::mpl::not_; using boost::is_class; -typedefvector
<std::string, char, long, bool, double> vector_type; +typedef vector<std::string, char, long, bool, double> vector_type; vector_type v("a-string", '@', 987654, true, 6.6); filter_view<vector_type const, not_<is_class<_> > > view(v); diff --git a/doc/html/fusion/sequences/views/iterator_range.html b/doc/html/fusion/sequences/views/iterator_range.html index 8beb71ae..d53044a3 100644 --- a/doc/html/fusion/sequences/views/iterator_range.html +++ b/doc/html/fusion/sequences/views/iterator_range.html @@ -3,7 +3,7 @@iterator_range - + @@ -26,22 +26,22 @@- + Description
-
iterator_range
presents + 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
@@ -49,7 +49,7 @@ struct iterator_range;- + Template parameters
@@ -66,14 +66,14 @@
First
Last
IR(f, l)
iterator_range
- given iterators, f
- and l
.IR(ir)
iterator_range
- from another iterator_range
,
- ir
.ir =
- ir2
iterator_range
,
- ir
, from another
- iterator_range
,
- ir2
.char const* s = "Ruby"; -typedefvector
<int, char, double, char const*> vector_type; +typedef vector<int, char, double, char const*> vector_type; vector_type vec(1, 'x', 3.3, s); -typedefresult_of::begin
<vector_type>::type A; -typedefresult_of::end
<vector_type>::type B; -typedefresult_of::next
<A>::type C; -typedefresult_of::prior
<B>::type D; +typedef result_of::begin<vector_type>::type A; +typedef result_of::end<vector_type>::type B; +typedef result_of::next<A>::type C; +typedef result_of::prior<B>::type D; C c(vec); D d(vec); diff --git a/doc/html/fusion/sequences/views/joint_view.html b/doc/html/fusion/sequences/views/joint_view.html index cb8979ba..fd753d3b 100644 --- a/doc/html/fusion/sequences/views/joint_view.html +++ b/doc/html/fusion/sequences/views/joint_view.html @@ -3,7 +3,7 @@joint_view - + @@ -26,22 +26,22 @@- + Description
-
joint_view
presents a view + joint_view presents a view which is a concatenation of two sequences.- + Header
#include <boost/fusion/sequence/view/joint_view.hpp>- + Synopsis
@@ -49,7 +49,7 @@ struct joint_view;- + Template parameters
@@ -66,7 +66,7 @@
Sequence1
Sequence2
JV(s1, s2)
joint_view
given
- sequences, s1
and
- s2
.JV(jv)
joint_view
- from another joint_view
,
- jv
.jv =
- jv2
joint_view
,
- jv
, from another
- joint_view
, jv2
.-diff --git a/doc/html/fusion/sequences/views/reverse_view.html b/doc/html/fusion/sequences/views/reverse_view.html index 006a525a..883cd7df 100644 --- a/doc/html/fusion/sequences/views/reverse_view.html +++ b/doc/html/fusion/sequences/views/reverse_view.html @@ -3,7 +3,7 @@vector
<int, char> v1(3, 'x'); -vector
<std::string, int> v2("hello", 123); +vector<int, char> v1(3, 'x'); +vector<std::string, int> v2("hello", 123); joint_view< -vector
<int, char> - ,vector
<std::string, int> + vector<int, char> + , vector<std::string, int> > view(v1, v2); std::cout << view << std::endl;
- reverse_view
presents a
+ reverse_view presents a
reversed view of underlying sequence. The first element will be its last
and the last element will be its first.
#include <boost/fusion/sequence/view/reverse_view.hpp>
@@ -46,7 +46,7 @@ struct reverse_view;
Sequence
RV(s)
reverse_view
- given sequence, s
.RV(rv)
reverse_view
- from another reverse_view
,
- rv
.rv =
- rv2
reverse_view
,
- rv
, from another
- reverse_view
, rv2
.-typedefvector
<int, short, double> vector_type; +typedef vector<int, short, double> vector_type; vector_type vec(2, 5, 3.3); reverse_view<vector_type> reverse(vec); diff --git a/doc/html/fusion/sequences/views/single_view.html b/doc/html/fusion/sequences/views/single_view.html index 6a0dd254..fd8bb4cf 100644 --- a/doc/html/fusion/sequences/views/single_view.html +++ b/doc/html/fusion/sequences/views/single_view.html @@ -3,7 +3,7 @@single_view - + @@ -26,18 +26,18 @@-
single_view
is a view into + single_view is a view into a value as a single element sequence.- + Header
#include <boost/fusion/sequence/view/single_view.hpp>- + Synopsis
@@ -45,7 +45,7 @@ struct single_view;- + Template parameters
@@ -61,14 +61,14 @@Default
T
S(x)
single_view
from
- x
.S(s)
single_view
- from another single_view
,
- s
.s =
- s2
single_view
,
- s
, from another
- single_view
, s2
.diff --git a/doc/html/fusion/sequences/views/transform_view.html b/doc/html/fusion/sequences/views/transform_view.html index 1690d8d8..c557b852 100644 --- a/doc/html/fusion/sequences/views/transform_view.html +++ b/doc/html/fusion/sequences/views/transform_view.html @@ -3,7 +3,7 @@transform_view - + @@ -26,40 +26,40 @@-
transform_view
presents + transform_view presents a transformed view of its underlying sequence given a unary Polymorphic - Function Object. Thetransform_view
+ Function Object. The transform_view inherits the traversal characteristics (see Sequence Traversal Concept) of its underlying sequence.- + Header
#include <boost/fusion/sequence/view/transform_view.hpp>- + Synopsis
- Unary Version + Unary Version
template <typename Sequence, typename F> struct transform_view;- Binary Version + Binary Version
template <typename Sequence1, typename Sequence2, typename F> struct transform_view;- + Template parameters
@@ -76,7 +76,7 @@
Sequence
Sequence1
Sequence2
F
Notation
TV
transform_view
type
+ A transform_view type
BTV
transform_view
+ A binary transform_view
type
UTV
transform_view
+ A unary transform_view
type
f
F
+ An instance of F
s
Sequence
+ An instance of Sequence
s1
Sequence1
+ An instance of Sequence1
s2
Sequence2
+ An instance of Sequence2
tv
,
- tv2
transform_view
+ Instances of transform_view
UTV(s, f)
transform_view
- given sequence, s
+ a unary transform_view
+ given sequence, s
and unary Polymorphic
- Function Object, f
.BTV(s1, s2, f)
transform_view
- given sequences, s1
- and s2
and unary
+ a binary transform_view
+ given sequences, s1
+ and s2 and unary
Polymorphic Function
- Object, f
.TV(tv)
transform_view
- from another transform_view
,
- tv
.tv =
- tv2
transform_view
,
- tv
, from another
- transform_view
,
- tv2
.@@ -252,7 +252,7 @@ } }; -typedefvector
<int, short, double> vector_type; +typedef vector<int, short, double> vector_type; vector_type vec(2, 5, 3.3); transform_view<vector_type, square> transform(vec, square()); diff --git a/doc/html/fusion/sequences/views/zip_view.html b/doc/html/fusion/sequences/views/zip_view.html index ab689851..8a53868b 100644 --- a/doc/html/fusion/sequences/views/zip_view.html +++ b/doc/html/fusion/sequences/views/zip_view.html @@ -3,7 +3,7 @@zip_view - + @@ -26,25 +26,25 @@- + Description
-
zip_view
presents a view + zip_view presents a view which iterates over a collection of _sequence_s - in parallel. Azip_view
+ 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
@@ -52,7 +52,7 @@ struct zip_view;- + Template parameters
@@ -68,7 +68,7 @@Default
Sequences
ZV(s)
zip_view
given
+ a zip_view given
a sequence of references to the component _sequence_s.ZV(zv1)
zip_view
- from another zip_view
,
- zv
.zv1 =
- zv2
zip_view
, zv
, from another zip_view
, zv2
.-typedefdiff --git a/doc/html/fusion/support.html b/doc/html/fusion/support.html index dfaeb458..c9eb40db 100644 --- a/doc/html/fusion/support.html +++ b/doc/html/fusion/support.html @@ -3,7 +3,7 @@vector
<int,int> vec1; -typedefvector
<char,char> vec2; +typedef vector<int,int> vec1; +typedef vector<char,char> vec2; vec1 v1(1,2); vec2 v2('a','b'); -typedefvector
<vec1&, vec2&> sequences; +typedef vector<vec1&, vec2&> sequences; std::cout << zip_view<sequences>(sequences(v1, v2)) << std::endl; // ((1 a) (2 b))
@@ -36,7 +36,7 @@ Sequence Concepts).
@@ -50,7 +50,7 @@
}
Description | |||
---|---|---|---|
T |
+T | Any type | The type to query. |
- Return type: + Return type:
For Iterators, the return type is derived from one of: @@ -134,24 +134,24 @@ }}
- Semantics: Establishes the conceptual classification + Semantics: Establishes the conceptual classification of a particular Sequence or Iterator.
#include <boost/fusion/support/category_of.hpp>
using boost::is_base_of; -typedef traits::category_of<diff --git a/doc/html/fusion/support/deduce.html b/doc/html/fusion/support/deduce.html index 4dcb19d2..962fdf50 100644 --- a/doc/html/fusion/support/deduce.html +++ b/doc/html/fusion/support/deduce.html @@ -3,7 +3,7 @@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> ));
@@ -34,19 +34,19 @@ conversion to the full argument type.
- It removes references to const
,
- references to array types are kept, even if the array is const
.
- Reference wrappers are removed (see boost::ref
).
+ It removes references to const,
+ references to array types are kept, even if the array is const.
+ Reference wrappers are removed (see boost::ref).
#include <boost/fusion/support/deduce.hpp>
@@ -60,7 +60,7 @@
}
@@ -81,10 +81,10 @@
}
diff --git a/doc/html/fusion/support/deduce_sequence.html b/doc/html/fusion/support/deduce_sequence.html index 71ad1355..153ad329 100644 --- a/doc/html/fusion/support/deduce_sequence.html +++ b/doc/html/fusion/support/deduce_sequence.html @@ -3,7 +3,7 @@ |
diff --git a/doc/html/fusion/support/is_sequence.html b/doc/html/fusion/support/is_sequence.html index 33939468..26d561ba 100644 --- a/doc/html/fusion/support/is_sequence.html +++ b/doc/html/fusion/support/is_sequence.html @@ -3,7 +3,7 @@ |
Description | |||
---|---|---|---|
T |
+T | Any type | The type to query. |
- Return type: An MPL Boolean Constant. + Return type: An MPL Boolean Constant.
- Semantics: Metafunction that evaluates to
- mpl::true_
if a certain type T
- is a conforming Fusion sequence, mpl::false_
+ Semantics: Metafunction that evaluates to
+ mpl::true_ if a certain type T
+ is a conforming Fusion sequence, mpl::false_
otherwise.
#include <boost/fusion/support/is_sequence.hpp>
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> > ));
Description | |||
---|---|---|---|
T |
+T | Any type | The type to query. |
typedef traits::is_view<T>::type c;
- Return type: An MPL Boolean Constant. + Return type: An MPL Boolean Constant.
- Semantics: Metafunction that evaluates to
- mpl::true_
if a certain type T
- is a conforming Fusion view, mpl::false_
+ Semantics: Metafunction that evaluates to
+ mpl::true_ if a certain type T
+ is a conforming Fusion view, mpl::false_
otherwise.
#include <boost/fusion/support/is_view.hpp>
@@ -108,8 +108,8 @@ using boost::mpl::_ using boost::is_pointer; -typedefdiff --git a/doc/html/fusion/support/pair.html b/doc/html/fusion/support/pair.html index 9bccda5f..b13de593 100644 --- a/doc/html/fusion/support/pair.html +++ b/doc/html/fusion/support/pair.html @@ -3,7 +3,7 @@vector
<int*, char, long*, bool, double> vector_type; -typedeffilter_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> ));
- Fusion pair
type is a half
- runtime pair. A half runtime pair is similar to a std::pair
,
- but, unlike std::pair
,
+ Fusion pair type is a half
+ runtime pair. A half runtime pair is similar to a std::pair,
+ but, unlike std::pair,
the first type does not have data. It is used as elements in _map_s,
for example.
@@ -61,7 +61,7 @@ make_pair(Second const &);
P::first_type |
+P::first_type | The type
- of the first template parameter, F ,
- equivalent to result_of::first<P>::type .
+ of the first template parameter, F,
+ equivalent to result_of::first<P>::type.
|
|
P::second_type |
+P::second_type | The type
- of the second template parameter, S ,
- equivalent to result_of::second<P>::type .
+ of the second template parameter, S,
+ equivalent to result_of::second<P>::type.
|
|
P() |
+P() | Default construction. | |
P(s) |
+P(s) | Construct
- a pair given value for the second type, s . |
+ a pair given value for the second type, s.
|
P(p2) |
+P(p2) | Copy
- constructs a pair from another pair, p2 . |
+ constructs a pair from another pair, p2.
|
p =
- p2 |
+p = + p2 | Assigns
- a pair, p1, from another pair, p2 . |
+ a pair, p1, from another pair, p2.
|
make_pair<F>(s) | Make a pair given the first
- type, F , and a value
- for the second type, s .
- The second type assumes the type of s
+ type, F, and a value
+ for the second type, s.
+ The second type assumes the type of s
|
||
o <<
- p |
-Output p to output stream, o . |
+o << + p | +Output p to output stream, o. |
i >>
- p |
-Input p from input stream, i . |
+i >> + p | +Input p from input stream, i. |
p ==
- p2 |
+p == + p2 | Tests two pairs for equality. | |
p !=
- p2 |
+p != + p2 | Tests two pairs for inequality. |
#include <boost/fusion/support/pair.hpp>
diff --git a/doc/html/fusion/support/tag_of.html b/doc/html/fusion/support/tag_of.html index e93a5a8a..c9eda41b 100644 --- a/doc/html/fusion/support/tag_of.html +++ b/doc/html/fusion/support/tag_of.html @@ -3,7 +3,7 @@tag_of - + @@ -26,7 +26,7 @@- + Description
@@ -40,7 +40,7 @@ conforming sequences.
- + Synopsis
@@ -54,7 +54,7 @@ }
- + Parameters
@@ -69,42 +69,42 @@
Description - + T
T Any type The type to query. - + Expression Semantics
typedef traits::tag_of<T>::type tag;- Return type: Any type. + Return type: Any type.
- Semantics: Returns the tag type associated - with
T
. + Semantics: Returns the tag type associated + with T.- + Header
#include <boost/fusion/support/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/tuples.html index 524c8fe7..ce036073 100644 --- a/doc/html/fusion/tuples.html +++ b/doc/html/fusion/tuples.html @@ -3,7 +3,7 @@Tuples - + @@ -43,12 +43,12 @@The TR1 technical report describes extensions to the C++ standard library. Many of these extensions will be considered for the next iteration of the C++ - standard. TR1 describes a tuple type, and support for treating
std::pair
+ standard. TR1 describes a tuple type, and support for treating std::pair as a type of tuple.Fusion provides full support for the TR1 - Tuple interface, and the extended uses of
diff --git a/doc/html/fusion/tuples/class_template_tuple.html b/doc/html/fusion/tuples/class_template_tuple.html index 13b7e1f2..5d7b7d5a 100644 --- a/doc/html/fusion/tuples/class_template_tuple.html +++ b/doc/html/fusion/tuples/class_template_tuple.html @@ -3,7 +3,7 @@std::pair
described + Tuple interface, and the extended uses of std::pair described in the TR1 document.Class template tuple - + @@ -44,11 +44,11 @@ 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
@@ -60,7 +60,7 @@ class tuple;- + Header
diff --git a/doc/html/fusion/tuples/class_template_tuple/construction.html b/doc/html/fusion/tuples/class_template_tuple/construction.html index bffa97bf..e0195acd 100644 --- a/doc/html/fusion/tuples/class_template_tuple/construction.html +++ b/doc/html/fusion/tuples/class_template_tuple/construction.html @@ -3,7 +3,7 @@Construction - + @@ -27,7 +27,7 @@- + Description
@@ -38,33 +38,33 @@ in this section.
- + Specification
@@ -72,48 +72,48 @@ tuple();Notation
-
- +
T1 - ... TN
, -U1 ... - UN
- T1 + ... TN, + U1 ... + UN
- Tuple element types
-- +
P1 - ... PN
- P1 + ... PN
- Parameter types
-- +
Ti
, -Ui
- Ti, + Ui
- - The type of the
-i
th element + The type of the ith element of a tuple- +
Pi
- Pi
- - The type of the
i
th parameter + The type of the ith parameter- Requirements: Each
Ti
+ Requirements: Each Ti is default constructable.- Semantics: Default initializes each element + Semantics: Default initializes each element of the tuple.
tuple(P1,P2,...,PN);- Requirements: Each
Pi
- isTi
ifTi
is a reference type,const Ti&
otherwise. + Requirements: Each Pi + is Ti if Ti is a reference type, const Ti& otherwise.- Semantics: Copy initializes each element + Semantics: Copy initializes each element with the corresponding parameter.
tuple(const tuple& t);- Requirements: Each
Ti
+ Requirements: Each Ti should be copy constructable.- Semantics: Copy constructs each element - of
*this
- with the corresponding element oft
. + Semantics: Copy constructs each element + of *this + with the corresponding element of t.template<typename U1, typename U2, ..., typename UN> tuple(const tuple<U1, U2, ..., UN>& t);- Requirements: Each
Ti
- shall be constructible from the correspondingUi
. + Requirements: Each Ti + shall be constructible from the corresponding Ui.- Semantics: Constructs each element of -
*this
- with the corresponding element oft
. + Semantics: Constructs each element of + *this + with the corresponding element of t.
Last revised: January 27, 2007 at 12:44:16 GMT |
+Last revised: February 07, 2007 at 22:55:21 GMT |