diff --git a/doc/html/fusion/acknowledgements.html b/doc/html/fusion/acknowledgements.html index d10ff6f0..b02fac6b 100644 --- a/doc/html/fusion/acknowledgements.html +++ b/doc/html/fusion/acknowledgements.html @@ -3,7 +3,7 @@
Special thanks to David Abrahams, Douglas Gregor, Hartmut Kaiser, Aleksey Gurtovoy, Peder Holt, Daniel Wallin, Jaakko Jarvi, Jeremiah Willcock, Dan Marsden, Eric diff --git a/doc/html/fusion/adapted.html b/doc/html/fusion/adapted.html index 0a9121e6..92928c4b 100644 --- a/doc/html/fusion/adapted.html +++ b/doc/html/fusion/adapted.html @@ -3,7 +3,7 @@
- Fusion provides a couple of adapters for other sequences such as std::pair,
+ Fusion provides a couple of adapters for other sequences such as std::pair
,
MPL sequences,
- and boost::array. These adapters are written using Fusion's
+ and boost::array
. These adapters are written using Fusion's
non-intrusive Extension mechanism.
If you wish to use these sequences with fusion, simply include the necessary
files and they will be regarded as first-class, fully conforming fusion sequences
- [13]
+ [13]
.
#include <boost/fusion/adapted.hpp> #include <boost/fusion/include/adapted.hpp>
[13] +
[13] Fusion sequences may also be adapted as fully conforming MPL sequences (see Intrinsics). That way, we can have 2-way adaptation to and from MPL diff --git a/doc/html/fusion/adapted/boost__array.html b/doc/html/fusion/adapted/boost__array.html index b36302b5..168be02e 100644 --- a/doc/html/fusion/adapted/boost__array.html +++ b/doc/html/fusion/adapted/boost__array.html @@ -3,7 +3,7 @@
- This module provides adapters for boost::array.
- Including the module header makes boost::array
- a fully conforming Random
+ This module provides adapters for boost::array
.
+ Including the module header makes boost::array
+ a fully conforming Random
Access Sequence.
#include <boost/fusion/adapted/array.hpp> #include <boost/fusion/include/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;
- This module provides adapters for boost::tuple.
- Including the module header makes boost::tuple
- a fully conforming Forward
+ This module provides adapters for boost::tuple
.
+ Including the module header makes boost::tuple
+ a fully conforming Forward
Sequence.
#include <boost/fusion/adapted/boost_tuple.hpp> #include <boost/fusion/include/boost_tuple.hpp>-
boost::tuple<int,std::string> example_tuple(101, "hello"); std::cout << *boost::fusion::begin(example_tuple) << '\n'; std::cout << *boost::fusion::next(boost::fusion::begin(example_tuple)) << '\n';-
Boost.Tuple Library diff --git a/doc/html/fusion/adapted/boost__variant.html b/doc/html/fusion/adapted/boost__variant.html index 55dff32e..1b5deff3 100644 --- a/doc/html/fusion/adapted/boost__variant.html +++ b/doc/html/fusion/adapted/boost__variant.html @@ -3,7 +3,7 @@
- This module provides adapters for boost::variant.
- Including the module header makes boost::variant
- a fully conforming Forward
+ This module provides adapters for boost::variant
.
+ Including the module header makes boost::variant
+ a fully conforming Forward
Sequence. The variant acts as a sequence of the types that can be
contained in the variant. Accessing types not currently stored int the variant
will lead to the variant being populated with a default constructed value
of that type.
#include <boost/fusion/adapted/variant.hpp> #include <boost/fusion/include/variant.hpp>-
boost::variant<int,std::string> example_variant = 101; std::cout << example_variant << '\n'; *boost::fusion::find<std::string>(example_variant) = "hello"; std::cout << example_variant << '\n';-
This module provides adapters for MPL sequences. Including the module header makes all MPL sequences fully conforming fusion sequences.
-#include <boost/fusion/adapted/mpl.hpp> #include <boost/fusion/include/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;
- This module provides adapters for std::pair.
- Including the module header makes std::pair
- a fully conforming Random
+ This module provides adapters for std::pair
.
+ Including the module header makes std::pair
+ a fully conforming Random
Access Sequence.
#include <boost/fusion/adapted/std_pair.hpp> #include <boost/fusion/include/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
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Unlike MPL, Fusion
algorithms are lazy and non sequence-type preserving. What does that mean?
@@ -57,41 +58,41 @@
fusion algorithms are functional in nature such that algorithms are non mutating
(no side effects). However, due to the high cost of returning full sequences
such as vectors and lists, Views are returned from Fusion
- algorithms instead. For example, the transform algorithm does not actually
- return a transformed version of the original sequence. transform returns a transform_view. This view holds a
+ algorithms instead. For example, the transform
algorithm does not actually
+ return a transformed version of the original sequence. transform
returns a transform_view
. This view holds a
reference to the original sequence plus the transform function. Iteration over
- the transform_view
+ the transform_view
will apply the transform function over the sequence elements on demand. This
lazy evaluation scheme allows us to chain as many algorithms
as we want without incurring a high runtime penalty.
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
+ as push_back
to be totally generic. In
+ Fusion, push_back
is actually a generic algorithm
+ that works on all sequences. Given an input sequence s
+ and a value x
, Fusion's push_back
algorithm simply returns
+ a joint_view
:
+ a view that holds a reference to the original sequence s
+ and the value x
. Functions
that were once sequence specific and need to be implemented N times over N
different sequences are now implemented only once. That is to say that Fusion
sequences are cheaply extensible. However, an important caveat is that the
- result of a sequence extending operation like push_back does not retain the properties
- of the original sequence such as associativity of set(s). To regain the original sequence,
+ 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.
#include <boost/fusion/algorithm.hpp> #include <boost/fusion/include/algorithm.hpp> diff --git a/doc/html/fusion/algorithm/iteration.html b/doc/html/fusion/algorithm/iteration.html index 4782c651..859efa9e 100644 --- a/doc/html/fusion/algorithm/iteration.html +++ b/doc/html/fusion/algorithm/iteration.html @@ -3,7 +3,7 @@Iteration - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,7 +24,8 @@
- Functions
- Metafunctions
@@ -33,10 +34,10 @@ The iteration algorithms provide the fundamental algorithms for traversing a sequence repeatedly applying an operation to its elements. -- +
++ Header -
#include <boost/fusion/algorithm/iteration.hpp> #include <boost/fusion/include/iteration.hpp> diff --git a/doc/html/fusion/algorithm/iteration/functions.html b/doc/html/fusion/algorithm/iteration/functions.html index 155c47c9..05201c33 100644 --- a/doc/html/fusion/algorithm/iteration/functions.html +++ b/doc/html/fusion/algorithm/iteration/functions.html @@ -3,7 +3,7 @@Functions - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,7 +24,8 @@
- fold
- accumulate
diff --git a/doc/html/fusion/algorithm/iteration/functions/accumulate.html b/doc/html/fusion/algorithm/iteration/functions/accumulate.html index 8a0c5a80..04e3bc65 100644 --- a/doc/html/fusion/algorithm/iteration/functions/accumulate.html +++ b/doc/html/fusion/algorithm/iteration/functions/accumulate.html @@ -3,7 +3,7 @@accumulate - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,20 +24,21 @@- + Description
- For a sequence Seq, initial - state, and binary function object or function pointer f, - accumulate repeatedly applies binary f - to each element of Seq + For a sequence
Seq
, initial + state, and binary function object or function pointerf
, + accumulate repeatedly applies binaryf
+ to each element ofSeq
and the previous state.- + Synopsis
@@ -46,12 +47,12 @@ typename State, typename F > -typename result_of::accumulate<Sequence, State, F>::type accumulate( +typenameresult_of::accumulate
<Sequence, State, F>::type accumulate( Sequence& seq, State const& initial_state, F const& f);--Table 1.34. Parameters
-+
Table 1.34. Parameters
++
@@ -78,17 +79,16 @@ - seq +
seq
- A model of Forward - Sequence, f(eN - ....f(e2,f(e1,initial_state))) must be a valid expression for - each element e1 - to eN in seq + A model of Forward + Sequence,
f(eN + ....f(e2,f(e1,initial_state)))
must be a valid expression for + each elemente1
+ toeN
inseq
@@ -100,7 +100,7 @@ - initial_state +
initial_state
@@ -117,14 +117,14 @@ - - f +
f
- boost::result_of<F(E,S)>::type is the return type of f(e,s) - for each element e - of type E in seq, and current state s of type S +
is the return type of
boost::result_of
<F(E,S)>::typef(e,s)
+ for each elemente
+ of typeE
inseq
, and current states
of typeS
@@ -134,10 +134,10 @@ - +
+ Expression Semantics
@@ -145,21 +145,21 @@ accumulate(seq, initial_state, f);
- Return type: Any type + Return type: Any type
- Semantics: Equivalent to f(eN ....f(e2,f(e1,initial_state)))
- where e1 ...eN are the elements of seq.
+ Semantics: Equivalent to f(eN ....f(e2,f(e1,initial_state)))
+ where e1 ...eN
are the elements of seq
.
- Linear, exactly result_of::size<Sequence>::value applications of f.
+ Linear, exactly
applications of result_of::size
<Sequence>::valuef
.
@@ -167,7 +167,7 @@ #include <boost/fusion/include/accumulate.hpp>
@@ -182,8 +182,8 @@ } }; ... -const vector<int,int> vec(1,2); -assert(accumulate(vec,std::string(""), make_string()) == "12"); +constvector
<int,int> vec(1,2); +assert(accumulate
(vec,std::string(""), make_string()) == "12");
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- For a sequence Seq, initial
- state, and binary function object or function pointer f,
- fold repeatedly applies binary f
- to each element of Seq
+ For a sequence Seq
, initial
+ state, and binary function object or function pointer f
,
+ fold repeatedly applies binary f
+ to each element of Seq
and the previous state.
@@ -46,12 +47,12 @@
typename State,
typename F
>
-typename result_of::fold<Sequence, State, F>::type fold(
+typename result_of::fold
<Sequence, State, F>::type fold(
Sequence& seq, State const& initial_state, F const& f);
Table 1.33. Parameters
-
- seq
+ |
- A model of Forward
- Sequence,f(e,s) must be a valid expression for
- each element e
- in seq, and current
- state s
+ A model of Forward
+ Sequence, |
@@ -100,7 +100,7 @@ |
- initial_state
+ |
@@ -117,14 +117,14 @@ | |
- f
+ |
- boost::result_of<F(E,S)>::type is the return type of f(e,s)
- for each element e
- of type E in seq, and current state s of type S
+ |
@@ -134,10 +134,10 @@ |
- 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 result_of::size<Sequence>::value applications of f.
+ Linear, exactly
applications of result_of::size
<Sequence>::valuef
.
@@ -167,7 +167,7 @@ #include <boost/fusion/include/fold.hpp>
@@ -182,8 +182,8 @@ } }; ... -const vector<int,int> vec(1,2); -assert(fold(vec,std::string(""), make_string()) == "12"); +constvector
<int,int> vec(1,2); +assert(fold
(vec,std::string(""), make_string()) == "12");
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Applies a unary function object to each element of a sequence.
@@ -41,12 +42,12 @@
typename Sequence,
typename F
>
-typename result_of::for_each<Sequence, F>::type for_each(
+typename result_of::for_each
<Sequence, F>::type for_each(
Sequence& seq, F const& f);
Table 1.35. Parameters
-
- seq
+ |
- A model of Forward
- Sequence, f(e) must be a valid expression for
- each element e
- in seq
+ A model of Forward
+ Sequence, |
@@ -94,13 +94,12 @@ |
- f
+ |
- A unary Regular + A unary Regular Callable Object |
@@ -111,32 +110,32 @@
-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 result_of::size<Sequence>::value applications of f.
+ Linear, exactly
applications of result_of::size
<Sequence>::valuef
.
@@ -144,7 +143,7 @@ #include <boost/fusion/include/for_each.hpp>
@@ -157,9 +156,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));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Returns the result type of accumulate.
+ Returns the result type of accumulate
.
@@ -47,8 +48,8 @@
};
Table 1.37. Parameters
-
- Sequence
+ |
- A model of Forward + A model of Forward Sequence |
@@ -94,7 +94,7 @@
|
- State
+ |
@@ -104,21 +104,21 @@ |
- The initial state for the first application of F
+ The initial state for the first application of |
- F
+ |
- boost::result_of<F(E,S)>::type is the return type of f(e,s)
- for each element e
- of type E in seq, and current state s of type S
+ |
@@ -128,35 +128,35 @@ |
-result_of::accumulate<Sequence, State, F>::type
+result_of::accumulate
<Sequence, State, F>::type
- Return type: Any type + Return type: Any type
- Semantics: Returns the result of applying
- accumulate to a sequence
- of type Sequence, with
- an initial state of type State
- and binary function object or function pointer of type F.
+ Semantics: Returns the result of applying
+ accumulate
to a sequence
+ of type Sequence
, with
+ an initial state of type State
+ and binary function object or function pointer of type F
.
- Linear, exactly result_of::size<Sequence>::value applications of F.
+ Linear, exactly
applications of result_of::size
<Sequence>::valueF
.
diff --git a/doc/html/fusion/algorithm/iteration/metafunctions/fold.html b/doc/html/fusion/algorithm/iteration/metafunctions/fold.html index 997dc099..178c77dd 100644 --- a/doc/html/fusion/algorithm/iteration/metafunctions/fold.html +++ b/doc/html/fusion/algorithm/iteration/metafunctions/fold.html @@ -3,7 +3,7 @@fold - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,16 +24,17 @@- + Description
- Returns the result type of fold. + Returns the result type of
fold
.- + Synopsis
@@ -47,8 +48,8 @@ };
--Table 1.36. Parameters
-+
Table 1.36. Parameters
++
@@ -75,13 +76,12 @@ - Sequence +
Sequence
@@ -94,7 +94,7 @@ - A model of Forward + A model of Forward Sequence
- State +
State
@@ -104,21 +104,21 @@ - The initial state for the first application of F + The initial state for the first application of
F
- - F +
F
- boost::result_of<F(E,S)>::type is the return type of f(e,s) - for each element e - of type E in seq, and current state s of type S +
is the return type of
boost::result_of
<F(E,S)>::typef(e,s)
+ for each elemente
+ of typeE
inseq
, and current states
of typeS
@@ -128,35 +128,35 @@ - +
+ Expression Semantics
-result_of::fold<Sequence, State, F>::type +result_of::fold
<Sequence, State, F>::type- Return type: Any type + Return type: Any type
- Semantics: Returns the result of applying - fold to a sequence of - type Sequence, with an - initial state of type State - and binary function object or function pointer of type F. + Semantics: Returns the result of applying +
fold
to a sequence of + typeSequence
, with an + initial state of typeState
+ and binary function object or function pointer of typeF
.- + Complexity
- Linear, exactly result_of::size<Sequence>::value applications of F. + Linear, exactly
applications of
result_of::size
<Sequence>::valueF
.- + Header
diff --git a/doc/html/fusion/algorithm/iteration/metafunctions/for_each.html b/doc/html/fusion/algorithm/iteration/metafunctions/for_each.html index 1629f640..d41fe451 100644 --- a/doc/html/fusion/algorithm/iteration/metafunctions/for_each.html +++ b/doc/html/fusion/algorithm/iteration/metafunctions/for_each.html @@ -3,7 +3,7 @@for_each - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,17 +24,18 @@- A metafunction returning the result type of applying for_each to a sequence. The - return type of for_each is always void. + A metafunction returning the result type of applying
for_each
to a sequence. The + return type offor_each
is alwaysvoid
.- + Description
- + Synopsis
@@ -48,8 +49,8 @@ };
--Table 1.38. Parameters
-+
Table 1.38. Parameters
++
@@ -76,13 +77,12 @@ - Sequence +
Sequence
@@ -95,7 +95,7 @@ - A model of Forward + A model of Forward Sequence
- - F +
F
@@ -110,35 +110,35 @@ - +
+ Expression Semantics
-result_of::for_each<Sequence, F>::type +result_of::for_each
<Sequence, F>::type- Return type: void. + Return type:
void
.- Semantics: Returns the return type of - for_each for a sequence of type - Sequence and a unary - function object F. The - return type is always void. + Semantics: Returns the return type of +
for_each
for a sequence of type +Sequence
and a unary + function objectF
. The + return type is alwaysvoid
.- + Complexity
Constant.
- + Header
diff --git a/doc/html/fusion/algorithm/query.html b/doc/html/fusion/algorithm/query.html index dd910180..809702c3 100644 --- a/doc/html/fusion/algorithm/query.html +++ b/doc/html/fusion/algorithm/query.html @@ -3,7 +3,7 @@Query - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,7 +24,8 @@
- Functions
- Metafunctions
@@ -32,10 +33,10 @@The query algorithms provide support for searching and analyzing sequences.
-- +
++ Header -
#include <boost/fusion/algorithm/query.hpp> #include <boost/fusion/include/query.hpp> diff --git a/doc/html/fusion/algorithm/query/functions.html b/doc/html/fusion/algorithm/query/functions.html index a77963a7..a0d4a25c 100644 --- a/doc/html/fusion/algorithm/query/functions.html +++ b/doc/html/fusion/algorithm/query/functions.html @@ -3,7 +3,7 @@Functions - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,7 +24,8 @@
- any
- all
diff --git a/doc/html/fusion/algorithm/query/functions/all.html b/doc/html/fusion/algorithm/query/functions/all.html index e1017b27..7a98f1a3 100644 --- a/doc/html/fusion/algorithm/query/functions/all.html +++ b/doc/html/fusion/algorithm/query/functions/all.html @@ -3,7 +3,7 @@all - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,20 +24,21 @@- + Description
- For a sequence seq and - unary function object f, - all returns true if - f returns true for every - element of seq. + For a sequence
seq
and + unary function objectf
, +all
returns true if +f
returns true for every + element ofseq
.- + Synopsis
@@ -45,12 +46,12 @@ typename Sequence, typename F > -typename result_of::all<Sequence,F>::type all( +typenameresult_of::all
<Sequence,F>::type all( Sequence const& seq, F f);--Table 1.40. Parameters
-+
Table 1.40. Parameters
++
@@ -77,16 +78,15 @@ - seq +
seq
- A model of Forward - Sequence, f(e) is a valid expression, convertible - to bool, for every - element e in seq + A model of Forward + Sequence,
f(e)
is a valid expression, convertible + tobool
, for every + elemente
inseq
@@ -98,7 +98,7 @@ - - f +
f
@@ -113,34 +113,34 @@ - +
+ Expression Semantics
-all(seq, f); +all
(seq, f);- Return type: bool + Return type:
bool
- Semantics: Returns true if and only - if f(e) - evaluates to true for every - element e in seq. + Semantics: Returns true if and only + if
f(e)
+ evaluates totrue
for every + elemente
inseq
.- + Complexity
- Linear. At most result_of::size<Sequence>::value comparisons. + Linear. At most
comparisons.
result_of::size
<Sequence>::value- + Header
@@ -148,7 +148,7 @@ #include <boost/fusion/include/all.hpp>- + Example
@@ -161,8 +161,8 @@ } }; ... -assert(all(make_vector(1,3), odd())); -assert(!all(make_vector(1,2), odd())); +assert(all
(make_vector
(1,3), odd())); +assert(!all
(make_vector
(1,2), odd()));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- For a sequence seq and
- unary function object f,
- any returns true if
- f returns true for at
- least one element of seq.
+ For a sequence seq
and
+ unary function object f
,
+ any
returns true if
+ f
returns true for at
+ least one element of seq
.
@@ -45,12 +46,12 @@
typename Sequence,
typename F
>
-typename result_of::any<Sequence,F>::type any(
+typename result_of::any
<Sequence,F>::type any(
Sequence const& seq, F f);
Table 1.39. Parameters
-
- seq
+ |
- A model of Forward
- Sequence, f(e) must be a valid expression, convertible
- to bool, for each
- element e in seq
+ A model of Forward
+ Sequence, |
@@ -98,7 +98,7 @@ |
- f
+ |
@@ -113,34 +113,34 @@ |
-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 result_of::size<Sequence>::value comparisons.
+ Linear. At most
comparisons.
result_of::size
<Sequence>::value
@@ -148,7 +148,7 @@ #include <boost/fusion/include/any.hpp>
@@ -161,8 +161,8 @@ } }; ... -assert(any(make_vector(1,2), odd())); -assert(!any(make_vector(2,4), odd())); +assert(any
(make_vector
(1,2), odd())); +assert(!any
(make_vector
(2,4), odd()));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Returns the number of elements of a given type within a sequence.
@@ -41,12 +42,12 @@
typename Sequence,
typename T
>
-typename result_of::count<Sequence, T>::type count(
+typename result_of::count
<Sequence, T>::type count(
Sequence const& seq, T const& t);
Table 1.44. Parameters
-
- seq
+ |
- A model of Forward
- Sequence, e == t
- must be a valid expression, convertible to bool,
- for each element e
- in seq
+ A model of Forward
+ Sequence, |
@@ -95,7 +95,7 @@ |
- T
+ |
@@ -110,33 +110,33 @@ |
-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 result_of::size<Sequence>::value comparisons.
+ Linear. At most
comparisons.
result_of::size
<Sequence>::value
@@ -144,12 +144,12 @@ #include <boost/fusion/include/count.hpp>
-const vector<double,int,int> vec(1.0,2,3); -assert(count(vec,2) == 1); +constvector
<double,int,int> vec(1.0,2,3); +assert(count
(vec,2) == 1);
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Returns the number of elements within a sequence with a type for which
- a given unary function object evaluates to true.
+ a given unary function object evaluates to true
.
@@ -42,12 +43,12 @@
typename Sequence,
typename F
>
-typename result_of::count_if<Sequence, F>::type count_if(
+typename result_of::count_if
<Sequence, F>::type count_if(
Sequence const& seq, F f);
Table 1.45. Parameters
-
- seq
+ |
- A model of Forward
- Sequence, f(e) is a valid expression, convertible
- to bool, for each
- element e in seq
+ A model of Forward
+ Sequence, |
@@ -95,7 +95,7 @@ |
- f
+ |
@@ -110,32 +110,32 @@ |
-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 result_of::size<Sequence>::value comparisons.
+ Linear. At most
comparisons.
result_of::size
<Sequence>::value
@@ -143,12 +143,12 @@ #include <boost/fusion/include/count_if.hpp>
-const vector<int,int,int> vec(1,2,3); -assert(count_if(vec,odd()) == 2); +constvector
<int,int,int> vec(1,2,3); +assert(count_if
(vec,odd()) == 2);
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Finds the first element of a given type within a sequence.
@@ -50,8 +51,8 @@ unspecified find(Sequence& seq);
Table 1.42. Parameters
-
- seq
+ |
- A model of Forward + A model of Forward Sequence |
@@ -97,7 +97,7 @@
- T
+ |
@@ -112,35 +112,35 @@ |
-find<T>(seq)
+find
<T>(seq)
- Return type: A model of the same iterator
- category as the iterators of seq.
+ Return type: A model of the same iterator
+ category as the iterators of seq
.
- Semantics: Returns an iterator to the
- first element of seq
- of type T, or end(seq) if there is no such element. Equivalent
- to find_if<boost::is_same<_, T> >(seq)
+ Semantics: Returns an iterator to the
+ first element of seq
+ of type T
, or
if there is no such element. Equivalent
+ to end
(seq)find_if
<boost::is_same<_, T> >(seq)
- Linear. At most result_of::size<Sequence>::value comparisons.
+ Linear. At most
comparisons.
result_of::size
<Sequence>::value
@@ -148,13 +148,13 @@ #include <boost/fusion/include/find.hpp>
-const vector<char,int> vec('a','0'); -assert(*find<int>(vec) == '0'); -assert(find<double>(vec) == end(vec)); +constvector
<char,int> vec('a','0'); +assert(*find
<int>(vec) == '0'); +assert(find
<double>(vec) ==end
(vec));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Finds the first element within a sequence with a type for which a given
MPL
- Lambda Expression evaluates to boost::mpl::true_.
+ Lambda Expression evaluates to boost::mpl::true_
.
@@ -52,8 +53,8 @@ unspecified find_if(Sequence& seq);
Table 1.43. Parameters
-
- seq
+ |
- A model of Forward + A model of Forward Sequence |
@@ -99,7 +99,7 @@
- F
+ |
@@ -115,45 +115,45 @@ |
-find_if<F>(seq)
+find_if
<F>(seq)
- Return type: An iterator of the same
- iterator category as the iterators of seq.
+ Return type: An iterator of the same
+ iterator category as the iterators of seq
.
- Semantics: Returns the first element
- of seq for which MPL
- Lambda Expression F
- evaluates to boost::mpl::true_, or end(seq)
+ Semantics: Returns the first element
+ of seq
for which MPL
+ Lambda Expression F
+ evaluates to boost::mpl::true_
, or
if there is no such element.
end
(seq)
- Linear. At most result_of::size<Sequence>::value comparisons.
+ Linear. At most
comparisons.
result_of::size
<Sequence>::value
/algorithm/query/find_if.hpp>
-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)); +constvector
<double,int> vec(1.0,2); +assert(*find_if
<is_integral<mpl::_> >(vec) == 2); +assert(find_if
<is_class<mpl::_> >(vec) ==end
(vec));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- For a sequence seq and
- unary function object f,
- none returns true if
- f returns false for every
- element of seq.
+ For a sequence seq
and
+ unary function object f
,
+ none
returns true if
+ f
returns false for every
+ element of seq
.
@@ -45,12 +46,12 @@
typename Sequence,
typename F
>
-typename result_of::none<Sequence,F>::type none(
+typename result_of::none
<Sequence,F>::type none(
Sequence const& seq, F f);
Table 1.41. Parameters
-
- seq
+ |
- A model of Forward
- Sequence, f(e) is a valid expression, convertible
- to bool, for every
- element e in seq
+ A model of Forward
+ Sequence, |
@@ -98,7 +98,7 @@ |
- f
+ |
@@ -113,34 +113,34 @@ |
-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 result_of::size<Sequence>::value comparisons.
+ Linear. At most
comparisons.
result_of::size
<Sequence>::value
@@ -148,7 +148,7 @@ #include <boost/fusion/include/none.hpp>
@@ -161,8 +161,8 @@ } }; ... -assert(none(make_vector(2,4), odd())); -assert(!none(make_vector(1,2), odd())); +assert(none
(make_vector
(2,4), odd())); +assert(!none
(make_vector
(1,2), odd()));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- A metafunction returning the result type of all.
+ A metafunction returning the result type of all
.
@@ -47,8 +48,8 @@
};
Table 1.47. Parameters
-
- Sequence
+ |
- A model of Forward + A model of Forward Sequence |
@@ -94,13 +94,12 @@
- F
+ |
- A model of unary Polymorphic + A model of unary Polymorphic Function Object |
@@ -111,37 +110,36 @@
-result_of::all<Sequence, F>::type
+result_of::all
<Sequence, F>::type
- Return type: bool.
+ Return type: bool
.
- Semantics: Returns the return type of
- all
- given a sequence of type Sequence
- and a unary Polymorphic
- Function Object of type F.
- The return type is always bool.
+ Semantics: Returns the return type of
+ all
+ given a sequence of type Sequence
+ and a unary Polymorphic
+ Function Object of type F
.
+ The return type is always bool
.
Constant.
diff --git a/doc/html/fusion/algorithm/query/metafunctions/any.html b/doc/html/fusion/algorithm/query/metafunctions/any.html index 3d3cfb21..72234e17 100644 --- a/doc/html/fusion/algorithm/query/metafunctions/any.html +++ b/doc/html/fusion/algorithm/query/metafunctions/any.html @@ -3,7 +3,7 @@any - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,16 +24,17 @@- + Description
- A metafunction returning the result type of any. + A metafunction returning the result type of
any
.- + Synopsis
@@ -47,8 +48,8 @@ };
--Table 1.46. Parameters
-+
Table 1.46. Parameters
++
@@ -75,13 +76,12 @@ - Sequence +
Sequence
@@ -94,13 +94,12 @@ - A model of Forward + A model of Forward Sequence
- - F +
F
@@ -111,37 +110,36 @@ - A model of unary Polymorphic + A model of unary Polymorphic Function Object
- +
+ Expression Semantics
-result_of::any<Sequence, F>::type +result_of::any
<Sequence, F>::type- Return type: bool. + Return type:
bool
.- Semantics: Returns the return type of - any - given a sequence of type Sequence - and a unary Polymorphic - Function Object of type F. - The return type is always bool. + Semantics: Returns the return type of +
any
+ given a sequence of typeSequence
+ and a unary Polymorphic + Function Object of typeF
. + The return type is alwaysbool
.- + Complexity
Constant.
- + Header
diff --git a/doc/html/fusion/algorithm/query/metafunctions/count.html b/doc/html/fusion/algorithm/query/metafunctions/count.html index 7eaee591..46262d88 100644 --- a/doc/html/fusion/algorithm/query/metafunctions/count.html +++ b/doc/html/fusion/algorithm/query/metafunctions/count.html @@ -3,7 +3,7 @@count - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,17 +24,18 @@- + 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,8 +49,8 @@ };
--Table 1.51. Parameters
-+
Table 1.51. Parameters
++
@@ -76,13 +77,12 @@ - Sequence +
Sequence
@@ -95,7 +95,7 @@ - A model of Forward + A model of Forward Sequence
- - T +
T
@@ -110,33 +110,33 @@ - +
+ 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/algorithm/query/metafunctions/count_if.html b/doc/html/fusion/algorithm/query/metafunctions/count_if.html index 00398d26..609894ad 100644 --- a/doc/html/fusion/algorithm/query/metafunctions/count_if.html +++ b/doc/html/fusion/algorithm/query/metafunctions/count_if.html @@ -3,7 +3,7 @@count_if - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,17 +24,18 @@- + 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,8 +49,8 @@ };
--Table 1.52. Parameters
-+
Table 1.52. Parameters
++
@@ -76,13 +77,12 @@ - Sequence +
Sequence
@@ -95,7 +95,7 @@ - A model of Forward + A model of Forward Sequence
- - Pred +
Pred
@@ -110,33 +110,33 @@ - +
+ Expression Semantics
-result_of::count_if<Sequence, Pred>::type +result_of::count_if
<Sequence, Pred>::type- Return type: int. + Return type:
int
.- Semantics: Returns the return type of - count_if. The return type is - always int. + Semantics: Returns the return type of +
count_if
. The return type is + alwaysint
.- + Complexity
Constant.
- + Header
diff --git a/doc/html/fusion/algorithm/query/metafunctions/find.html b/doc/html/fusion/algorithm/query/metafunctions/find.html index 4d219b73..3b806bec 100644 --- a/doc/html/fusion/algorithm/query/metafunctions/find.html +++ b/doc/html/fusion/algorithm/query/metafunctions/find.html @@ -3,7 +3,7 @@find - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,17 +24,18 @@- + Description
- Returns the result type of find, + Returns the result type of
find
, given the sequence and search types.- + Synopsis
@@ -48,8 +49,8 @@ };
--Table 1.49. Parameters
-+
Table 1.49. Parameters
++
@@ -76,13 +77,12 @@ - Sequence +
Sequence
@@ -95,7 +95,7 @@ - Model of Forward + Model of Forward Sequence
- - T +
T
@@ -110,35 +110,35 @@ - +
+ Expression Semantics
-result_of::find<Sequence, T>::type +result_of::find
<Sequence, T>::type- Return type: A model of the same iterator - category as the iterators of Sequence. + Return type: A model of the same iterator + category as the iterators of
Sequence
.- Semantics: Returns an iterator to the - first element of type T - in Sequence, or result_of::end<Sequence>::type + Semantics: Returns an iterator to the + first element of type
T
+ inSequence
, orif there is no such element.
result_of::end
<Sequence>::type- + Complexity
- Linear, at most result_of::size<Sequence>::value comparisons. + Linear, at most
comparisons.
result_of::size
<Sequence>::value- + Header
diff --git a/doc/html/fusion/algorithm/query/metafunctions/find_if.html b/doc/html/fusion/algorithm/query/metafunctions/find_if.html index ac850be5..dd8e8838 100644 --- a/doc/html/fusion/algorithm/query/metafunctions/find_if.html +++ b/doc/html/fusion/algorithm/query/metafunctions/find_if.html @@ -3,7 +3,7 @@find_if - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,17 +24,18 @@- + Description
- Returns the result type of find_if + Returns the result type of
find_if
given the sequence and predicate types.- + Synopsis
@@ -48,8 +49,8 @@ };
--Table 1.50. Parameters
-+
Table 1.50. Parameters
++
@@ -76,13 +77,12 @@ - Sequence +
Sequence
@@ -95,7 +95,7 @@ - A model of Forward + A model of Forward Sequence
- - Pred +
Pred
@@ -111,35 +111,35 @@ - +
+ Expression Semantics
-result_of::find_if<Sequence, Pred>::type +result_of::find_if
<Sequence, Pred>::type- Return type: A model of the same iterator - category as the iterators of Sequence. + Return type: A model of the same iterator + category as the iterators of
Sequence
.- Semantics: Returns an iterator to the - first element in Sequence - for which Pred evaluates - to true. Returns result_of::end<Sequence>::type if there is no such element. + Semantics: Returns an iterator to the + first element in
Sequence
+ for whichPred
evaluates + to true. Returnsif there is no such element.
result_of::end
<Sequence>::type- + Complexity
- Linear. At most result_of::size<Sequence>::value comparisons. + Linear. At most
comparisons.
result_of::size
<Sequence>::value- + Header
diff --git a/doc/html/fusion/algorithm/query/metafunctions/none.html b/doc/html/fusion/algorithm/query/metafunctions/none.html index 0da5e523..2d8fd190 100644 --- a/doc/html/fusion/algorithm/query/metafunctions/none.html +++ b/doc/html/fusion/algorithm/query/metafunctions/none.html @@ -3,7 +3,7 @@none - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,16 +24,17 @@- + Description
- A metafunction returning the result type of none. + A metafunction returning the result type of
none
.- + Synopsis
@@ -47,8 +48,8 @@ };
--Table 1.48. Parameters
-+
Table 1.48. Parameters
++
@@ -75,13 +76,12 @@ - Sequence +
Sequence
@@ -94,13 +94,12 @@ - A model of Forward + A model of Forward Sequence
- - F +
F
@@ -111,37 +110,36 @@ - A model of unary Polymorphic + A model of unary Polymorphic Function Object
- +
+ Expression Semantics
-result_of::none<Sequence, F>::type +result_of::none
<Sequence, F>::type- Return type: bool. + Return type:
bool
.- Semantics: Returns the return type of - none - given a sequence of type Sequence - and a unary Polymorphic - Function Object of type F. - The return type is always bool. + Semantics: Returns the return type of +
none
+ given a sequence of typeSequence
+ and a unary Polymorphic + Function Object of typeF
. + The return type is alwaysbool
.- + Complexity
Constant.
- + Header
diff --git a/doc/html/fusion/algorithm/transformation.html b/doc/html/fusion/algorithm/transformation.html index f7a3481f..781f8b1c 100644 --- a/doc/html/fusion/algorithm/transformation.html +++ b/doc/html/fusion/algorithm/transformation.html @@ -3,7 +3,7 @@Transformation - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,7 +24,8 @@-
- Functions
- Metafunctions
@@ -39,16 +40,16 @@Note -+
As the transformation algorithms return views onto their input arguments, it is important that the lifetime of the input arguments is greater than the period during which you wish to use the results.
- +
++ Header -
#include <boost/fusion/algorithm/transformation.hpp> #include <boost/fusion/include/transformation.hpp> diff --git a/doc/html/fusion/algorithm/transformation/functions.html b/doc/html/fusion/algorithm/transformation/functions.html index 10863dc6..67d39f14 100644 --- a/doc/html/fusion/algorithm/transformation/functions.html +++ b/doc/html/fusion/algorithm/transformation/functions.html @@ -3,7 +3,7 @@Functions - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,7 +24,8 @@
- filter
- filter_if
diff --git a/doc/html/fusion/algorithm/transformation/functions/clear.html b/doc/html/fusion/algorithm/transformation/functions/clear.html index 173037b8..140d220d 100644 --- a/doc/html/fusion/algorithm/transformation/functions/clear.html +++ b/doc/html/fusion/algorithm/transformation/functions/clear.html @@ -3,7 +3,7 @@clear - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,27 +24,28 @@- + Description
- clear returns an empty sequence. +
clear
returns an empty sequence.- + Synposis
template< typename Sequence > -typename result_of::clear<Sequence const>::type clear(Sequence const& seq); +typenameresult_of::clear
<Sequence const>::type clear(Sequence const& seq);--Table 1.62. Parameters
-+
Table 1.62. Parameters
++
@@ -70,13 +71,12 @@ - - seq +
seq
@@ -86,34 +86,33 @@ - A model of Forward + A model of Forward Sequence
- +
+ Expression Semantics
-clear(seq); +clear
(seq);- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Expression Semantics: Returns a sequence + Expression Semantics: Returns a sequence with no elements.
- + Complexity
Constant.
- + Header
@@ -121,11 +120,11 @@ #include <boost/fusion/include/clear.hpp>- + Example
-assert(clear(make_vector(1,2,3)) == make_vector()); +assert(clear
(make_vector
(1,2,3)) ==make_vector
());
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
@@ -34,7 +35,7 @@ those at a specified iterator, or between two iterators.
@@ -42,7 +43,7 @@ typename Sequence, typename First > -typename result_of::erase<Sequence const, First>::type erase( +typenameresult_of::erase
<Sequence const, First>::type erase( Sequence const& seq, First const& it1); template< @@ -50,12 +51,12 @@ typename First, typename Last > -typename result_of::erase<Sequence const, First, Last>::type erase( +typenameresult_of::erase
<Sequence const, First, Last>::type erase( Sequence const& seq, First const& it1, Last const& it2);
Table 1.63. Parameters
-
- seq
+ |
- A model of Forward + A model of Forward Sequence |
@@ -101,85 +101,81 @@
|
- it1
+ |
- A model of Forward + A model of Forward Iterator |
- Iterator into seq
+ Iterator into |
- it2
+ |
- A model of Forward + A model of Forward Iterator |
- Iterator into seq
- after it1
+ Iterator into |
-erase(seq, pos);
+erase
(seq, pos);
- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, containing
- all the elements of seq
- except the element at pos.
+ Semantics: Returns a new sequence, containing
+ all the elements of seq
+ except the element at pos
.
-erase(seq, first, last);
+erase
(seq, first, last);
- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, with
- all the elements of seq,
- in their original order, except those in the range [first,last).
+ Semantics: Returns a new sequence, with
+ all the elements of seq
,
+ in their original order, except those in the range [first
,last
).
Constant. Returns a view which is lazily evaluated.
@@ -187,13 +183,13 @@ #include <boost/fusion/include/erase.hpp>
-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)); +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));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- For an Associative
- Sequence seq,
- returns a Forward
+ For an Associative
+ Sequence seq
,
+ returns a Forward
Sequence containing all the elements of the original except those
with a given key.
@@ -50,8 +49,8 @@ typename result_of::erase_key<Sequence const, Key>::type erase_key(Sequence const& seq);
Table 1.64. Parameters
-
- seq
+ |
- A model of Associative + A model of Associative Sequence |
@@ -97,7 +95,7 @@
- Key
+ |
@@ -112,35 +110,34 @@ |
-erase_key<Key>(seq);
+erase_key
<Key>(seq);
- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, containing
- all the elements of seq,
- except those with key Key.
+ Semantics: Returns a new sequence, containing
+ all the elements of seq
,
+ except those with key Key
.
Constant. Returns a view which is lazily evaluated.
@@ -148,11 +145,11 @@ #include <boost/fusion/include/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'));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
@@ -34,7 +35,7 @@ the elements of a specified type.
@@ -42,11 +43,11 @@
typename T,
typename Sequence
>
-typename result_of::filter<Sequence const, T>::type filter(Sequence const& seq);
+typename result_of::filter
<Sequence const, T>::type filter(Sequence const& seq);
Table 1.53. Parameters
-
- seq
+ |
- A model of Forward + A model of Forward Sequence |
@@ -92,7 +92,7 @@
- T
+ |
@@ -107,36 +107,35 @@ |
-filter<T>(seq);
+filter
<T>(seq);
- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a sequence containing
- all the elements of seq
- of type T. Equivalent
- to filter_if<boost::same_type<_, T> >(seq).
+ Semantics: Returns a sequence containing
+ all the elements of seq
+ of type T
. Equivalent
+ to
.
filter_if
<boost::same_type<_, T> >(seq)
Constant. Returns a view which is lazily evaluated.
@@ -144,12 +143,12 @@ #include <boost/fusion/include/filter.hpp>
-const vector<int,int,long,long> vec(1,2,3,4); -assert(filter<int>(vec) == make_vector(1,2)); +constvector
<int,int,long,long> vec(1,2,3,4); +assert(filter
<int>(vec) ==make_vector
(1,2));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- For a given sequence, filter_if returns a new sequences
+ For a given sequence, filter_if
returns a new sequences
containing only the elements with types for which a given MPL
- Lambda Expression evaluates to boost::mpl::true_.
+ Lambda Expression evaluates to boost::mpl::true_
.
@@ -43,11 +44,11 @@
typename Pred,
typename Sequence
>
-typename result_of::filter_if<Sequence const, Pred>::type filter_if(Sequence const& seq);
+typename result_of::filter_if
<Sequence const, Pred>::type filter_if(Sequence const& seq);
Table 1.54. Parameters
-
- seq
+ |
- A model of Forward + A model of Forward Sequence |
@@ -93,7 +93,7 @@
- Pred
+ |
@@ -109,37 +109,36 @@ |
-filter_if<Pred>(seq);
+filter_if
<Pred>(seq);
- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a sequence containing
- all the elements of seq
- with types for which Pred
- evaluates to boost::mpl::true_. The order of the retained elements
+ Semantics: Returns a sequence containing
+ all the elements of seq
+ with types for which Pred
+ evaluates to boost::mpl::true_
. The order of the retained elements
is the same as in the original sequence.
Constant. Returns a view which is lazily evaluated.
@@ -147,12 +146,12 @@ #include <boost/fusion/include/filter_if.hpp>
-const vector<int,int,double,double> vec(1,2,3.0,4.0); -assert(filter_if<is_integral<mpl::_> >(vec) == make_vector(1,2)); +constvector
<int,int,double,double> vec(1,2,3.0,4.0); +assert(filter_if
<is_integral<mpl::_> >(vec) ==make_vector
(1,2));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
@@ -34,7 +35,7 @@ element inserted the position described by a given iterator.
@@ -46,8 +47,8 @@ unspecified insert(Sequence const& seq, Pos const& pos, T const& t);
Table 1.65. Parameters
-
- seq
+ |
- A model of Forward + A model of Forward Sequence |
@@ -93,13 +93,12 @@
- pos
+ |
- A model of Forward + A model of Forward Iterator |
@@ -112,7 +111,7 @@
- t
+ |
@@ -127,37 +126,36 @@ |
-insert(seq, p, t);
+insert
(seq, p, t);
- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, containing
- all the elements of seq,
+ Semantics: Returns a new sequence, containing
+ all the elements of seq
,
in their original order, and a new element with the type and value of
- t inserted at iterator
- pos.
+ t
inserted at iterator
+ pos
.
Constant. Returns a view which is lazily evaluated.
@@ -165,12 +163,12 @@ #include <boost/fusion/include/insert.hpp>
-const vector<int,int> vec(1,2); -assert(insert(vec, next(begin(vec)), 3) == make_vector(1,3,2)); +constvector
<int,int> vec(1,2); +assert(insert
(vec,next
(begin
(vec)), 3) ==make_vector
(1,3,2));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
@@ -34,7 +35,7 @@ iterator.
@@ -43,12 +44,12 @@
typename Pos,
typename Range
>
-typename result_of::insert_range<Sequence const, Pos, Range>::type insert_range(
+typename result_of::insert_range
<Sequence const, Pos, Range>::type insert_range(
Sequence const& seq, Pos const& pos, Range const& range);
Table 1.66. Parameters
-
- seq
+ |
- A model of Forward + A model of Forward Sequence |
@@ -94,13 +94,12 @@
- pos
+ |
- A model of Forward + A model of Forward Iterator |
@@ -113,13 +112,12 @@
- range
+ |
- A model of Forward + A model of Forward Sequence |
@@ -130,37 +128,36 @@
-insert(seq, pos, range);
+insert
(seq, pos, range);
- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, containing
- all the elements of seq,
- and the elements of range
- inserted at iterator pos.
+ Semantics: Returns a new sequence, containing
+ all the elements of seq
,
+ and the elements of range
+ inserted at iterator pos
.
All elements retaining their ordering from the orignal sequences.
Constant. Returns a view which is lazily evaluated.
@@ -168,12 +165,12 @@ #include <boost/fusion/include/insert_range.hpp>
-const vector<int,int> vec(1,2); -assert(insert_range(vec, next(begin(vec)), make_vector(3,4)) == make_vector(1,3,4,2)); +constvector
<int,int> vec(1,2); +assert(insert_range
(vec,next
(begin
(vec)),make_vector
(3,4)) ==make_vector
(1,3,4,2));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
@@ -34,18 +35,18 @@ first followed by the elements of the second.
template<
typename LhSequence,
typename RhSequence>
-typename result_of::join<LhSequence, RhSequence>::type join(LhSequence const& lhs, RhSequence const& rhs);
+typename result_of::join
<LhSequence, RhSequence>::type join(LhSequence const& lhs, RhSequence const& rhs);
Table 1.67. Parameters
-
- lhs
+ |
- A model of Forward + A model of Forward Sequence |
@@ -91,13 +91,12 @@
- rhs
+ |
- A model of Forward + A model of Forward Sequence |
@@ -108,36 +107,35 @@
-join(lhs, rhs);
+join
(lhs, rhs);
- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a sequence containing
- all the elements of lhs
- followed by all the elements of rhs.
+ Semantics: Returns a sequence containing
+ all the elements of lhs
+ followed by all the elements of rhs
.
The order of th elements is preserved.
Constant. Returns a view which is lazily evaluated.
@@ -145,13 +143,13 @@ #include <boost/fusion/include/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'));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Returns a new sequence, with the last element of the original removed.
template<
typename Sequence
>
-typename result_of::pop_back<Sequence const>::type pop_back(Sequence const& seq);
+typename result_of::pop_back
<Sequence const>::type pop_back(Sequence const& seq);
Table 1.69. Parameters
-
- seq
+ |
- A model of Forward + A model of Forward Sequence |
@@ -86,36 +86,35 @@
-pop_back(seq);
+pop_back
(seq);
- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence containing
- all the elements of seq,
+ Semantics: Returns a new sequence containing
+ all the elements of seq
,
except the last element. The elements in the new sequence are in the
- same order as they were in seq.
+ same order as they were in seq
.
Constant. Returns a view which is lazily evaluated.
@@ -123,11 +122,11 @@ #include <boost/fusion/include/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));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Returns a new sequence, with the first element of the original removed.
template<
typename Sequence
>
-typename result_of::pop_front<Sequence const>::type pop_front(Sequence const& seq);
+typename result_of::pop_front
<Sequence const>::type pop_front(Sequence const& seq);
Table 1.70. Parameters
-
- seq
+ |
- A model of Forward + A model of Forward Sequence |
@@ -86,36 +86,35 @@
-pop_front(seq);
+pop_front
(seq);
- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence containing
- all the elements of seq,
+ Semantics: Returns a new sequence containing
+ all the elements of seq
,
except the first element. The elements in the new sequence are in the
- same order as they were in seq.
+ same order as they were in seq
.
Constant. Returns a view which is lazily evaluated.
@@ -123,11 +122,11 @@ #include <boost/fusion/include/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));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Returns a new sequence with an element added at the end.
@@ -41,12 +42,12 @@
typename Sequence,
typename T
>
-typename result_of::push_back<Sequence, T>::type push_back(
+typename result_of::push_back
<Sequence, T>::type push_back(
Sequence const& seq, T const& t);
Table 1.71. Parameters
-
- seq
+ |
- A model of Forward + A model of Forward Sequence |
@@ -92,7 +92,7 @@
- t
+ |
@@ -107,36 +107,35 @@ |
-push_back(seq, t);
+push_back
(seq, t);
- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, containing
- all the elements of seq,
- and new element t appended
- to the end. The elements are in the same order as they were in seq.
+ Semantics: Returns a new sequence, containing
+ all the elements of seq
,
+ and new element t
appended
+ to the end. The elements are in the same order as they were in seq
.
Constant. Returns a view which is lazily evaluated.
@@ -144,11 +143,11 @@ #include <boost/fusion/include/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));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Returns a new sequence with an element added at the beginning.
@@ -41,12 +42,12 @@
typename Sequence,
typename T
>
-typename result_of::push_front<Sequence, T>::type push_front(
+typename result_of::push_front
<Sequence, T>::type push_front(
Sequence const& seq, T const& t);
Table 1.72. Parameters
-
- seq
+ |
- A model of Forward + A model of Forward Sequence |
@@ -92,7 +92,7 @@
- t
+ |
@@ -107,37 +107,36 @@ |
-push_back(seq, t);
+push_back
(seq, t);
- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, containing
- all the elements of seq,
- and new element t appended
+ Semantics: Returns a new sequence, containing
+ all the elements of seq
,
+ and new element t
appended
to the beginning. The elements are in the same order as they were in
- seq.
+ seq
.
Constant. Returns a view which is lazily evaluated.
@@ -145,11 +144,11 @@ #include <boost/fusion/include/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));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
@@ -34,7 +35,7 @@ except those of a given type.
@@ -42,11 +43,11 @@
typename T,
typename Sequence
>
-typename result_of::remove<Sequence const, T>::type replace(Sequence const& seq);
+typename result_of::remove
<Sequence const, T>::type replace(Sequence const& seq);
Table 1.59. Parameters
-
- seq
+ |
- A model of Forward + A model of Forward Sequence |
@@ -92,7 +92,7 @@
- T
+ |
@@ -107,36 +107,35 @@ |
-remove<T>(seq);
+remove
<T>(seq);
- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, containing
- all the elements of seq,
- in their original order, except those of type T.
- Equivalent to remove_if<boost::is_same<_,T> >(seq).
+ Semantics: Returns a new sequence, containing
+ all the elements of seq
,
+ in their original order, except those of type T
.
+ Equivalent to
.
remove_if
<boost::is_same<_,T> >(seq)
Constant. Returns a view which is lazily evaluated.
@@ -144,12 +143,12 @@ #include <boost/fusion/include/remove.hpp>
-const vector<int,double> vec(1,2.0); -assert(remove<double>(vec) == make_vector(1)); +constvector
<int,double> vec(1,2.0); +assert(remove
<double>(vec) ==make_vector
(1));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Returns a new sequence, containing all the elements of the original except
- those where a given unary function object evaluates to true.
+ those where a given unary function object evaluates to true
.
@@ -42,11 +43,11 @@
typename Pred,
typename Sequence
>
-typename result_of::remove_if<Sequence const, Pred>::type remove_if(Sequence const& seq);
+typename result_of::remove_if
<Sequence const, Pred>::type remove_if(Sequence const& seq);
Table 1.60. Parameters
-
- seq
+ |
- A model of Forward + A model of Forward Sequence |
@@ -92,7 +92,7 @@
- Pred
+ |
@@ -108,37 +108,36 @@ |
-remove_if<Pred>(seq);
+remove_if
<Pred>(seq);
- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, containing
- all the elements of seq,
+ Semantics: Returns a new sequence, containing
+ all the elements of seq
,
in their original order, except those elements with types for which
- Pred evaluates to boost::mpl::true_. Equivalent to filter<boost::mpl::not_<Pred>
- >(seq).
+ Pred
evaluates to boost::mpl::true_
. Equivalent to
.
filter
<boost::mpl::not_<Pred>
+ >(seq)
Constant. Returns a view which is lazily evaluated.
@@ -146,12 +145,12 @@ #include <boost/fusion/include/remove_if.hpp>
-const vector<int,double> vec(1,2.0); -assert(remove_if<is_floating_point<mpl::_> >(vec) == make_vector(1)); +constvector
<int,double> vec(1,2.0); +assert(remove_if
<is_floating_point<mpl::_> >(vec) ==make_vector
(1));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
@@ -34,7 +35,7 @@ a new value.
@@ -42,12 +43,12 @@
typename Sequence,
typename T
>
-typename result_of::replace<Sequence const, T>::type replace(
+typename result_of::replace
<Sequence const, T>::type replace(
Sequence const& seq, T const& old_value, T const& new_value);
Table 1.57. Parameters
-
- 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
+ A model of Forward
+ Sequence, |
@@ -97,7 +97,7 @@ |
- old_value
+ |
@@ -114,7 +114,7 @@ | |
- new_value
+ |
@@ -129,36 +129,35 @@ |
-replace(seq, old_value, new_value);
+replace
(seq, old_value, new_value);
- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence with
- all the values of seq
- with new_value assigned
- to elements with the same type and equal to old_value.
+ Semantics: Returns a new sequence with
+ all the values of seq
+ with new_value
assigned
+ to elements with the same type and equal to old_value
.
Constant. Returns a view which is lazily evaluated.
@@ -166,11 +165,11 @@ #include <boost/fusion/include/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));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Replaces each element of a given sequence for which an unary function
- object evaluates to true
+ object evaluates to true
replaced with a new value.
@@ -43,12 +44,12 @@
typename Sequence,
typename F,
typename T>
-typename result_of::replace_if<Sequence const, F, T>::type replace_if(
+typename result_of::replace_if
<Sequence const, F, T>::type replace_if(
Sequence const& seq, F f, T const& new_value);
Table 1.58. Parameters
-
- seq
+ |
- A model of Forward + A model of Forward Sequence |
@@ -94,14 +94,14 @@
|
- f
+ |
- A function object for which f(e) is a valid expression, convertible
- to bool, for each
- element e in seq
+ A function object for which |
@@ -113,7 +113,7 @@ |
- new_value
+ |
@@ -128,37 +128,36 @@ |
-replace_if(seq, f, new_value);
+replace_if
(seq, f, new_value);
- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence with
- all the elements of seq,
- with new_value assigned
- to each element for which f
- evaluates to true.
+ Semantics: Returns a new sequence with
+ all the elements of seq
,
+ with new_value
assigned
+ to each element for which f
+ evaluates to true
.
Constant. Returns a view which is lazily evaluated.
@@ -166,7 +165,7 @@ #include <boost/fusion/include/replace_if.hpp>
@@ -179,7 +178,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));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Returns a new sequence with the elements of the original in reverse order.
template<
typename Sequence
>
-typename result_of::reverse<Sequence const>::type reverse(Sequence const& seq);
+typename result_of::reverse
<Sequence const>::type reverse(Sequence const& seq);
Table 1.61. Parameters
-
- seq
+ |
- A model of Bidirectional + A model of Bidirectional Sequence |
@@ -86,35 +86,34 @@
-reverse(seq);
+reverse
(seq);
- Return type: A model of Bidirectional + Return type: A model of Bidirectional Sequence.
- Semantics: Returns a new sequence containing
- all the elements of seq
+ Semantics: Returns a new sequence containing
+ all the elements of seq
in reverse order.
Constant. Returns a view which is lazily evaluated.
@@ -122,11 +121,11 @@ #include <boost/fusion/include/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));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- For a sequence seq and
- function object or function pointer f,
- transform returns a new
- sequence with elements created by applying f(e) to each element of e
- of seq.
+ For a sequence seq
and
+ function object or function pointer f
,
+ transform
returns a new
+ sequence with elements created by applying f(e)
to each element of e
+ of seq
.
result_of::transform
<Sequence const, F>::type transform(
Sequence const& seq, F f);
Table 1.55. Parameters
-
- seq
+ |
- A model of Forward + A model of Forward Sequence |
@@ -97,15 +97,15 @@
|
- f
+ |
- f(e)
- is a valid expression for each element e
- of seq. boost::result_of<F(E)>::type is the return type of f when called with a value of
- each element type E.
+ |
@@ -115,28 +115,27 @@ |
-transform(seq, f);
+transform
(seq, f);
- Return type: A model of Forward + Return type: A model of Forward Sequence
- Semantics: Returns a new sequence, containing
- the return values of f(e) for each element e
- within seq.
+ Semantics: Returns a new sequence, containing
+ the return values of f(e)
for each element e
+ within seq
.
result_of::transform
<Sequence1 const, Sequence2 const, F>::type transform(
Sequence1 const& seq1, Sequence2 const& seq2, F f);
Table 1.56. Parameters
-
- seq1
+ |
- A model of Forward + A model of Forward Sequence |
@@ -197,13 +195,12 @@
|
- seq2
+ |
- A model of Forward + A model of Forward Sequence |
@@ -216,16 +213,16 @@
|
- f
+ |
- f(e1,e2)
- is a valid expression for each pair of elements e1
- of seq1 and e2 of seq2.
- boost::result_of<F(E1,E2)>::type is the return type of f when called with elements of
- type E1 and E2
+ |
@@ -235,27 +232,26 @@ |
- Return type: A model of Forward
+
+ Return type: A model of Forward
Sequence.
- Semantics: Returns a new sequence, containing
- the return values of f(e1, e2) for each pair of elements e1 and e2
- within seq1 and seq2 respectively.
+ Semantics: Returns a new sequence, containing
+ the return values of f(e1, e2)
for each pair of elements e1
and e2
+ within seq1
and seq2
respectively.
Constant. Returns a view which is lazily evaluated.
@@ -263,7 +259,7 @@ #include <boost/fusion/include/transform.hpp>
@@ -277,7 +273,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));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
@@ -34,7 +35,7 @@ of the members of the component sequences.
@@ -44,12 +45,12 @@
...
typename SequenceN
>
-typename result_of::zip<Sequence1, Sequence2, ... SequenceN>::type
+typename result_of::zip
<Sequence1, Sequence2, ... SequenceN>::type
zip(Sequence1 const& seq1, Sequence2 const& seq2, ... SequenceN const& seqN);
Table 1.68. Parameters
-
- seq1 to seqN
+ |
- Each sequence is a model of Forward + Each sequence is a model of Forward Sequence. |
@@ -91,40 +91,39 @@
-zip(seq1, seq2, ... seqN);
+zip
(seq1, seq2, ... seqN);
- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a sequence containing
- tuples of elements from sequences seq1
- to seqN. For example,
- applying zip to tuples (1, 2, 3)
- and ('a', 'b',
- 'c')
- would return ((1, 'a'),(2, 'b'),(3,
- 'c'))
+ Semantics: Returns a sequence containing
+ tuples of elements from sequences seq1
+ to seqN
. For example,
+ applying zip to tuples (1, 2, 3)
+ and ('a', 'b',
+ 'c')
+ would return ((1, 'a'),(2, 'b'),(3,
+ 'c'))
Constant. Returns a view which is lazily evaluated.
@@ -132,13 +131,13 @@ #include <boost/fusion/include/zip.hpp>
-vector<int,char> v1(1, 'a'); -vector<int,char> v2(2, 'b'); -assert(zip(v1, v2) == make_vector(make_vector(1, 2),make_vector('a', 'b')); +vector
<int,char> v1(1, 'a'); +vector
<int,char> v2(2, 'b'); +assert(zip
(v1, v2) ==make_vector
(make_vector
(1, 2),make_vector
('a', 'b'));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Returns the result type of clear, given the input sequence
+ Returns the result type of clear
, given the input sequence
type.
@@ -47,8 +48,8 @@
};
Table 1.82. Parameters
-
- Sequence
+ |
@@ -88,33 +89,32 @@ |
-result_of::clear<Sequence>::type
+result_of::clear
<Sequence>::type
- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns an empty sequence. + Semantics: Returns an empty sequence.
Constant.
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/erase.html b/doc/html/fusion/algorithm/transformation/metafunctions/erase.html index 1a729e51..8d83ac41 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/erase.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/erase.html @@ -3,7 +3,7 @@erase - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,17 +24,18 @@- Returns the result type of erase, given the input sequence + Returns the result type of
erase
, given the input sequence and range delimiting iterator types.- + Description
- + Synopsis
@@ -48,8 +49,8 @@ };
--Table 1.83. Parameters
-+
Table 1.83. Parameters
++
@@ -76,13 +77,12 @@ - Sequence +
Sequence
@@ -95,13 +95,12 @@ - A model of Forward + A model of Forward Sequence
- It1 +
It1
@@ -114,13 +113,12 @@ - A model of Forward + A model of Forward Iterator
- - It2 +
It2
@@ -131,47 +129,45 @@ - A model of Forward + A model of Forward Iterator
- +
+ Expression Semantics
-result_of::erase<Sequence, It1>::type +result_of::erase
<Sequence, It1>::type- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence with - the element at It1 removed. + Semantics: Returns a new sequence with + the element at
It1
removed.-result_of::erase<Sequence, It1, It2>::type +result_of::erase
<Sequence, It1, It2>::type- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence with - the elements between It1 - and It2 removed. + Semantics: Returns a new sequence with + the elements between
It1
+ andIt2
removed.- + Complexity
Constant.
- + Header
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/erase_key.html b/doc/html/fusion/algorithm/transformation/metafunctions/erase_key.html index 7daef275..c517b4b8 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/erase_key.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/erase_key.html @@ -3,7 +3,7 @@erase_key - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,17 +24,18 @@- + Description
- Returns the result type of erase_key, given the sequence + Returns the result type of
erase_key
, given the sequence and key types.- + Synopsis
@@ -48,8 +49,8 @@ };
--Table 1.84. Parameters
-+
Table 1.84. Parameters
++
@@ -76,13 +77,12 @@ - Sequence +
Sequence
@@ -95,7 +95,7 @@ - A model of Associative + A model of Associative Sequence
- - Key +
Key
@@ -110,35 +110,34 @@ - +
+ Expression Semantics
-result_of::erase_key<Sequence, Key>::type +result_of::erase_key
<Sequence, Key>::type- Return type: A model of Associative + Return type: A model of Associative Sequence.
- Semantics: Returns a sequence with the - elements of Sequence, - except those with key Key. + Semantics: Returns a sequence with the + elements of
Sequence
, + except those with keyKey
.- + Complexity
Constant.
- + Header
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/filter.html b/doc/html/fusion/algorithm/transformation/metafunctions/filter.html index 840630cc..fcaaecac 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/filter.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/filter.html @@ -3,7 +3,7 @@filter - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,17 +24,18 @@- + Description
- Returns the result type of filter given the sequence type + Returns the result type of
filter
given the sequence type and type to retain.- + Synopsis
@@ -48,8 +49,8 @@ };
--Table 1.73. Parameter
-+
Table 1.73. Parameter
++
@@ -76,13 +77,12 @@ - Sequence +
Sequence
@@ -95,7 +95,7 @@ - A model of Forward + A model of Forward Sequence
- - T +
T
@@ -110,37 +110,36 @@ - +
+ Expression Semantics
-result_of::filter<Sequence, T>::type +result_of::filter
<Sequence, T>::type- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a sequence containing - the elements of Sequence - that are of type T. Equivalent - to result_of::filter_if<Sequence, - boost::is_same<mpl::_, T> >::type. + Semantics: Returns a sequence containing + the elements of
Sequence
+ that are of typeT
. Equivalent + to.
result_of::filter_if
<Sequence, + boost::is_same<mpl::_, T> >::type- + Complexity
Constant.
- + Header
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/filter_if.html b/doc/html/fusion/algorithm/transformation/metafunctions/filter_if.html index 223bdff6..438c369a 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/filter_if.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/filter_if.html @@ -3,7 +3,7 @@filter_if - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,18 +24,19 @@- + Description
- Returns the result type of filter_if given the sequence + Returns the result type of
filter_if
given the sequence and unary MPL Lambda Expression predicate type.- + Synopsis
@@ -49,8 +50,8 @@ };
--Table 1.74. Parameter
-+
Table 1.74. Parameter
++
@@ -77,13 +78,12 @@ - Sequence +
Sequence
@@ -96,7 +96,7 @@ - A model of Forward + A model of Forward Sequence
- - Pred +
Pred
@@ -112,36 +112,35 @@ - +
+ Expression Semantics
-result_of::filter_if<Sequence, Pred>::type +result_of::filter_if
<Sequence, Pred>::type- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a sequence containing - the elements of Sequence - for which Pred evaluates - to boost::mpl::true_. + Semantics: Returns a sequence containing + the elements of
Sequence
+ for whichPred
evaluates + toboost::mpl::true_
.- + Complexity
Constant.
- + Header
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/insert.html b/doc/html/fusion/algorithm/transformation/metafunctions/insert.html index 2325c2b6..61aad4cc 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/insert.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/insert.html @@ -3,7 +3,7 @@insert - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,17 +24,18 @@- + Description
- Returns the result type of insert, given the sequence, + Returns the result type of
insert
, given the sequence, position iterator and insertion types.- + Synopsis
@@ -49,8 +50,8 @@ };
--Table 1.85. Parameters
-+
Table 1.85. Parameters
++
@@ -77,13 +78,12 @@ - Sequence +
Sequence
@@ -96,13 +96,12 @@ - A model of Forward + A model of Forward Sequence
- Position +
Position
@@ -115,7 +114,7 @@ - A model of Forward + A model of Forward Iterator
- - T +
T
@@ -130,36 +129,35 @@ - +
+ Expression Semantics
-result_of::insert<Sequence, Position, T>::type +result_of::insert
<Sequence, Position, T>::type- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a sequence with an - element of type T inserted - at position Position - in Sequence. + Semantics: Returns a sequence with an + element of type
T
inserted + at positionPosition
+ inSequence
.- + Complexity
Constant.
- + Header
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/insert_range.html b/doc/html/fusion/algorithm/transformation/metafunctions/insert_range.html index 3ed32a9d..72019d27 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/insert_range.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/insert_range.html @@ -3,7 +3,7 @@insert_range - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,17 +24,18 @@- + Description
- Returns the result type of insert_range, given the input + Returns the result type of
insert_range
, given the input sequence, position iterator and insertion range types.- + Synopsis
@@ -49,8 +50,8 @@ };
--Table 1.86. Parameters
-+
Table 1.86. Parameters
++
@@ -77,13 +78,12 @@ - Sequence +
Sequence
@@ -96,13 +96,12 @@ - A model of Forward + A model of Forward Sequence
- Position +
Position
@@ -115,13 +114,12 @@ - A model of Forward + A model of Forward Iterator
- - Range +
Range
@@ -132,36 +130,35 @@ - A model of Forward + A model of Forward Sequence
- +
+ Expression Semantics
-result_of::insert_range<Sequence, Position, Range>::type +result_of::insert_range
<Sequence, Position, Range>::type- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a sequence with the - elements of Range inserted - at position Position - into Sequence. + Semantics: Returns a sequence with the + elements of
Range
inserted + at positionPosition
+ intoSequence
.- + Complexity
Constant.
- + Header
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/join.html b/doc/html/fusion/algorithm/transformation/metafunctions/join.html index d5161a7f..d34362f0 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/join.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/join.html @@ -3,7 +3,7 @@join - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,16 +24,17 @@- + Description
Returns the result of joining 2 sequences, given the sequence types.
- + Synopsis
@@ -47,33 +48,32 @@ };
- + Expression Semantics
-result_of::join<LhSequence, RhSequence>::type +result_of::join
<LhSequence, RhSequence>::type- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a sequence containing - the elements of LhSequence - followed by the elements of RhSequence. + Semantics: Returns a sequence containing + the elements of
LhSequence
+ followed by the elements ofRhSequence
. The order of the elements in the 2 sequences is preserved.- + Complexity
Constant.
- + Header
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/pop_back.html b/doc/html/fusion/algorithm/transformation/metafunctions/pop_back.html index d721679b..36a7002c 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/pop_back.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/pop_back.html @@ -3,7 +3,7 @@pop_back - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,17 +24,18 @@- + Description
- Returns the result type of pop_back, given the input sequence + Returns the result type of
pop_back
, given the input sequence type.- + Synopsis
@@ -47,8 +48,8 @@ };
--Table 1.87. Parameters
-+
Table 1.87. Parameters
++
@@ -74,13 +75,12 @@ - - Sequence +
Sequence
@@ -90,35 +90,34 @@ - A model of Forward + A model of Forward Sequence
- +
+ Expression Semantics
-result_of::pop_back<Sequence>::type +result_of::pop_back
<Sequence>::type- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a sequence with all - the elements of Sequence + Semantics: Returns a sequence with all + the elements of
Sequence
except the last element.- + Complexity
Constant.
- + Header
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/pop_front.html b/doc/html/fusion/algorithm/transformation/metafunctions/pop_front.html index cf63ad2e..d82836b9 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/pop_front.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/pop_front.html @@ -3,7 +3,7 @@pop_front - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,17 +24,18 @@- + Description
- Returns the result type of pop_front, given the input sequence + Returns the result type of
pop_front
, given the input sequence type.- + Synopsis
@@ -47,8 +48,8 @@ };
--Table 1.88. Parameters
-+
Table 1.88. Parameters
++
@@ -74,13 +75,12 @@ - - Sequence +
Sequence
@@ -90,28 +90,27 @@ - A model of Forward + A model of Forward Sequence
- +
+ Expression Semantics
-result_of::pop_front<Sequence>::type +result_of::pop_front
<Sequence>::type- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a sequence with all - the elements of Sequence + Semantics: Returns a sequence with all + the elements of
Sequence
except the first element.- + Complexity
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/push_back.html b/doc/html/fusion/algorithm/transformation/metafunctions/push_back.html index 89823b4e..174d2247 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/push_back.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/push_back.html @@ -3,7 +3,7 @@
push_back - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,17 +24,18 @@- + Description
- Returns the result type of push_back, given the types of + Returns the result type of
push_back
, given the types of the input sequence and element to push.- + Synopsis
@@ -48,8 +49,8 @@ };
--Table 1.89. Parameters
-+
Table 1.89. Parameters
++
@@ -76,13 +77,12 @@ - Sequence +
Sequence
@@ -95,7 +95,7 @@ - A model of Forward + A model of Forward Sequence
- - T +
T
@@ -110,29 +110,28 @@ - +
+ Expression Semantics
-result_of::push_back<Sequence, T>::type +result_of::push_back
<Sequence, T>::type- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a sequence with the - elements of Sequence - and an element of type T + Semantics: Returns a sequence with the + elements of
Sequence
+ and an element of typeT
added to the end.- + Complexity
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/push_front.html b/doc/html/fusion/algorithm/transformation/metafunctions/push_front.html index 1b200171..964c95f3 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/push_front.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/push_front.html @@ -3,7 +3,7 @@
push_front - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,17 +24,18 @@- + Description
- Returns the result type of push_front, given the types + Returns the result type of
push_front
, given the types of the input sequence and element to push.- + Synopsis
@@ -48,8 +49,8 @@ };
--Table 1.90. Parameters
-+
Table 1.90. Parameters
++
@@ -76,13 +77,12 @@ - Sequence +
Sequence
@@ -95,7 +95,7 @@ - A model of Forward + A model of Forward Sequence
- - T +
T
@@ -110,29 +110,28 @@ - +
+ Expression Semantics
-result_of::push_front<Sequence, T>::type +result_of::push_front
<Sequence, T>::type- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a sequence with the - elements of Sequence - and an element of type T + Semantics: Returns a sequence with the + elements of
Sequence
+ and an element of typeT
added to the beginning.- + Complexity
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/remove.html b/doc/html/fusion/algorithm/transformation/metafunctions/remove.html index 703673e0..6a9ce6b4 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/remove.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/remove.html @@ -3,7 +3,7 @@
remove - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,17 +24,18 @@- + Description
- Returns the result type of remove, given the sequence and + Returns the result type of
remove
, given the sequence and removal types.- + Synopsis
@@ -48,8 +49,8 @@ };
--Table 1.79. Parameters
-+
Table 1.79. Parameters
++
@@ -76,13 +77,12 @@ - Sequence +
Sequence
@@ -95,7 +95,7 @@ - A model of Forward + A model of Forward Sequence
- - T +
T
@@ -110,37 +110,36 @@ - +
+ Expression Semantics
-result_of::remove<Sequence, T>::type +result_of::remove
<Sequence, T>::type- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a sequence containing - the elements of Sequence - not of type T. Equivalent - to result_of::replace_if<Sequence, - boost::is_same<mpl::_, T> >::type. + Semantics: Returns a sequence containing + the elements of
Sequence
+ not of typeT
. Equivalent + to.
result_of::replace_if
<Sequence, + boost::is_same<mpl::_, T> >::type- + Complexity
Constant.
- + Header
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/remove_if.html b/doc/html/fusion/algorithm/transformation/metafunctions/remove_if.html index 1ea7739c..0fce9b59 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/remove_if.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/remove_if.html @@ -3,7 +3,7 @@remove_if - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,18 +24,19 @@- + Description
- Returns the result type of remove_if, given the input sequence + Returns the result type of
remove_if
, given the input sequence and unary MPL Lambda Expression predicate types.- + Synopsis
@@ -49,8 +50,8 @@ };
--Table 1.80. Parameters
-+
Table 1.80. Parameters
++
@@ -77,13 +78,12 @@ - Sequence +
Sequence
@@ -96,7 +96,7 @@ - A model of Forward + A model of Forward Sequence
- - Pred +
Pred
@@ -107,41 +107,40 @@ - Remove elements which evaluate to boost::mpl::true_ + Remove elements which evaluate to
boost::mpl::true_
- +
+ Expression Semantics
-result_of::remove_if<Sequence, Pred>::type +result_of::remove_if
<Sequence, Pred>::type- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns a sequence containing - the elements of Sequence - for which Pred evaluates - to boost::mpl::false_. + Semantics: Returns a sequence containing + the elements of
Sequence
+ for whichPred
evaluates + toboost::mpl::false_
.- + Complexity
Constant.
- + Header
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/replace.html b/doc/html/fusion/algorithm/transformation/metafunctions/replace.html index d6d9c35d..1c7cd062 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/replace.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/replace.html @@ -3,7 +3,7 @@replace - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,17 +24,18 @@- + Description
- Returns the result type of replace, given the types of + Returns the result type of
replace
, given the types of the input sequence and element to replace.- + Synopsis
@@ -48,8 +49,8 @@ };
--Table 1.77. Parameters
-+
Table 1.77. Parameters
++
@@ -76,13 +77,12 @@ - Sequence +
Sequence
@@ -95,7 +95,7 @@ - A model of Forward + A model of Forward Sequence
- - T +
T
@@ -110,34 +110,33 @@ - +
+ Expression Semantics
-result_of::replace<Sequence,T>::type +result_of::replace
<Sequence,T>::type- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns the return type of - replace. + Semantics: Returns the return type of +
replace
.- + Complexity
Constant.
- + Header
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/replace_if.html b/doc/html/fusion/algorithm/transformation/metafunctions/replace_if.html index dcded614..32a9b448 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/replace_if.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/replace_if.html @@ -3,7 +3,7 @@replace_if - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,19 +24,19 @@- + Description
- Returns the result type of replace_if, given the types - of the sequence, Polymorphic + Returns the result type of
replace_if
, given the types + of the sequence, Polymorphic Function Object predicate and replacement object.- + Synopsis
@@ -50,8 +50,8 @@ };
--Table 1.78. Parameters
-+
Table 1.78. Parameters
++
@@ -78,13 +78,12 @@ - Sequence +
Sequence
@@ -97,13 +96,12 @@ - A model of Forward + A model of Forward Sequence
- F +
F
@@ -116,7 +114,7 @@ - A model of unary Polymorphic + A model of unary Polymorphic Function Object
- - T +
T
@@ -131,34 +129,33 @@ - +
+ Expression Semantics
-result_of::replace_if<Sequence,F,T>::type +result_of::replace_if
<Sequence,F,T>::type- Return type: A model of Forward + Return type: A model of Forward Sequence.
- Semantics: Returns the return type of - replace_if. + Semantics: Returns the return type of +
replace_if
.- + Complexity
Constant.
- + Header
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/reverse.html b/doc/html/fusion/algorithm/transformation/metafunctions/reverse.html index 17bc9674..b9af0052 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/reverse.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/reverse.html @@ -3,7 +3,7 @@reverse - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,17 +24,18 @@- + Description
- Returns the result type of reverse, given the input sequence + Returns the result type of
reverse
, given the input sequence type.- + Synopsis
@@ -47,8 +48,8 @@ };
--Table 1.81. Parameters
-+
Table 1.81. Parameters
++
@@ -74,13 +75,12 @@ - - Sequence +
Sequence
@@ -90,34 +90,33 @@ - A model of Bidirectional + A model of Bidirectional Sequence
- +
+ Expression Semantics
-result_of::reverse<Sequence>::type +result_of::reverse
<Sequence>::type- Return type: A model of Bidirectional + Return type: A model of Bidirectional Sequence.
- Semantics: Returns a sequence with the - elements in the reverse order to Sequence. + Semantics: Returns a sequence with the + elements in the reverse order to
Sequence
.- + Complexity
Constant.
- + Header
diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/transform.html b/doc/html/fusion/algorithm/transformation/metafunctions/transform.html index 2e12466d..d475a873 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/transform.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/transform.html @@ -3,7 +3,7 @@transform - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,20 +24,21 @@- + Description
- For a sequence seq and - function object or function pointer f, - transform returns a new - sequence with elements created by applying f(e) to each element of e - of seq. + For a sequence
seq
and + function object or function pointerf
, +transform
returns a new + sequence with elements created by applyingf(e)
to each element ofe
+ ofseq
.- + Unary version synopsis
@@ -46,12 +47,12 @@ typename Sequence, typename F > -typename result_of::transform<Sequence const, F>::type transform( +typenameresult_of::transform
<Sequence const, F>::type transform( Sequence const& seq, F f);--Table 1.75. Parameters
-+
Table 1.75. Parameters
++
@@ -78,13 +79,12 @@ - seq +
seq
@@ -97,15 +97,15 @@ - A model of Forward + A model of Forward Sequence
- - f +
f
- f(e) - is a valid expression for each element e - of seq. boost::result_of<F(E)>::type is the return type of f when called with a value of - each element type E. +
f(e)
+ is a valid expression for each elemente
+ ofseq
.is the return type of
boost::result_of
<F(E)>::typef
when called with a value of + each element typeE
.@@ -115,28 +115,27 @@ - +
+ Expression Semantics
-transform(seq, f); +transform
(seq, f);- Return type: A model of Forward + Return type: A model of Forward Sequence
- Semantics: Returns a new sequence, containing - the return values of f(e) for each element e - within seq. + Semantics: Returns a new sequence, containing + the return values of
f(e)
for each elemente
+ withinseq
.- + Binary version synopsis
@@ -146,12 +145,12 @@ typename Sequence2, typename F > -typename result_of::transform<Sequence1 const, Sequence2 const, F>::type transform( +typenameresult_of::transform
<Sequence1 const, Sequence2 const, F>::type transform( Sequence1 const& seq1, Sequence2 const& seq2, F f);--Table 1.76. Parameters
-+
Table 1.76. Parameters
++
@@ -178,13 +177,12 @@ - seq1 +
seq1
@@ -197,13 +195,12 @@ - A model of Forward + A model of Forward Sequence
- seq2 +
seq2
@@ -216,16 +213,16 @@ - A model of Forward + A model of Forward Sequence
- - f +
f
- f(e1,e2) - is a valid expression for each pair of elements e1 - of seq1 and e2 of seq2. - boost::result_of<F(E1,E2)>::type is the return type of f when called with elements of - type E1 and E2 +
f(e1,e2)
+ is a valid expression for each pair of elementse1
+ ofseq1
ande2
ofseq2
. +is the return type of
boost::result_of
<F(E1,E2)>::typef
when called with elements of + typeE1
andE2
@@ -235,27 +232,26 @@ - Return type: A model of Forward +
+ Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, containing - the return values of f(e1, e2) for each pair of elements e1 and e2 - within seq1 and seq2 respectively. + Semantics: Returns a new sequence, containing + the return values of
f(e1, e2)
for each pair of elementse1
ande2
+ withinseq1
andseq2
respectively.- + Complexity
Constant. Returns a view which is lazily evaluated.
- + Header
@@ -263,7 +259,7 @@ #include <boost/fusion/include/transform.hpp>- + Example
@@ -277,7 +273,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));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
@@ -34,7 +35,7 @@ of the members of the component sequences.
@@ -50,37 +51,37 @@
};
-result_of::zip<Sequence1, Sequence2, ... SequenceN>::type
+result_of::zip
<Sequence1, Sequence2, ... SequenceN>::type
- Return type: A model of the most restrictive
- traversal category of sequences Sequence1
- to SequenceN.
+ Return type: A model of the most restrictive
+ traversal category of sequences Sequence1
+ to SequenceN
.
- Semantics: Return a sequence containing
+ Semantics: Return a sequence containing
tuples of elements from each sequence. For example, applying zip to tuples
- (1, 2,
- 3)
- and ('a', 'b',
- 'c')
- would return ((1, 'a'),(2, 'b'),(3,
- 'c'))
+ (1, 2,
+ 3)
+ and ('a', 'b',
+ 'c')
+ would return ((1, 'a'),(2, 'b'),(3,
+ 'c'))
Constant.
diff --git a/doc/html/fusion/change_log.html b/doc/html/fusion/change_log.html index dda2f704..85244200 100644 --- a/doc/html/fusion/change_log.html +++ b/doc/html/fusion/change_log.html @@ -3,7 +3,7 @@Change log - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,17 +24,18 @@This section summarizes significant changes to the Fusion library.
- - Sep 27, 2006: Added boost::tuple + Sep 27, 2006: Added
boost::tuple
support.- - Nov 17, 2006: Added boost::variant + Nov 17, 2006: Added
boost::variant
support.- diff --git a/doc/html/fusion/container.html b/doc/html/fusion/container.html index cbf78d3b..15957809 100644 --- a/doc/html/fusion/container.html +++ b/doc/html/fusion/container.html @@ -3,11 +3,10 @@
Container - + - + @@ -15,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -25,7 +24,8 @@+
- vector
- cons
@@ -48,10 +48,10 @@ actually hold heterogenously typed data; unlike Views. These containers are more or less counterparts of those in STL. -- +
++ Header -
#include <boost/fusion/container.hpp> #include <boost/fusion/include/container.hpp> diff --git a/doc/html/fusion/container/cons.html b/doc/html/fusion/container/cons.html index 9aae9e4a..0f1cfc0f 100644 --- a/doc/html/fusion/container/cons.html +++ b/doc/html/fusion/container/cons.html @@ -3,7 +3,7 @@cons - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,43 +24,43 @@+ Description - +
- cons is a simple Forward - Sequence. It is a lisp style recursive list structure where car is the head and - cdr is the tail: - usually another cons structure or nil: - the empty list. Fusion's list is built on top of this more - primitive data structure. It is more efficient than vector when the target sequence +
-cons
is a simple Forward + Sequence. It is a lisp style recursive list structure wherecar
is the head and +cdr
is the tail: + usually another cons structure ornil
: + the empty list. Fusion'slist
is built on top of this more + primitive data structure. It is more efficient thanvector
when the target sequence is constructed piecemeal (a data at a time). The runtime cost of access to each element is peculiarly constant (see Recursive Inlined Functions).- +
++ Header -
#include <boost/fusion/container/list/cons.hpp> #include <boost/fusion/include/cons.hpp>-- +
++ Synopsis -
template <typename Car, typename Cdr = nil> struct cons;-- +
++ Template parameters -
-
@@ -88,7 +88,7 @@ - Car +
Car
@@ -104,7 +104,7 @@ - Cdr +
Cdr
@@ -114,62 +114,59 @@ - nil +
nil
- +
- + ++ Model of -
-Notation
-
- nil
+nil
- -
- An empty cons + An empty
cons
- C
+C
- -
- A cons type + A
cons
type- l, - l2
+l
, +l2
- -
- Instances of cons + Instances of
cons
- car
+car
- -
An arbitrary data
- cdr
+cdr
- -
- Another cons list + Another
cons
list- s
+s
- -
- A Forward Sequence + A Forward Sequence
- N
+N
- +
++ Expression Semantics -
Semantics of an expression is defined only where it differs from, or is not - defined in Forward + defined in Forward Sequence.
- +@@ -193,7 +190,7 @@
- nil() +
nil()
@@ -205,7 +202,7 @@ - C() +
C()
@@ -217,12 +214,12 @@ - C(car) +
C(car)
@@ -230,81 +227,80 @@ - Creates a cons with car + Creates a cons with
car
head and default constructed tail.- C(car, - cdr) +
C(car, + cdr)
- Creates a cons with car - head and cdr tail. + Creates a cons with
car
+ head andcdr
tail.- C(s) +
C(s)
- Copy constructs a cons from a Forward - Sequence, s. + Copy constructs a cons from a Forward + Sequence,
s
.- l = - s +
l = + s
- Assigns to a cons, l, - from a Forward - Sequence, s. + Assigns to a cons,
l
, + from a Forward + Sequence,s
.- The Nth element from the beginning of the sequence; see at. + The Nth element from the beginning of the sequence; see
at
.+ Example - +
cons<int, cons<float> > l(12, cons<float>(5.5f)); -std::cout << at_c<0>(l) << std::endl; -std::cout << at_c<1>(l) << std::endl; +std::cout <<at_c
<0>(l) << std::endl; +std::cout <<at_c
<1>(l) << std::endl;
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
#include <boost/fusion/include/convert.hpp>diff --git a/doc/html/fusion/container/conversion/functions.html b/doc/html/fusion/container/conversion/functions.html index 62891875..90dad7ad 100644 --- a/doc/html/fusion/container/conversion/functions.html +++ b/doc/html/fusion/container/conversion/functions.html @@ -3,7 +3,7 @@
- Convert a fusion sequence to a list.
+ Convert a fusion sequence to a list
.
@@ -46,7 +47,7 @@ as_list(Sequence const& seq);
- seq
+ |
@@ -91,7 +92,7 @@ |
- 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
.
@@ -114,11 +115,11 @@ #include <boost/fusion/include/as_list.hpp>
-as_list(make_vector('x', 123, "hello"))
+as_list(make_vector
('x', 123, "hello"))
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Convert a fusion sequence to a map.
+ Convert a fusion sequence to a map
.
@@ -46,7 +47,7 @@ as_map(Sequence const& seq);
- seq
+ |
@@ -91,7 +92,7 @@ |
- 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.
@@ -119,13 +120,13 @@ #include <boost/fusion/include/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")))
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Convert a fusion sequence to a set.
+ Convert a fusion sequence to a set
.
@@ -46,7 +47,7 @@ as_set(Sequence const& seq);
- seq
+ |
@@ -91,7 +92,7 @@ |
- 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.
@@ -118,11 +119,11 @@ #include <boost/fusion/include/as_set.hpp>
-as_set(make_vector('x', 123, "hello"))
+as_set(make_vector
('x', 123, "hello"))
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Convert a fusion sequence to a vector.
+ Convert a fusion sequence to a vector
.
@@ -46,7 +47,7 @@ as_vector(Sequence const& seq);
- seq
+ |
@@ -91,7 +92,7 @@ |
- 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
.
@@ -114,11 +115,11 @@ #include <boost/fusion/include/as_vector.hpp>
-as_vector(make_list('x', 123, "hello"))
+as_vector(make_list
('x', 123, "hello"))
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Returns the result type of as_list.
+ Returns the result type of as_list
.
@@ -41,7 +42,7 @@ struct as_list;
- Sequence
+ |
@@ -86,7 +87,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
.
@@ -110,11 +111,11 @@ #include <boost/fusion/include/as_list.hpp>
-result_of::as_list<vector<char, int> >::type
+result_of::as_list<vector
<char, int> >::type
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Returns the result type of as_map.
+ Returns the result type of as_map
.
@@ -41,7 +42,7 @@ struct as_map;
- Sequence
+ |
@@ -86,7 +87,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.
@@ -115,13 +116,13 @@ #include <boost/fusion/include/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
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Returns the result type of as_set.
+ Returns the result type of as_set
.
@@ -41,7 +42,7 @@ struct as_set;
- Sequence
+ |
@@ -86,7 +87,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.
@@ -114,11 +115,11 @@ #include <boost/fusion/include/as_set.hpp>
-result_of::as_set<vector<char, int> >::type
+result_of::as_set<vector
<char, int> >::type
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Returns the result type of as_vector.
+ Returns the result type of as_vector
.
@@ -41,7 +42,7 @@ struct as_vector;
- Sequence
+ |
@@ -86,7 +87,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
.
@@ -110,11 +111,11 @@ #include <boost/fusion/include/as_vector.hpp>
-result_of::as_vector<list<char, int> >::type
+result_of::as_vector<list
<char, int> >::type
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
These are the functions that you can use to generate various forms of Container from elemental values.
-#include <boost/fusion/container/generation.hpp> #include <boost/fusion/include/generation.hpp> diff --git a/doc/html/fusion/container/generation/functions.html b/doc/html/fusion/container/generation/functions.html index 20861a17..ecfbc79f 100644 --- a/doc/html/fusion/container/generation/functions.html +++ b/doc/html/fusion/container/generation/functions.html @@ -3,7 +3,7 @@Functions - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,7 +24,8 @@
- Constructs a tie using a list sequence.
+ Constructs a tie using a list
sequence.
template <typename T0, typename T1,... typename TN>
-list<T0&, T1&,... TN&>
+list
<T0&, T1&,... TN&>
list_tie(T0& x0, T1& x1... TN& xN);
- The variadic function accepts 0
- to FUSION_MAX_LIST_SIZE
- elements, where FUSION_MAX_LIST_SIZE
- is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant
- FUSION_MAX_LIST_SIZE
+ The variadic function accepts 0
+ to FUSION_MAX_LIST_SIZE
+ elements, where FUSION_MAX_LIST_SIZE
+ is a user definable predefined maximum that defaults to 10
. You may define the preprocessor constant
+ FUSION_MAX_LIST_SIZE
before including any Fusion header to change the default. Example:
#define FUSION_MAX_LIST_SIZE 20
- x0,
+ |
- Instances of T0, T1,... TN
+ Instances of |
- The arguments to list_tie
+ The arguments to |
- 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
.
@@ -123,7 +124,7 @@ #include <boost/fusion/include/list_tie.hpp>
diff --git a/doc/html/fusion/container/generation/functions/make_cons.html b/doc/html/fusion/container/generation/functions/make_cons.html index 7563364d..2a584eb9 100644 --- a/doc/html/fusion/container/generation/functions/make_cons.html +++ b/doc/html/fusion/container/generation/functions/make_cons.html @@ -3,7 +3,7 @@make_cons - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,31 +24,32 @@- + Description
- Create a cons - from car (head) - and optional cdr (tail). + Create a
cons
+ fromcar
(head) + and optionalcdr
(tail).- + Synopsis
template <typename Car> -typename result_of::make_cons<Car>::type +typenameresult_of::make_cons
<Car>::type make_cons(Car const& car); template <typename Car, typename Cdr> -typename result_of::make_cons<Car, Cdr>::type +typenameresult_of::make_cons
<Car, Cdr>::type make_cons(Car const& car, Cdr const& cdr);- + Parameters
@@ -78,12 +79,12 @@
- car +
car
- Instance of Car + Instance of
Car
@@ -95,12 +96,12 @@ - cdr +
cdr
- Instance of Cdr + Instance of
Cdr
@@ -112,7 +113,7 @@ - + Expression Semantics
@@ -120,15 +121,15 @@ 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).
@@ -136,19 +137,19 @@ #include <boost/fusion/include/make_cons.hpp>
make_cons('x', make_cons(123))
- boost::ref
+ boost::ref
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Create a list
+ Create a list
from one or more values.
template <typename T0, typename T1,... typename TN>
-typename result_of::make_list<T0, T1,... TN>::type
+typename result_of::make_list
<T0, T1,... TN>::type
make_list(T0 const& x0, T1 const& x1... TN const& xN);
- The variadic function accepts 0
- to FUSION_MAX_LIST_SIZE
- elements, where FUSION_MAX_LIST_SIZE
- is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant
- FUSION_MAX_LIST_SIZE
+ The variadic function accepts 0
+ to FUSION_MAX_LIST_SIZE
+ elements, where FUSION_MAX_LIST_SIZE
+ is a user definable predefined maximum that defaults to 10
. You may define the preprocessor constant
+ FUSION_MAX_LIST_SIZE
before including any Fusion header to change the default. Example:
#define FUSION_MAX_LIST_SIZE 20
- x0,
+ |
- Instances of T0, T1,... TN
+ Instances of |
- The arguments to make_list
+ The arguments to |
- 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
.
@@ -123,19 +124,19 @@ #include <boost/fusion/include/make_list.hpp>
make_list(123, "hello", 12.5)
- boost::ref
+ boost::ref
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Create a map
+ Create a map
from one or more key/data pairs.
template <
typename K0, typename K1,... typename KN
, typename T0, typename T1,... typename TN>
-typename result_of::make_map<K0, K0,... KN, T0, T1,... TN>::type
+typename result_of::make_map
<K0, K0,... KN, T0, T1,... TN>::type
make_map(T0 const& x0, T1 const& x1... TN const& xN);
- The variadic function accepts 0
- to FUSION_MAX_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
- K0,
+ |
@@ -99,33 +100,33 @@ |
- Keys associated with x0, x1,... xN
+ Keys associated with |
- x0,
+ |
- Instances of T0, T1,... TN
+ Instances of |
- The arguments to make_map
+ The arguments to |
- 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.
@@ -154,28 +155,28 @@ #include <boost/fusion/include/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
+ 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
- [8]
- elements, where FUSION_MAX_VECTOR_SIZE
- is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant
- FUSION_MAX_VECTOR_SIZE
+ The variadic function accepts 0
+ to FUSION_MAX_VECTOR_SIZE
+ [8]
+ elements, where FUSION_MAX_VECTOR_SIZE
+ is a user definable predefined maximum that defaults to 10
. You may define the preprocessor constant
+ FUSION_MAX_VECTOR_SIZE
before including any Fusion header to change the default. Example:
#define FUSION_MAX_VECTOR_SIZE 20
- x0,
+ |
- Instances of T0, T1,... TN
+ Instances of |
- The arguments to make_set
+ The arguments to |
- 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.
@@ -128,25 +129,25 @@ #include <boost/fusion/include/make_set.hpp>
make_set(123, "hello", 12.5)
- boost::ref
+ boost::ref
- Create a vector
+ 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
- x0,
+ |
- Instances of T0, T1,... TN
+ Instances of |
- The arguments to make_vector
+ The arguments to |
- 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
.
@@ -123,19 +124,19 @@ #include <boost/fusion/include/make_vector.hpp>
make_vector(123, "hello", 12.5)
- boost::ref
+ boost::ref
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Constructs a tie using a map sequence.
+ Constructs a tie using a map
sequence.
template <typename K0, typename K1,... typename KN, typename D0, typename D1,... typename DN> -map<pair<K0, D0&>, pair<K1, D1&>,... pair<KN, DN&> > +map
<pair
<K0, D0&>,pair
<K1, D1&>,...pair
<KN, DN&> > map_tie(D0& d0, D1& d1... DN& dN);
- The variadic function accepts 0
- to FUSION_MAX_MAP_SIZE
- elements, where FUSION_MAX_MAP_SIZE
- is a user definable predefined maximum that defaults to 10, and a corresponding number of key types.
- You may define the preprocessor constant FUSION_MAX_MAP_SIZE
+ The variadic function accepts 0
+ to FUSION_MAX_MAP_SIZE
+ elements, where FUSION_MAX_MAP_SIZE
+ is a user definable predefined maximum that defaults to 10
, and a corresponding number of key types.
+ You may define the preprocessor constant FUSION_MAX_MAP_SIZE
before including any Fusion header to change the default. Example:
#define FUSION_MAX_MAP_SIZE 20
- K0,
+ |
@@ -95,7 +96,7 @@ |
- The key types associated with each of the x1,x2,...,xN
+ The key types associated with each of the |
@@ -103,26 +104,26 @@
- x0,
+ |
- Instances of T0, T1,... TN
+ Instances of |
- The arguments to map_tie
+ The arguments to |
- Return type: map<pair<K0, D0&>, pair<K1,
- D1&>,... pair<KN,
+ Return type: map
<pair
<K0, D0&>, pair
<K1,
+ D1&>,... pair
<KN,
DN&> >
- Semantics: Create a map of references from x0, x1,... xN with keys K0, K1,... KN
+ Semantics: Create a map
of references from x0, x1,... xN
with keys K0, K1,... KN
@@ -146,7 +147,7 @@ #include <boost/fusion/include/map_tie.hpp>
diff --git a/doc/html/fusion/container/generation/functions/tiers.html b/doc/html/fusion/container/generation/functions/tiers.html index c38d969c..b95b09dc 100644 --- a/doc/html/fusion/container/generation/functions/tiers.html +++ b/doc/html/fusion/container/generation/functions/tiers.html @@ -3,7 +3,7 @@Tiers - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,7 +24,8 @@Tiers are sequences, where all elements are non-const reference types. They are constructed with a call to a couple of tie @@ -32,9 +33,9 @@ flavors.
Example: @@ -42,14 +43,14 @@
int i; char c; double d; ... -vector_tie(i, c, a); +vector_tie
(i, c, a);- The vector_tie function creates - a vector - of type vector<int&, char&, double&>. The same result could be achieved - with the call make_vector(ref(i), ref(c), ref(a)) - [10] + The
vector_tie
function creates + avector
+ of type. The same result could be achieved + with the call
vector
<int&, char&, double&>make_vector
(ref
(i),ref
(c),ref
(a)) + [10] .@@ -58,7 +59,7 @@
int i; char c; double d; -vector_tie(i, c, d) = make_vector(1,'a', 5.5); +vector_tie
(i, c, d) =make_vector
(1,'a', 5.5); std::cout << i << " " << c << " " << d;@@ -67,7 +68,7 @@ when calling functions which return sequences.
- + Ignore
@@ -78,13 +79,13 @@
char c; -vector_tie(ignore, c) = make_vector(1, 'a'); +diff --git a/doc/html/fusion/container/generation/functions/vector_tie.html b/doc/html/fusion/container/generation/functions/vector_tie.html index a03733df..18c1f8ae 100644 --- a/doc/html/fusion/container/generation/functions/vector_tie.html +++ b/doc/html/fusion/container/generation/functions/vector_tie.html @@ -3,7 +3,7 @@vector_tie
(ignore, c) =make_vector
(1, 'a');vector_tie - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,36 +24,37 @@- + Description
- Constructs a tie using a vector sequence. + Constructs a tie using a
vector
sequence.- + Synopsis
template <typename T0, typename T1,... typename TN> -vector<T0&, T1&,... TN&> +vector
<T0&, T1&,... TN&> vector_tie(T0& x0, T1& x1... TN& xN);- The variadic function accepts 0 - to FUSION_MAX_VECTOR_SIZE - elements, where FUSION_MAX_VECTOR_SIZE - is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant - FUSION_MAX_VECTOR_SIZE + The variadic function accepts
0
+ 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
before including any Fusion header to change the default. Example:#define FUSION_MAX_VECTOR_SIZE 20- + Parameters
@@ -82,25 +83,25 @@
- x0, +
x0, x1,... - xN
+ xN- Instances of T0, T1,... TN + Instances of
T0, T1,... TN
- The arguments to vector_tie + The arguments to
vector_tie
- + Expression Semantics
@@ -108,14 +109,14 @@ vector_tie(x0, x1,... xN);
- Return type: vector<T0&, T1&,...
+ Return type: vector
<T0&, T1&,...
TN&>
- Semantics: Create a vector of references from x0, x1,... xN.
+ Semantics: Create a vector
of references from x0, x1,... xN
.
@@ -123,7 +124,7 @@ #include <boost/fusion/include/vector_tie.hpp>
diff --git a/doc/html/fusion/container/generation/metafunctions.html b/doc/html/fusion/container/generation/metafunctions.html index e03be94d..e6ca777c 100644 --- a/doc/html/fusion/container/generation/metafunctions.html +++ b/doc/html/fusion/container/generation/metafunctions.html @@ -3,7 +3,7 @@MetaFunctions - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,7 +24,8 @@
- make_list
- make_cons
diff --git a/doc/html/fusion/container/generation/metafunctions/list_tie.html b/doc/html/fusion/container/generation/metafunctions/list_tie.html index fca47734..efd93849 100644 --- a/doc/html/fusion/container/generation/metafunctions/list_tie.html +++ b/doc/html/fusion/container/generation/metafunctions/list_tie.html @@ -3,7 +3,7 @@list_tie - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,16 +24,17 @@- + Description
- Returns the result type of list_tie. + Returns the result type of
list_tie
.- + Synopsis
@@ -41,18 +42,18 @@ struct list_tie;- The variadic function accepts 0 - to FUSION_MAX_LIST_SIZE - elements, where FUSION_MAX_LIST_SIZE - is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant - FUSION_MAX_LIST_SIZE + The variadic function accepts
0
+ 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
before including any Fusion header to change the default. Example:#define FUSION_MAX_LIST_SIZE 20- + Parameters
@@ -81,9 +82,9 @@
- T0, +
T0, T1,... - TN
+ TN@@ -93,13 +94,13 @@ - The arguments to list_tie + The arguments to
list_tie
- + Expression Semantics
@@ -107,14 +108,14 @@ 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
.
@@ -122,7 +123,7 @@ #include <boost/fusion/include/list_tie.hpp>
diff --git a/doc/html/fusion/container/generation/metafunctions/make_cons.html b/doc/html/fusion/container/generation/metafunctions/make_cons.html index efe89f27..a0494764 100644 --- a/doc/html/fusion/container/generation/metafunctions/make_cons.html +++ b/doc/html/fusion/container/generation/metafunctions/make_cons.html @@ -3,7 +3,7 @@make_cons - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,16 +24,17 @@- + Description
- Returns the result type of make_cons. + Returns the result type of
make_cons
.- + Synopsis
@@ -41,7 +42,7 @@ struct make_cons;- + Parameters
@@ -71,7 +72,7 @@
- Car +
Car
@@ -88,12 +89,12 @@ - Cdr +
Cdr
- A cons + A
cons
@@ -105,7 +106,7 @@ - + Expression Semantics
@@ -113,17 +114,17 @@ 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).
@@ -131,7 +132,7 @@ #include <boost/fusion/include/make_cons.hpp>
diff --git a/doc/html/fusion/container/generation/metafunctions/make_list.html b/doc/html/fusion/container/generation/metafunctions/make_list.html index 8491ec4a..aa6781ac 100644 --- a/doc/html/fusion/container/generation/metafunctions/make_list.html +++ b/doc/html/fusion/container/generation/metafunctions/make_list.html @@ -3,7 +3,7 @@make_list - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,16 +24,17 @@- + Description
- Returns the result type of make_list. + Returns the result type of
make_list
.- + Synopsis
@@ -41,18 +42,18 @@ struct make_list;- The variadic function accepts 0 - to FUSION_MAX_LIST_SIZE - elements, where FUSION_MAX_LIST_SIZE - is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant - FUSION_MAX_LIST_SIZE + The variadic function accepts
0
+ 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
before including any Fusion header to change the default. Example:#define FUSION_MAX_LIST_SIZE 20- + Parameters
@@ -81,9 +82,9 @@
- T0, +
T0, T1,... - TN
+ TN@@ -93,13 +94,13 @@ - Template arguments to make_list + Template arguments to
make_list
- + Expression Semantics
@@ -107,15 +108,15 @@ 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
.
@@ -123,7 +124,7 @@ #include <boost/fusion/include/make_list.hpp>
diff --git a/doc/html/fusion/container/generation/metafunctions/make_map.html b/doc/html/fusion/container/generation/metafunctions/make_map.html index 6b4c5e24..640b5b1d 100644 --- a/doc/html/fusion/container/generation/metafunctions/make_map.html +++ b/doc/html/fusion/container/generation/metafunctions/make_map.html @@ -3,7 +3,7 @@make_map - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,16 +24,17 @@- + Description
- Returns the result type of make_map. + Returns the result type of
make_map
.- + Synopsis
@@ -43,19 +44,19 @@ struct make_map;- 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
+ toFUSION_MAX_VECTOR_SIZE
+ [12] + elements, whereFUSION_MAX_VECTOR_SIZE
+ is a user definable predefined maximum that defaults to10
. 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
@@ -85,9 +86,9 @@
- K0, +
K0, K1,... - KN
+ KN@@ -97,16 +98,16 @@ - Keys associated with T0, T1,... TN + Keys associated with
T0, T1,... TN
- T0, +
T0, T1,... - TN
+ TN@@ -116,14 +117,14 @@ - Data associated with keys K0, K1,... KN + Data associated with keys
K0, K1,... KN
- + Expression Semantics
@@ -131,19 +132,19 @@ 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.
@@ -151,25 +152,25 @@ #include <boost/fusion/include/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 +42,19 @@ struct make_set;
- The variadic function accepts 0
- to FUSION_MAX_VECTOR_SIZE
- [11]
- elements, where FUSION_MAX_VECTOR_SIZE
- is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant
- FUSION_MAX_VECTOR_SIZE
+ The variadic function accepts 0
+ to FUSION_MAX_VECTOR_SIZE
+ [11]
+ elements, where FUSION_MAX_VECTOR_SIZE
+ is a user definable predefined maximum that defaults to 10
. You may define the preprocessor constant
+ FUSION_MAX_VECTOR_SIZE
before including any Fusion header to change the default. Example:
#define FUSION_MAX_VECTOR_SIZE 20
- T0,
+ |
@@ -94,13 +95,13 @@ |
- The arguments to make_set
+ The arguments to |
- 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.
@@ -128,7 +129,7 @@ #include <boost/fusion/include/make_set.hpp>
@@ -136,9 +137,9 @@
- Returns the result type of make_vector.
+ Returns the result type of make_vector
.
@@ -41,18 +42,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
- T0,
+ |
@@ -93,13 +94,13 @@ |
- Template arguments to make_vector
+ Template arguments to |
- 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
.
@@ -123,7 +124,7 @@ #include <boost/fusion/include/make_list.hpp>
diff --git a/doc/html/fusion/container/generation/metafunctions/map_tie.html b/doc/html/fusion/container/generation/metafunctions/map_tie.html index d1c26928..edddd6b2 100644 --- a/doc/html/fusion/container/generation/metafunctions/map_tie.html +++ b/doc/html/fusion/container/generation/metafunctions/map_tie.html @@ -3,7 +3,7 @@map_tie - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,16 +24,17 @@- + Description
- Returns the result type of map_tie. + Returns the result type of
map_tie
.- + Synopsis
@@ -41,18 +42,18 @@ struct map_tie;- The variadic function accepts 0 - to FUSION_MAX_MAP_SIZE - elements, where FUSION_MAX_MAP_SIZE - is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant - FUSION_MAX_MAP_SIZE before + The variadic function accepts
0
+ toFUSION_MAX_MAP_SIZE
+ elements, whereFUSION_MAX_MAP_SIZE
+ is a user definable predefined maximum that defaults to10
. You may define the preprocessor constant +FUSION_MAX_MAP_SIZE
before including any Fusion header to change the default. Example:#define FUSION_MAX_MAP_SIZE 20- + Parameters
@@ -82,9 +83,9 @@
- K0, +
K0, K1,... - KN
+ KN@@ -94,16 +95,16 @@ - The key types for map_tie + The key types for
map_tie
- D0, +
D0, D1,... - DN
+ DN@@ -113,14 +114,14 @@ - The arguments types for map_tie + The arguments types for
map_tie
- + Expression Semantics
@@ -128,15 +129,15 @@ result_of::map_tie<K0, K1,... KN, D0, D1,... DN>::type;
- Return type: map<pair<K0, D0&>, pair<K1,
- D1&>,... pair<KN,
+ Return type: map
<pair
<K0, D0&>, pair
<K1,
+ D1&>,... pair
<KN,
DN&> >
- Semantics: Create a map of references from D0, D1,... DN with keys K0, K1,... KN
+ Semantics: Create a map
of references from D0, D1,... DN
with keys K0, K1,... KN
@@ -144,7 +145,7 @@ #include <boost/fusion/include/map_tie.hpp>
diff --git a/doc/html/fusion/container/generation/metafunctions/vector_tie.html b/doc/html/fusion/container/generation/metafunctions/vector_tie.html index 8885304f..c5affb90 100644 --- a/doc/html/fusion/container/generation/metafunctions/vector_tie.html +++ b/doc/html/fusion/container/generation/metafunctions/vector_tie.html @@ -3,7 +3,7 @@vector_tie - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,16 +24,17 @@- + Description
- Returns the result type of vector_tie. + Returns the result type of
vector_tie
.- + Synopsis
@@ -41,18 +42,18 @@ struct vector_tie;- The variadic function accepts 0 - to FUSION_MAX_VECTOR_SIZE - elements, where FUSION_MAX_VECTOR_SIZE - is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant - FUSION_MAX_VECTOR_SIZE + The variadic function accepts
0
+ 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
before including any Fusion header to change the default. Example:#define FUSION_MAX_VECTOR_SIZE 20- + Parameters
@@ -81,9 +82,9 @@
- T0, +
T0, T1,... - TN
+ TN@@ -93,13 +94,13 @@ - The arguments to vector_tie + The arguments to
vector_tie
- + Expression Semantics
@@ -107,14 +108,14 @@ 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
.
@@ -122,7 +123,7 @@ #include <boost/fusion/include/vector_tie.hpp>
diff --git a/doc/html/fusion/container/list.html b/doc/html/fusion/container/list.html index a9ef2e9d..9d1b29e7 100644 --- a/doc/html/fusion/container/list.html +++ b/doc/html/fusion/container/list.html @@ -3,7 +3,7 @@list - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,33 +24,33 @@ ++ Description - +
- list is a Forward - Sequence of heterogenous typed data built on top of cons. It is more efficient than - vector +
-list
is a Forward + Sequence of heterogenous typed data built on top ofcons
. It is more efficient than +vector
when the target sequence is constructed piecemeal (a data at a time). The runtime cost of access to each element is peculiarly constant (see Recursive Inlined Functions).- +
++ Header -
#include <boost/fusion/container/list.hpp> #include <boost/fusion/include/list.hpp> #include <boost/fusion/container/list/list_fwd.hpp> #include <boost/fusion/include/list_fwd.hpp>-- +
++ Synopsis -
template < typename T0 = unspecified @@ -62,26 +62,26 @@ struct list;- The variadic class interface accepts 0 - to FUSION_MAX_LIST_SIZE elements, - where FUSION_MAX_LIST_SIZE - is a user definable predefined maximum that defaults to 10. + The variadic class interface accepts
0
+ toFUSION_MAX_LIST_SIZE
elements, + whereFUSION_MAX_LIST_SIZE
+ is a user definable predefined maximum that defaults to10
. Example:list<int, char, double>- You may define the preprocessor constant FUSION_MAX_LIST_SIZE + You may define the preprocessor constant
FUSION_MAX_LIST_SIZE
before including any Fusion header to change the default. Example:#define FUSION_MAX_LIST_SIZE 20-- +
++ Template parameters -
-
@@ -108,7 +108,7 @@ - T0...TN +
T0
...TN
@@ -123,47 +123,44 @@ - +
- + ++ Model of -
-Notation
-
- L
+L
- -
- A list type + A
list
type- l
+l
- -
- An instance of list + An instance of
list
- e0...en
+e0
...en
- -
Heterogeneous values
- s
+s
- -
- A Forward Sequence + A Forward Sequence
- N
+N
- +
++ Expression Semantics -
Semantics of an expression is defined only where it differs from, or is not - defined in Forward + defined in Forward Sequence.
- +@@ -187,7 +184,7 @@
- L() +
L()
@@ -199,79 +196,78 @@ - L(e0, e1,... - en) +
L(e0, e1,... + en)
- Creates a list with elements e0...en. + Creates a list with elements
e0
...en
.- L(s) +
L(s)
- Copy constructs a list from a Forward - Sequence, s. + Copy constructs a list from a Forward + Sequence,
s
.- l = - s +
l = + s
- Assigns to a list, l, - from a Forward - Sequence, s. + Assigns to a list,
l
, + from a Forward + Sequence,s
.- The Nth element from the beginning of the sequence; see at. + The Nth element from the beginning of the sequence; see
at
.+ Example - +
list<int, float> l(12, 5.5f); -std::cout << at_c<0>(l) << std::endl; -std::cout << at_c<1>(l) << std::endl; +std::cout <<at_c
<0>(l) << std::endl; +std::cout <<at_c
<1>(l) << std::endl;
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- map is an Associative
+ map is an Associative
Sequence of heteregenous typed data elements. Each element is a key/data
- pair (see fusion::pair)
+ pair (see fusion::pair
)
where the key has no data (type only). Type identity is used to impose an
equivalence relation on keys. A map may contain at most one element for each
key. Membership testing and element key lookup has constant runtime complexity
(see Overloaded Functions).
#include <boost/fusion/container/map.hpp> #include <boost/fusion/include/map.hpp> #include <boost/fusion/container/map_fwd.hpp> #include <boost/fusion/include/map_fwd.hpp>-
template < typename T0 = unspecified @@ -64,26 +64,26 @@ struct map;
- The variadic class interface accepts 0
- to FUSION_MAX_MAP_SIZE elements,
- where FUSION_MAX_MAP_SIZE
- is a user definable predefined maximum that defaults to 10.
+ The variadic class interface accepts 0
+ to FUSION_MAX_MAP_SIZE
elements,
+ where FUSION_MAX_MAP_SIZE
+ is a user definable predefined maximum that defaults to 10
.
Example:
-map<pair<int, char>, pair<char, char>, pair<double, char> > +map<pair
<int, char>,pair
<char, char>,pair
<double, char> >
- You may define the preprocessor constant FUSION_MAX_MAP_SIZE
+ You may define the preprocessor constant FUSION_MAX_MAP_SIZE
before including any Fusion header to change the default. Example:
#define FUSION_MAX_MAP_SIZE 20-
- T0...TN
+ |
@@ -125,49 +125,44 @@ |
Notation
M
- A map type
+ A map
type
m
- An instance of map
+ An instance of map
e0
...en
- Heterogeneous key/value pairs (see fusion::pair)
+ Heterogeneous key/value pairs (see fusion::pair
)
s
- A Forward Sequence + A Forward Sequence
Semantics of an expression is defined only where it differs from, or is not - defined in Random - Access Sequence and Associative + defined in Random + Access Sequence and Associative Sequence.
- M()
+ |
@@ -203,64 +198,62 @@ |
- M(e0, e1,...
- en)
+ |
- Creates a map with element pairs e0...en.
+ Creates a map with element pairs |
- M(s)
+ |
- Copy constructs a map from a Forward
- Sequence s.
+ Copy constructs a map from a Forward
+ Sequence |
- m =
- s
+ |
- Assigns to a map, m,
- from a Forward
- Sequence s.
+ Assigns to a map, |
typedef map< - pair<int, char> - , pair<double, std::string> > +pair
<int, char> + ,pair
<double, std::string> > map_type; map_type m( - make_pair<int>('X') - , make_pair<double>("Men")); +make_pair
<int>('X') + ,make_pair
<double>("Men")); -std::cout << at_key<int>(m) << std::endl; -std::cout << at_key<double>(m) << std::endl; +std::cout <<at_key
<int>(m) << std::endl; +std::cout <<at_key
<double>(m) << std::endl;
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- set is an Associative + set is an Associative Sequence of heteregenous typed data elements. Type identity is used to impose an equivalence relation on keys. The element's type is its key. A set may contain at most one element for each key. Membership testing and element key lookup has constant runtime complexity (see Overloaded Functions).
-#include <boost/fusion/container/set.hpp> #include <boost/fusion/include/set.hpp> #include <boost/fusion/container/set_fwd.hpp> #include <boost/fusion/include/set_fwd.hpp>-
template < typename T0 = unspecified @@ -63,26 +63,26 @@ struct set;
- The variadic class interface accepts 0
- to FUSION_MAX_SET_SIZE elements,
- where FUSION_MAX_SET_SIZE
- is a user definable predefined maximum that defaults to 10.
+ The variadic class interface accepts 0
+ to FUSION_MAX_SET_SIZE
elements,
+ where FUSION_MAX_SET_SIZE
+ is a user definable predefined maximum that defaults to 10
.
Example:
set<int, char, double>
- You may define the preprocessor constant FUSION_MAX_SET_SIZE
+ You may define the preprocessor constant FUSION_MAX_SET_SIZE
before including any Fusion header to change the default. Example:
#define FUSION_MAX_SET_SIZE 20-
- T0...TN
+ |
@@ -124,49 +124,44 @@ |
Notation
S
- A set type
+ A set
type
s
- An instance of set
+ An instance of set
e0
...en
Heterogeneous values
fs
- A Forward Sequence + A Forward Sequence
Semantics of an expression is defined only where it differs from, or is not - defined in Random - Access Sequence and Associative + defined in Random + Access Sequence and Associative Sequence.
- S()
+ |
@@ -202,58 +197,56 @@ |
- S(e0, e1,...
- en)
+ |
- Creates a set with elements e0...en.
+ Creates a set with elements |
- S(fs)
+ |
- Copy constructs a set from a Forward
- Sequence fs.
+ Copy constructs a set from a Forward
+ Sequence |
- s =
- fs
+ |
- Assigns to a set, s,
- from a Forward
- Sequence fs.
+ Assigns to a set, |
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;
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- vector is a Random
+ vector
is a Random
Access Sequence of heterogenous typed data structured as a simple
- struct where each element is
- held as a member variable. vector
+ struct
where each element is
+ held as a member variable. vector
is the simplest of the Fusion sequence container, and in many cases the most
efficient.
#include <boost/fusion/container/vector.hpp> #include <boost/fusion/include/vector.hpp> @@ -60,12 +60,12 @@ #include <boost/fusion/container/vector/vector50.hpp> #include <boost/fusion/include/vector50.hpp>-
- Numbered forms + Numbered forms
template <> @@ -86,7 +86,7 @@ struct vectorN;
- Variadic form + Variadic form
template < @@ -105,26 +105,26 @@ vector3<int, char, double>
- The variadic form accepts 0 to
- FUSION_MAX_VECTOR_SIZE elements,
- where FUSION_MAX_VECTOR_SIZE
- is a user definable predefined maximum that defaults to 10.
+ The variadic form accepts 0
to
+ FUSION_MAX_VECTOR_SIZE
elements,
+ where FUSION_MAX_VECTOR_SIZE
+ is a user definable predefined maximum that defaults to 10
.
Example:
vector<int, char, double>
- You may define the preprocessor constant FUSION_MAX_VECTOR_SIZE
+ You may define the preprocessor constant FUSION_MAX_VECTOR_SIZE
before including any Fusion header to change the default. Example:
#define FUSION_MAX_VECTOR_SIZE 20-
- T0...TN
+ |
@@ -166,43 +166,40 @@ |
Notation
v
- Instance of vector
+ Instance of vector
V
- A vector type
+ A vector
type
e0
...en
Heterogeneous values
s
- A Forward Sequence + A Forward Sequence
Semantics of an expression is defined only where it differs from, or is not - defined in Random + defined in Random Access Sequence.
- V()
+ |
@@ -238,56 +235,54 @@ |
- V(e0, e1,...
- en)
+ |
- Creates a vector with elements e0...en.
+ Creates a vector with elements |
- V(s)
+ |
- Copy constructs a vector from a Forward
- Sequence, s.
+ Copy constructs a vector from a Forward
+ Sequence, |
- v =
- s
+ |
- Assigns to a vector, v,
- from a Forward
- Sequence, s.
+ Assigns to a vector, |
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;
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
The Fusion library is designed to be extensible, new sequences types can
- easily be added. In fact, the library support for std::pair,
- boost::array and MPL
+ easily be added. In fact, the library support for std::pair
,
+ boost::array
and MPL
sequences is entirely provided using the extension mechanism.
@@ -47,10 +48,10 @@ sequence -
In order to illustrate enabling a new sequence type for use with Fusion, we are going to use the type: @@ -73,17 +74,16 @@
We are going to pretend that this type has been provided by a 3rd party library,
and therefore cannot be modified. We shall work through all the necessary
- steps to enable example_struct
- to serve as an Associative
+ steps to enable example_struct
+ to serve as an Associative
Sequence as described in the Quick
Start guide.
The Fusion extensibility mechanism uses tag dispatching to call the correct code for a given sequence @@ -96,9 +96,9 @@ }
- Next we need to enable the traits::tag_of
+ Next we need to enable the traits::tag_of
metafunction to return our newly chosen tag type for operations involving
- our sequence. This is done by specializing traits::tag_of
+ our sequence. This is done by specializing traits::tag_of
for our sequence type.
@@ -114,8 +114,8 @@
}}}
- traits::tag_of also has a second template argument,
- that can be used in conjuction with boost::enable_if
+ traits::tag_of
also has a second template argument,
+ that can be used in conjuction with boost::enable_if
to provide tag support for groups of related types. This feature is not necessary
for our sequence, but for an example see the code in:
We need an iterator to describe positions, and provide access to the data within our sequence. As it is straightforward to do, we are going to provide a random access iterator in our example.
- We will use a simple design, in which the 2 members of example_struct
- are given numbered indices, 0 for name
- and 1 for age respectively.
+ We will use a simple design, in which the 2 members of example_struct
+ are given numbered indices, 0 for name
+ and 1 for age
respectively.
template<typename Struct, int Pos> @@ -163,37 +163,37 @@ index of the current element.
struct_type
+ and index
provide convenient
access to information we will need later in the implementation.
category
allows
+ the traits::category_of
metafunction to establish the traversal category of the iterator.
example_struct
being iterated over.
We also need to enable tag
dispatching for our iterator type, with another specialization
- of traits::tag_of.
+ of traits::tag_of
.
In isolation, the iterator implementation is pretty dry. Things should become clearer as we add features to our implementation.
-
- To start with, we will get the result_of::value_of metafunction working. To
- do this, we provide a specialization of the boost::fusion::extension::value_of_impl
+ To start with, we will get the result_of::value_of
metafunction working. To
+ do this, we provide a specialization of the boost::fusion::extension::value_of_impl
template for our iterator's tag type.
@@ -218,22 +218,22 @@
The implementation itself is pretty simple, it just uses 2 partial specializations
- to provide the type of the 2 different members of example_struct,
+ to provide the type of the 2 different members of example_struct
,
based on the index of the iterator.
- To understand how value_of_impl
- is used by the library we will look at the implementation of value_of:
+ To understand how value_of_impl
+ is used by the library we will look at the implementation of value_of
:
template <typename Iterator>
-struct value_of
+struct value_of
: extension::value_of_impl<typename detail::tag_of<Iterator>::type>::
template apply<Iterator>
{};
- So value_of
+ So value_of
uses tag dispatching
to select an MPL
Metafunction Class to provide its functionality. You will notice
@@ -241,7 +241,7 @@
Ok, lets enable dereferencing of our iterator. In this case we must provide
- a suitable specialization of deref_impl.
+ a suitable specialization of deref_impl
.
template<> @@ -279,17 +279,17 @@ }
- The use of deref_impl is
- very similar to that of value_of_impl,
- but it also provides some runtime functionality this time via the call static member function. To see how
- deref_impl is used, lets
- have a look at the implementation of deref:
+ The use of deref_impl
is
+ very similar to that of value_of_impl
,
+ but it also provides some runtime functionality this time via the call
static member function. To see how
+ deref_impl
is used, lets
+ have a look at the implementation of deref
:
namespace result_of { template <typename Iterator> - struct deref + structderef
: extension::deref_impl<typename detail::tag_of<Iterator>::type>:: template apply<Iterator> {}; @@ -297,24 +297,24 @@ template <typename Iterator> typename result_of::deref<Iterator>::type -deref(Iterator const& i) +deref
(Iterator const& i) { typedef result_of::deref<Iterator> deref_meta; return deref_meta::call(i); }
- So again result_of::deref uses tag
- dispatching in exactly the same way as the value_of implementation. The runtime
- functionality used by deref is provided by the call static function of the selected MPL
+ So again result_of::deref
uses tag
+ dispatching in exactly the same way as the value_of
implementation. The runtime
+ functionality used by deref
is provided by the call
static function of the selected MPL
Metafunction Class.
- The actual implementation of deref_impl
- is slightly more complex than that of value_of_impl.
- We also need to implement the call
+ The actual implementation of deref_impl
+ is slightly more complex than that of value_of_impl
.
+ We also need to implement the call
function, which returns a reference to the appropriate member of the underlying
- sequence. We also require a little bit of metaprogramming to return const references if the underlying sequence
+ sequence. We also require a little bit of metaprogramming to return const
references if the underlying sequence
is const.
![]() |
Note | -
---|---|
+ | |
Although there is a fair amount of left to do to produce a fully fledged
- Fusion sequence, value_of and deref illustrate all the signficant
+ Fusion sequence, |
- Ok, now we have seen the way value_of and deref work, everything else will
+ Ok, now we have seen the way value_of
and deref
work, everything else will
work in pretty much the same way. Lets start with forward iteration, by providing
- a next_impl:
+ a next_impl
:
template<> @@ -360,40 +360,37 @@ };
- This should be very familiar from our deref_impl
+ This should be very familiar from our deref_impl
implementation, we will be using this approach again and again now. Our design
- is simply to increment the index
+ is simply to increment the index
counter to move on to the next element. The various other iterator manipulations
- we need to perform will all just involve simple calculations with the index variables.
+ we need to perform will all just involve simple calculations with the index
variables.
- We also need to provide a suitable equal_to_impl
- so that iterators can be correctly compared. A Bidirectional
- Iterator will also need an implementation of prior_impl.
- For a Random
- Access Iterator distance_impl
- and advance_impl also need
+ We also need to provide a suitable equal_to_impl
+ so that iterators can be correctly compared. A Bidirectional
+ Iterator will also need an implementation of prior_impl
.
+ For a Random
+ Access Iterator distance_impl
+ and advance_impl
also need
to be provided in order to satisfy the necessary complexity guarantees. As
- our iterator is a Random
+ our iterator is a Random
Access Iterator we will have to implement all of these functions.
- Full implementations of prior_impl,
- advance_impl, distance_impl and equal_to_impl
+ Full implementations of prior_impl
,
+ advance_impl
, distance_impl
and equal_to_impl
are provided in the example code.
In order that Fusion can correctly identify our sequence as a Fusion sequence,
- we need to enable is_sequence
- for our sequence type. As usual we just create an impl
+ we need to enable is_sequence
+ for our sequence type. As usual we just create an impl
type specialized for our sequence tag:
@@ -405,14 +402,14 @@
};
- We've some similar formalities to complete, providing category_of_impl
- so Fusion can correctly identify our sequence type, and is_view_impl
+ We've some similar formalities to complete, providing category_of_impl
+ so Fusion can correctly identify our sequence type, and is_view_impl
so Fusion can correctly identify our sequence as not being a View
type. Implementations are provide in the example code.
Now we've completed some formalities, on to more interesting features. Lets
- get begin working so that we can get
+ get begin
working so that we can get
an iterator to start accessing the data in our sequence.
@@ -435,33 +432,32 @@The implementation uses the same ideas we have applied throughout, in this case we are just creating one of the iterators we developed earlier, pointing - to the first element in the sequence. The implementation of end is very similar, and is provided + to the first element in the sequence. The implementation of
end
is very similar, and is provided in the example code.- For our Random - Access Sequence we will also need to implement size_impl, - value_at_impl and at_impl. + For our Random + Access Sequence we will also need to implement
-size_impl
, +value_at_impl
andat_impl
.- +
++ Enabling our type as an associative container -
- In order for example_struct + In order for
example_struct
to serve as an associative container, we need to enable 3 lookup features, - at_key, value_at_key and has_key. We also need to provide - an implementation of the is_associative +at_key
,value_at_key
andhas_key
. We also need to provide + an implementation of theis_associative
trait so that our sequence can be correctly identified as an associative container.- To implement at_key_impl - we need to associate the fields::age and - fields::age types described in the Quick - Start guide with the appropriate members of example_struct. + To implement
at_key_impl
+ we need to associate thefields::age
and +fields::age
types described in the Quick + Start guide with the appropriate members ofexample_struct
. Our implementation is as follows:@@ -504,18 +500,18 @@Its all very similar to the implementations we've seen previously, such as - deref_impl and value_of_impl. Instead of identifying the +
-deref_impl
andvalue_of_impl
. Instead of identifying the members by index or position, we are now selecting them using the types - fields::name and fields::age. - The implementations of value_at_key_impl - and has_key_impl are equally +fields::name
andfields::age
. + The implementations ofvalue_at_key_impl
+ andhas_key_impl
are equally straightforward, and are provided in the example code, along with an implementation - of is_associative_impl. + ofis_associative_impl
.- +
++ Summary -
We've now worked through the entire process for adding a new random access sequence and we've also enabled our type to serve as an associative container. @@ -523,8 +519,8 @@ pattern.
- The support for std::pair, MPL - sequences, and boost::array all use the same approach, and provide + The support for
diff --git a/doc/html/fusion/extension/iterator_facade.html b/doc/html/fusion/extension/iterator_facade.html index 89e46421..09c0597b 100644 --- a/doc/html/fusion/extension/iterator_facade.html +++ b/doc/html/fusion/extension/iterator_facade.html @@ -3,7 +3,7 @@std::pair
, MPL + sequences, andboost::array
all use the same approach, and provide additional examples of the approach for a variety of types.Iterator Facade - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,28 +24,29 @@ ++ Description - +
- The iterator_facade + The
-iterator_facade
template provides an intrusive mechanism for producing a conforming Fusion iterator.- +
++ Synopsis -
template<typename Derived, typename TravesalTag> struct iterator_facade;-- +
++ Usage -
The user of iterator_facade derives his iterator type from a specialization of iterator_facade and passes the derived iterator type as the first template @@ -57,8 +58,8 @@ type.
--Table 1.93. Parameters
-+
Table 1.93. Parameters
++
@@ -79,20 +80,20 @@ - iterator, It, It1, - It2 +
iterator
,It
,It1
, +It2
- A type derived from iterator_facade + A type derived from
iterator_facade
- - N +
N
@@ -103,11 +104,11 @@ --Table 1.94. Key Expressions
-+
+Table 1.94. Key Expressions
++
@@ -134,12 +135,12 @@ - iterator::template value_of<It>::type +
iterator::template value_of<It>::type
- The element stored at iterator position It + The element stored at iterator position
It
@@ -151,12 +152,12 @@ - iterator::template deref<It>::type +
iterator::template deref<It>::type
- The type returned when dereferencing an iterator of type It + The type returned when dereferencing an iterator of type
It
@@ -168,12 +169,12 @@ - iterator::template deref<It>::call(it) +
iterator::template deref<It>::call(it)
- Dereferences iterator it + Dereferences iterator
it
@@ -185,12 +186,12 @@ - iterator::template next<It>::type +
iterator::template next<It>::type
- The type of the next element from It + The type of the next element from
It
@@ -202,12 +203,12 @@ - iterator::template next<It>::call(it) +
iterator::template next<It>::call(it)
- The next iterator after it + The next iterator after
it
@@ -219,12 +220,12 @@ - iterator::template prior<It>::type +
iterator::template prior<It>::type
- The type of the next element from It + The type of the next element from
It
@@ -236,12 +237,12 @@ - iterator::template prior<It>::call(it) +
iterator::template prior<It>::call(it)
- The next iterator after it + The next iterator after
it
@@ -253,51 +254,51 @@ - iterator::template advance<It, N>::type +
iterator::template advance<It, N>::type
- The type of an iterator advanced N - elements from It + The type of an iterator advanced
N
+ elements fromIt
- Implemented in terms of next - and prior + Implemented in terms of
next
+ andprior
- iterator::template advance<It, N>::call(it) +
iterator::template advance<It, N>::call(it)
- An iterator advanced N - elements from it + An iterator advanced
N
+ elements fromit
- Implemented in terms of next - and prior + Implemented in terms of
next
+ andprior
- iterator::template distance<It1, It2>::type +
iterator::template distance<It1, It2>::type
@@ -310,13 +311,13 @@ - The distance between iterators of type It1 - and It2 as an MPL + The distance between iterators of type
It1
+ andIt2
as an MPL Integral Constant- iterator::template distance<It1, It2>::call(it1, it2) +
iterator::template distance<It1, It2>::call(it1, it2)
- The distance between iterator it1 - and it2 + The distance between iterator
it1
+ andit2
@@ -328,56 +329,56 @@ - iterator::template equal_to<It1, It2>::type +
iterator::template equal_to<It1, It2>::type
- The distance between iterators of type It1 - and It2 + The distance between iterators of type
It1
+ andIt2
- boost::same_type<It1, It2>::type +
boost::same_type<It1, It2>::type
- - iterator::template equal_to<It1, It2>::call(it1, it2) +
iterator::template equal_to<It1, It2>::call(it1, it2)
- The distance between iterators it1 - and it2 + The distance between iterators
it1
+ andit2
- boost::same_type<It1, It2>::type() +
boost::same_type<It1, It2>::type()
- +
++ Header -
#include <boost/fusion/iterator/iterator_facade.hpp> #include <boost/fusion/include/iterator_facade.hpp>-- +
++ Example -
- A full worked example using iterator_facade is provided in triple.cpp + A full worked example using
diff --git a/doc/html/fusion/extension/macros.html b/doc/html/fusion/extension/macros.html index 3f34c28f..8047cb09 100644 --- a/doc/html/fusion/extension/macros.html +++ b/doc/html/fusion/extension/macros.html @@ -3,19 +3,19 @@iterator_facade
is provided in triple.cpp in the extension examples.Macros - + - +
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
BOOST_FUSION_ADAPT_ASSOC_STRUCT is a macro that can be used to generate all the necessary boilerplate to make an arbitrary struct into a model - of Random - Access Sequence and Associative + of Random + Access Sequence and Associative Sequence.
-BOOST_FUSION_ADAPT_ASSOC_STRUCT( struct_name @@ -50,10 +49,10 @@ ... )-
BOOST_FUSION_ADAPT_ASSOC_STRUCT( struct_name @@ -63,28 +62,26 @@ )
- The above macro generates the necessary code to adapt struct_name
- as a model of Random
- Access Sequence and Associative
- Sequence. The sequence of (member_typeN,
+ The above macro generates the necessary code to adapt struct_name
+ as a model of Random
+ Access Sequence and Associative
+ Sequence. The sequence of (member_typeN,
member_nameN,
- key_typeN)
+ key_typeN)
triples declare the type, name and key type of each of the struct members
that will be part of the sequence.
- The macro should be used at global scope, and struct_name
+ The macro should be used at global scope, and struct_name
should be the fully namespace qualified name of the struct to be converted.
/adapted/struct/adapt_assoc_struct.hpp>
-namespace demo { diff --git a/doc/html/fusion/extension/macros/adapt_struct.html b/doc/html/fusion/extension/macros/adapt_struct.html index 7fe39093..355e2714 100644 --- a/doc/html/fusion/extension/macros/adapt_struct.html +++ b/doc/html/fusion/extension/macros/adapt_struct.html @@ -1,21 +1,21 @@ -BOOST_FUSION_ADAPT_STRUCT +BOOST_FUSION_ADAPT_STRUCT - + - +
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
BOOST_FUSION_ADAPT_STRUCT is a macro that can be used to generate all the - necessary boilerplate to make an arbitrary struct into a Random + necessary boilerplate to make an arbitrary struct into a Random Access Sequence.
-BOOST_FUSION_ADAPT_STRUCT( struct_name @@ -47,10 +47,10 @@ ... )-
BOOST_FUSION_ADAPT_STRUCT( struct_name, @@ -60,25 +60,24 @@ )
- The above macro generates the necessary code to adapt struct_name
- as a model of Random
- Access Sequence. The sequence of (member_typeN,
- member_nameN)
+ The above macro generates the necessary code to adapt struct_name
+ as a model of Random
+ Access Sequence. The sequence of (member_typeN,
+ member_nameN)
pairs declare the type and names of each of the struct members that will
be part of the sequence.
- The macro should be used at global scope, and struct_name
+ The macro should be used at global scope, and struct_name
should be the fully namespace qualified name of the struct to be converted.
/adapted/struct/adapt_struct.hpp>
-namespace demo { diff --git a/doc/html/fusion/extension/sequence_facade.html b/doc/html/fusion/extension/sequence_facade.html index 30bad880..c24982cc 100644 --- a/doc/html/fusion/extension/sequence_facade.html +++ b/doc/html/fusion/extension/sequence_facade.html @@ -3,10 +3,10 @@Sequence Facade - + - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,34 +24,35 @@ ++ Description - +
- The sequence_facade + The
-sequence_facade
template provides an intrusive mechanism for producing a conforming Fusion iterator.- +
++ Synopsis -
template<typename Derived, typename TravesalTag, typename IsView = mpl::false_> struct sequence_facade;-- +
++ Usage -
- The user of sequence_facade derives his sequence - type from a specialization of sequence_facade and passes the derived + The user of
sequence_facade
derives his sequence + type from a specialization ofsequence_facade
and passes the derived sequence type as the first template parameter. The second template parameter should be the traversal category of the sequence being implemented. The 3rd - parameter should be set to mpl::true_ + parameter should be set tompl::true_
if the sequence is a view.@@ -59,8 +60,8 @@ type.
--Table 1.91. Parameters
-+
Table 1.91. Parameters
++
@@ -81,19 +82,19 @@ - sequence, Seq +
sequence
,Seq
- A type derived from sequence_facade + A type derived from
sequence_facade
- - N +
N
@@ -104,11 +105,11 @@ --Table 1.92. Key Expressions
-+
+Table 1.92. Key Expressions
++
@@ -129,60 +130,60 @@ - sequence::template begin<Seq>::type +
sequence::template begin<Seq>::type
- The type of an iterator to the beginning of a sequence of type Seq + The type of an iterator to the beginning of a sequence of type
Seq
- sequence::template begin<Seq>::call(seq) +
sequence::template begin<Seq>::call(seq)
- An iterator to the beginning of sequence seq + An iterator to the beginning of sequence
seq
- sequence::template end<Seq>::type +
sequence::template end<Seq>::type
- The type of an iterator to the end of a sequence of type Seq + The type of an iterator to the end of a sequence of type
Seq
- sequence::template end<Seq>::call(seq) +
sequence::template end<Seq>::call(seq)
- An iterator to the end of sequence seq + An iterator to the end of sequence
seq
- sequence::template size<Seq>::type +
sequence::template size<Seq>::type
- The size of a sequence of type Seq + The size of a sequence of type
@@ -191,71 +192,71 @@Seq
as an MPL Integral Constant- sequence::template size<Seq>::call(seq) +
sequence::template size<Seq>::call(seq)
- The size of sequence seq + The size of sequence
seq
- sequence::template at<Seq, N>::type +
sequence::template at<Seq, N>::type
- The type of element N - in a sequence of type Seq + The type of element
N
+ in a sequence of typeSeq
- sequence::template at<Seq, N>::call(seq) +
sequence::template at<Seq, N>::call(seq)
- Element N in sequence - seq + Element
N
in sequence +seq
- - sequence::template value_at<Sequence, N>::type +
sequence::template value_at<Sequence, N>::type
- The type of the Nth - element in a sequence of type Seq + The type of the
N
th + element in a sequence of typeSeq
- +
++ Include -
#include <boost/fusion/sequence/sequence_facade.hpp> #include <boost/fusion/include/sequence_facade.hpp>-- +
++ Example -
- A full worked example using sequence_facade is provided in triple.cpp + A full worked example using
diff --git a/doc/html/fusion/functional.html b/doc/html/fusion/functional.html index 910a7b49..3a2e5e20 100644 --- a/doc/html/fusion/functional.html +++ b/doc/html/fusion/functional.html @@ -3,10 +3,10 @@sequence_facade
is provided in triple.cpp in the extension examples.Functional - + - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,7 +24,8 @@
- Concepts
@@ -64,11 +65,11 @@
/functional.hpp>
-- +
++ Fused and unfused forms -
What is a function call?
@@ -79,7 +80,7 @@ It is a name and a tuple written next to each other, left-to-right.- Although the C++ syntax does not allow to replace (a,b,c) + Although the C++ syntax does not allow to replace
@@ -87,25 +88,25 @@ invoke(f,my_sequence)(a,b,c)
with some Fusion Sequence, introducing yet another function provides a solution:- Alternatively it is possible to apply a simple transformation to f + Alternatively it is possible to apply a simple transformation to
f
in order to achieve the same effect:f tuple <=> f' (tuple)- Now, f' is an unary function that takes the arguments to - f as a tuple; f' - is the fused form of f. + Now,
-f'
is an unary function that takes the arguments to +f
as a tuple;f'
+ is the fused form off
. Reading the above equivalence right-to-left to get the inverse transformation, - f is the unfused - form of f'. +f
is the unfused + form off'
.- +
++ Calling functions and function objects -
Having generic C++ code call back arbitrary functions provided by the client used to be a heavily repetitive task, as different functions can differ in @@ -118,8 +119,7 @@
Transforming an unfused function into its fused counterpart allows n-ary calls - from an algorithm that invokes an unary Polymorphic + from an algorithm that invokes an unary Polymorphic Function Object with Sequence arguments.
@@ -129,11 +129,11 @@ variant has a corresponding generator function template that returns an adapter instance for the given argument. -- +
++ Making Fusion code callable through a function object interface -
Transforming a fused function into its unfused counterpart allows to create function objects to accept arbitrary calls. In other words, an unary function diff --git a/doc/html/fusion/functional/adapters.html b/doc/html/fusion/functional/adapters.html index f5f0ecce..d0d579e1 100644 --- a/doc/html/fusion/functional/adapters.html +++ b/doc/html/fusion/functional/adapters.html @@ -1,13 +1,12 @@
-Adapters +Adapters - + - + @@ -15,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -25,7 +24,8 @@+
- fused
- fused_procedure
diff --git a/doc/html/fusion/functional/adapters/fused.html b/doc/html/fusion/functional/adapters/fused.html index d2a50fc1..dd465abb 100644 --- a/doc/html/fusion/functional/adapters/fused.html +++ b/doc/html/fusion/functional/adapters/fused.html @@ -3,10 +3,10 @@fused - + - - + + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,53 +24,51 @@+ Description - +
- An unary Polymorphic Function - Object adapter template for Deferred - Callable Object target functions. It takes a Forward + An unary Polymorphic Function + Object adapter template for Deferred + Callable Object target functions. It takes a Forward Sequence that contains the arguments for the target function.
The type of the target function is allowed to be const qualified or a reference. Const qualification is preserved and propagated appropriately (in other - words, only const versions of operator() can be used + words, only const versions of
operator()
can be used for a target function object that is const or, if the target function object is held by value, the adapter is const - these semantics have nothing to do with the const qualification of a member function, which is referring - to the type of object pointed to by this which is specified + to the type of object pointed to bythis
which is specified with the first element in the sequence passed to the adapter).If the target function is a pointer to a class members, the corresponding object can be specified as a reference, pointer, or smart pointer. In case - of the latter, a freestanding get_pointer function must - be defined (Boost provides this function for std::auto_ptr - and boost::shared_ptr). + of the latter, a freestanding
get_pointer
function must + be defined (Boost provides this function forstd::auto_ptr
+ andboost::shared_ptr
)./functional/adapter/fused.hpp>
-- +
++ Synopsis -
template <typename Function> class fused;-- +
++ Template parameters -
-
@@ -97,13 +95,12 @@ - Function +
Function
@@ -113,47 +110,44 @@ - +
++ Model of -
-Notation
-
- R
+R
- -
- A possibly const qualified Deferred + A possibly const qualified Deferred Callable Object type or reference type thereof
- r
+r
- -
- An object convertible to R + An object convertible to
R
- s
+s
- -
A Sequence of arguments that - are accepted by r + are accepted by
r
- f
+f
- An instance of fused<R> + An instance of
fused<R>
- +
++ Expression Semantics -
-
@@ -175,61 +169,61 @@ - fused<R>(r) +
fused<R>(r)
Creates a fused function as described above, initializes the target - function with r. + function with
r
.- fused<R>() +
fused<R>()
- Creates a fused function as described above, attempts to use R's default constructor. + Creates a fused function as described above, attempts to use
R
's default constructor.- f(s) +
f(s)
- Calls r with the - elements in s as + Calls
r
with the + elements ins
as its arguments.- +
++ Example -
-fused< std::plus<long> > f; -assert(f(make_vector(1,2l)) == 3l); +fused<-std::plus
<long> > f; +assert(f(make_vector
(1,2l)) == 3l);- +
++ See also -
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- An unary Polymorphic Function - Object adapter template for a Polymorphic - Function Object target function. It takes a Forward + An unary Polymorphic Function + Object adapter template for a Polymorphic + Function Object target function. It takes a Forward Sequence that contains the arguments for the target function.
The type of the target function is allowed to be const qualified or a reference.
Const qualification is preserved and propagated appropriately (in other
- words, only const versions of operator() can be used
+ words, only const versions of operator()
can be used
for an target function object that is const or, if the target function
object is held by value, the adapter is const).
/functional/adapter/fused_function_object.hpp>
-template <class Function> class fused_function_object;-
- Function
+ |
@@ -103,48 +100,45 @@ |
Notation
R
- A possibly const qualified Polymorphic + A possibly const qualified Polymorphic Function Object type or reference type thereof
r
- An object convertible to R
+ An object convertible to R
s
A Sequence of arguments that
- are accepted by r
+ are accepted by r
f
- An instance of fused<R>
+ An instance of fused<R>
- fused_function_object<R>(r)
+ |
Creates a fused function as described above, initializes the target
- function with r.
+ function with |
- fused_function_object<R>()
+ |
- Creates a fused function as described above, attempts to use R's default constructor.
+ Creates a fused function as described above, attempts to use |
- f(s)
+ |
- Calls r with the
- elements in s as
+ Calls |
template<class SeqOfSeqs, class Func> -typename result_of::transform< zip_view<SeqOfSeqs> const, +typename-result_of::transform
< zip_view<SeqOfSeqs> const, fused_function_object<Func const &> >::type n_ary_transform(SeqOfSeqs const & s, Func const & f) { - return transform(zip_view<SeqOfSeqs>(s), + returntransform
(zip_view<SeqOfSeqs>(s), fused_function_object<Func const &>(f)); } @@ -236,23 +230,22 @@ void try_it() { - vector<int,float> a(2,2.0f); - vector<int,float> b(1,1.5f); - vector<int,float> c(1,0.5f); - assert(c == n_ary_transform(vector_tie(a,b), sub())); +vector
<int,float> a(2,2.0f); +vector
<int,float> b(1,1.5f); +vector
<int,float> c(1,0.5f); + assert(c == n_ary_transform(vector_tie
(a,b), sub())); }
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- An unary Polymorphic Function - Object adapter template for Callable - Object target functions. It takes a Forward + An unary Polymorphic Function + Object adapter template for Callable + Object target functions. It takes a Forward Sequence that contains the arguments for the target function.
- The result is discared and the adapter's return type is void.
+ The result is discared and the adapter's return type is void
.
The type of the target function is allowed to be const qualified or a reference.
Const qualification is preserved and propagated appropriately (in other
- words, only const versions of operator() can be used
+ words, only const versions of operator()
can be used
for a target function object that is const or, if the target function object
is held by value, the adapter is const - these semantics have nothing to
do with the const qualification of a member function, which is referring
- to the type of object pointed to by this which is specified
+ to the type of object pointed to by this
which is specified
with the first element in the sequence passed to the adapter).
If the target function is a pointer to a members function, the corresponding
object can be specified as a reference, pointer, or smart pointer. In case
- of the latter, a freestanding get_pointer function must
- be defined (Boost provides this function for std::auto_ptr
- and boost::shared_ptr).
+ of the latter, a freestanding get_pointer
function must
+ be defined (Boost provides this function for std::auto_ptr
+ and boost::shared_ptr
).
The target function must not be a pointer to a member object (dereferencing @@ -65,19 +64,19 @@
/functional/adapter/fused_procedure.hpp>
-template <typename Function> class fused_procedure;-
- Function
+ |
- Callable Object + Callable Object type |
@@ -119,47 +118,45 @@
Notation
R
- A possibly const qualified Callable + A possibly const qualified Callable Object type or reference type thereof
r
- An object convertible to R
+ An object convertible to R
s
A Sequence of arguments that
- are accepted by r
+ are accepted by r
f
- An instance of fused<R>
+ An instance of fused<R>
- fused_procedure<R>(r)
+ |
Creates a fused function as described above, initializes the target
- function with r.
+ function with |
- fused_procedure<R>()
+ |
- Creates a fused function as described above, attempts to use R's default constructor.
+ Creates a fused function as described above, attempts to use |
- f(s)
+ |
- Calls r with the
- elements in s as
+ Calls |
template<class SequenceOfSequences, class Func> void n_ary_for_each(SequenceOfSequences const & s, Func const & f) { - for_each(zip_view<SequenceOfSequences>(s), +-for_each
(zip_view
<SequenceOfSequences>(s), fused_procedure<Func const &>(f)); } void try_it() { - vector<int,float> a(2,2.0f); - vector<int,float> b(1,1.5f); +vector
<int,float> a(2,2.0f); +vector
<int,float> b(1,1.5f); using namespace boost::lambda; - n_ary_for_each(vector_tie(a,b), _1 -= _2); - assert(a == make_vector(1,0.5f)); + n_ary_for_each(vector_tie
(a,b), _1 -= _2); + assert(a ==make_vector
(1,0.5f)); }
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- An n-ary Polymorphic Function - Object adapter template for an unary Polymorphic + An n-ary Polymorphic Function + Object adapter template for an unary Polymorphic Function Object target function. When called, its arguments are - bundled to a Random + bundled to a Random Access Sequence of references that is passed to the target function. Non-const LValue arguments are transported as references to non-const, otherwise references to const are used.
-
The type of the target function is allowed to be const qualified or a reference.
Const qualification is preserved and propagated appropriately (in other
- words, only const versions of operator() can be used
+ words, only const versions of operator()
can be used
if the target function object is const - or, in case the target function
object is held by value, the adapter is const).
/functional/adapter/unfused_generic.hpp>
-template <class Function> class unfused_generic;-
- Function
+ |
- An unary Polymorphic + An unary Polymorphic Function Object |
@@ -112,52 +112,49 @@
Notation
F
- A possibly const qualified, unary Polymorphic + A possibly const qualified, unary Polymorphic Function Object type or reference type thereof
f
- An object convertible to F
+ An object convertible to F
UG
- The type unfused_generic<F>
+ The type unfused_generic<F>
ug
- An instance of UG,
- initialized with f
+ An instance of UG
,
+ initialized with f
a0
...aN
- Arguments to ug
+ Arguments to ug
- UG(f)
+ |
Creates a fused function as described above, initializes the target
- function with f.
+ function with |
- UG()
+ |
- Creates a fused function as described above, attempts to use F's default constructor.
+ Creates a fused function as described above, attempts to use |
- ug(a0...aN)
+ |
- Calls f with a
+ Calls |
template <typename Function, typename T> class fused_bound_1st @@ -268,17 +265,17 @@ assert(bind_1st(std::plus<float>(), 1)(0.5f) == 1.5f); }-
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- An n-ary Polymorphic Function - Object adapter template for an unary Polymorphic + An n-ary Polymorphic Function + Object adapter template for an unary Polymorphic Function Object target function. When called, its arguments are - bundled to a Random + bundled to a Random Access Sequence of references that is passed to the target function object. Only LValue arguments are accepted.
The type of the target function is allowed to be const qualified or a reference.
Const qualification is preserved and propagated appropriately (in other
- words, only const versions of operator() can be used
+ words, only const versions of operator()
can be used
if the target function object is const - or, in case the target function
object is held by value, the adapter is const).
/functional/adapter/unfused_lvalue_args.hpp>
-template <class Function> class unfused_lvalue_args;-
- Function
+ |
@@ -105,52 +102,49 @@ |
Notation
F
- A possibly const qualified, unary Polymorphic + A possibly const qualified, unary Polymorphic Function Object type or reference type thereof
f
- An object convertible to F
+ An object convertible to F
UL
- The type unfused_lvalue_args<F>
+ The type unfused_lvalue_args<F>
ul
- An instance of UL,
- initialized with f
+ An instance of UL
,
+ initialized with f
a0
...aN
- Arguments to ul
+ Arguments to ul
- UL(f)
+ |
Creates a fused function as described above, initializes the target
- function with f.
+ function with |
- UL()
+ |
- Creates a fused function as described above, attempts to use F's default constructor.
+ Creates a fused function as described above, attempts to use |
- ul(a0...aN)
+ |
- Calls f with a
+ Calls |
struct fused_incrementer
{
@@ -226,7 +220,7 @@
template <class Seq>
void operator()(Seq const & s) const
{
- for_each(s,++boost::lambda::_1);
+ for_each
(s,++boost::lambda::_1);
}
};
@@ -238,15 +232,15 @@
assert(a == 3 && b == 'Y');
}
-![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- An n-ary Polymorphic Function - Object adapter template for an unary Polymorphic + An n-ary Polymorphic Function + Object adapter template for an unary Polymorphic Function Object target function. When called, its arguments are - bundled to a Random + bundled to a Random Access Sequence of references that is passed to the target function object. All referenced objects in the sequence are const qualified.
The type of the target function is allowed to be const qualified or a reference.
Const qualification is preserved and propagated appropriately (in other
- words, only const versions of operator() can be used
+ words, only const versions of operator()
can be used
if the target function object is const - or, in case the target function
object is held by value, the adapter is const).
/functional/adapter/unfused_rvalue_args.hpp>
-template <class Function> class unfused_rvalue_args;-
- Function
+ |
@@ -105,52 +102,49 @@ |
Notation
F
- A possibly const qualified, unary Polymorphic + A possibly const qualified, unary Polymorphic Function Object type or reference type thereof
f
- An object convertible to F
+ An object convertible to F
UR
- The type unfused_rvalue_args<F>
+ The type unfused_rvalue_args<F>
ur
- An instance of UR,
- initialized with f
+ An instance of UR
,
+ initialized with f
a0
...aN
- Arguments to ur
+ Arguments to ur
- UR(f)
+ |
Creates a fused function as described above, initializes the target
- function with f.
+ function with |
- UR()
+ |
- Creates a fused function as described above, attempts to use F's default constructor.
+ Creates a fused function as described above, attempts to use |
- ur(a0...aN)
+ |
- Calls f with a
+ Calls |
struct sequence_printer { @@ -236,17 +230,17 @@ print(24,"bottles of beer in",'a',"box."); }-
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- An n-ary Polymorphic Function - Object adapter template for an unary Polymorphic + An n-ary Polymorphic Function + Object adapter template for an unary Polymorphic Function Object target function. When called, its arguments are - bundled to a Random + bundled to a Random Access Sequence that is passed to the target function object.
@@ -46,37 +44,43 @@
The type of the target function is allowed to be const qualified or a reference.
Const qualification is preserved and propagated appropriately (in other
- words, only const versions of operator() can be used
+ words, only const versions of operator()
can be used
if the target function object is const - or, in case the target function
object is held by value, the adapter is const).
/functional/adapter/unfused_typed.hpp>
-template <class Function, class Sequence> class unfused_typed;-
- Function
+ |
@@ -122,7 +125,7 @@ |
- Sequence
+ |
@@ -137,57 +140,54 @@ |
Notation
F
- A possibly const qualified, unary Polymorphic + A possibly const qualified, unary Polymorphic Function Object type or reference type thereof
f
- An object convertible to F
+ An object convertible to F
S
A Sequence of parameter types
UT
- The type unfused_typed<F,S>
+ The type unfused_typed<F,S>
ut
- An instance of UT,
- initialized with f
+ An instance of UT
,
+ initialized with f
a0
...aN
- Arguments to ut, convertible
- to the types in S
+ Arguments to ut
, convertible
+ to the types in S
- UT(f)
+ |
Creates a fused function as described above, initializes the target
- function with f.
+ function with |
- UT()
+ |
- Creates a fused function as described above, attempts to use F's default constructor.
+ Creates a fused function as described above, attempts to use |
- ut(a0...aN)
+ |
- Calls f with an
- instance of S (or
- a subsequence of S
+ Calls |
struct add_assign // applies operator+= { @@ -318,16 +318,16 @@ assert(a == 8 && b == 'Z'); }-
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
A pointer to a function, a pointer to member function, a pointer to member data, or a class type whose objects can appear immediately to the left of a function call operator.
-
& a_free_function
& a_class::a_static_member_function
@@ -63,8 +63,7 @@
// using namespace boost;
bind(std::less<int>(), _1, 5)
lambda::_1 += lambda::_2;
-fusion::make_fused_function_object(std::less<int>())
+fusion::make_fused_function_object
(std::less<int>())
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Callable Object + Callable Object types that work with Boost.ResultOf to determine the result of a call.
-Notation
F
A possibly const qualified Deferred Callable Object type
A1
+ ...AN
Argument types
a1
+ ...aN
- Objects or references to objects with types A1
- ...AN
+ Objects or references to objects with types A1
+ ...AN
T1
+ ...TN
- Ti is Ai &
- if ai is an LValue,
- same as Ai, otherwise
+ T
i is A
i &
+ if a
i is an LValue,
+ same as A
i, otherwise
- boost::result_of< F(T1
- ...TN) >::type
+ |
- Result of a call with A1
- ...AN-typed
+ Result of a call with |
& a_free_function
& a_class::a_static_member_function
@@ -145,8 +143,7 @@
// using namespace boost;
bind(std::less<int>(), _1, 5)
// Note: Boost.Lambda expressions don't work with __boost_result_of__
-fusion::make_fused_function_object(std::less<int>())
+fusion::make_fused_function_object
(std::less<int>())
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- A non-member-pointer Deferred + A non-member-pointer Deferred Callable Object type.
-Notation
F
A possibly const-qualified Polymorphic Function Object type
f
An object or reference to an object of type F
A1
+ ...AN
Argument types
a1
+ ...aN
- Objects or references to objects with types A1
- ...AN
+ Objects or references to objects with types A1
+ ...AN
T1
+ ...TN
- Ti is Ai &
- if ai is an LValue,
- same as Ai, otherwise
+ T
i is A
i &
+ if a
i is an LValue,
+ same as A
i, otherwise
- f(a1,
- ...aN)
+ |
- result_of<
+ |
@@ -131,10 +126,10 @@ |
& a_free_function
& a_class::a_static_member_function
@@ -157,8 +152,7 @@
// using namespace boost;
bind(std::less<int>(), _1, 5)
// Note: Boost.Lambda expressions don't work with __boost_result_of__
-fusion::make_fused_function_object(std::less<int>())
+fusion::make_fused_function_object
(std::less<int>())
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- A non-member-pointer Callable + A non-member-pointer Callable Object type: A pointer to a function or a class type whose objects can appear immediately to the left of a function call operator.
-Notation
F
A possibly const qualified Deferred Callable Object type
f
An object or reference to an object of type F
A1
+ ...AN
Argument types
a1
+ ...aN
- Objects or references to objects with types A1
- ...AN
+ Objects or references to objects with types A1
+ ...AN
- f(a1,
- ...aN)
+ |
@@ -115,10 +113,10 @@ |
& a_free_function
& a_class::a_static_member_function
@@ -138,8 +136,7 @@
// using namespace boost;
bind(std::less<int>(), _1, 5)
lambda::_1 += lambda::_2;
-fusion::make_fused_function_object(std::less<int>())
+fusion::make_fused_function_object
(std::less<int>())
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Creates a fused adapter for a given Deferred Callable Object.
+ Creates a fused
adapter for a given Deferred Callable Object.
The usual element
conversion is applied to the target function.
template <typename F>
-inline typename make_fused<F>::type
+inline typename make_fused
<F>::type
make_fused(F const & f);
- f
+ |
- Model of Deferred + Model of Deferred Callable Object |
@@ -97,7 +92,7 @@
- Return type: A specialization of fused.
+ Return type: A specialization of fused
.
- Semantics: Returns a fused adapter for f.
+ Semantics: Returns a fused
adapter for f
.
@@ -119,7 +114,7 @@ #include <boost/fusion/include/make_fused.hpp>
@@ -127,23 +122,22 @@ void try_it() { - vector<int,float> a(2,2.0f); - vector<int,float> b(1,1.5f); - vector<float,float> c(1.0f,0.5f); - assert(c == transform(zip(a,b), make_fused(& sub))); - assert(c == transform(zip(a,b), make_fused(std::minus<float>()))); +vector
<int,float> a(2,2.0f); +vector
<int,float> b(1,1.5f); +vector
<float,float> c(1.0f,0.5f); + assert(c ==transform
(zip
(a,b), make_fused(& sub))); + assert(c ==transform
(zip
(a,b), make_fused(std::minus
<float>()))); }
fused
deduce
make_fused
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Creates a fused_function_object adapter
- for a given Deferred
+ Creates a fused_function_object
adapter
+ for a given Deferred
Callable Object. The usual element
conversion is applied to the target function.
template <typename F>
-inline typename make_fused_function_object<F>::type
+inline typename make_fused_function_object
<F>::type
make_fused_function_object(F const & f);
- f
+ |
- Model of Polymorphic + Model of Polymorphic Function Object |
@@ -99,7 +93,7 @@
- Return type: A specialization of fused_function_object.
+ Return type: A specialization of fused_function_object
.
- Semantics: Returns a fused_function_object adapter
- for f.
+ Semantics: Returns a fused_function_object
adapter
+ for f
.
@@ -122,7 +116,7 @@ #include <boost/fusion/include/make_fused_function_object.hpp>
@@ -144,22 +138,21 @@ void try_it() { - vector<int,float> a(2,2.0f); - vector<int,float> b(1,1.5f); - vector<int,float> c(1,0.5f); - assert(c == transform(zip(a,b), make_fused_function_object(sub()))); +vector
<int,float> a(2,2.0f); +vector
<int,float> b(1,1.5f); +vector
<int,float> c(1,0.5f); + assert(c ==transform
(zip
(a,b), make_fused_function_object(sub()))); }
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Creates a fused_procedure adapter for
- a given Deferred
+ Creates a fused_procedure
adapter for
+ a given Deferred
Callable Object. The usual element
conversion applied to the target function.
template <typename F>
-inline typename make_fused_procedure<F>::type
+inline typename make_fused_procedure
<F>::type
make_fused_procedure(F const & f);
- f
+ |
- Model of Callable + Model of Callable Object |
@@ -98,7 +93,7 @@
- Return type: A specialization of fused_procedure.
+ Return type: A specialization of fused_procedure
.
- Semantics: Returns a fused_procedure adapter for
- f.
+ Semantics: Returns a fused_procedure
adapter for
+ f
.
@@ -121,25 +116,24 @@ #include <boost/fusion/include/make_fused_procedure.hpp>
-vector<int,int,int> v(1,2,3); +vector
<int,int,int> v(1,2,3); using namespace boost::lambda; make_fused_procedure(_1 += _2 - _3)(v); -assert(front(v) == 0); +assert(front
(v) == 0);
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Creates a unfused_generic adapter for
- a given, unary Polymorphic
+ Creates a unfused_generic
adapter for
+ a given, unary Polymorphic
Function Object. The usual element
conversion is applied to the target function.
template <typename F>
-inline typename make_unfused_generic<F>::type
+inline typename make_unfused_generic
<F>::type
make_unfused_generic(F const & f);
- f
+ |
- Model of Polymorphic + Model of Polymorphic Function Object |
@@ -99,7 +93,7 @@
- Return type: A specialization of unfused_generic.
+ Return type: A specialization of unfused_generic
.
- Semantics: Returns a unfused_generic adapter for
- f.
+ Semantics: Returns a unfused_generic
adapter for
+ f
.
@@ -122,7 +116,7 @@ #include <boost/fusion/include/make_unfused_generic.hpp>
@@ -158,15 +152,14 @@
}
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Creates a unfused_lvalue_args adapter
- for a given, unary Polymorphic
+ Creates a unfused_lvalue_args
adapter
+ for a given, unary Polymorphic
Function Object. The usual element
conversion is applied to the target function.
template <typename F>
-inline typename make_unfused_lvalue_args<F>::type
+inline typename make_unfused_lvalue_args
<F>::type
make_unfused_lvalue_args(F const & f);
- f
+ |
- Model of Polymorphic + Model of Polymorphic Function Object |
@@ -99,7 +93,7 @@
- Return type: A specialization of unfused_lvalue_args.
+ Return type: A specialization of unfused_lvalue_args
.
- Semantics: Returns a unfused_lvalue_args adapter
- for f.
+ Semantics: Returns a unfused_lvalue_args
adapter
+ for f
.
@@ -122,7 +116,7 @@ #include <boost/fusion/include/make_unfused_lvalue_args.hpp>
@@ -137,7 +131,7 @@
template <class Seq>
void operator()(Seq const & s) const
{
- for_each(s,++boost::lambda::_1);
+ for_each
(s,++boost::lambda::_1);
}
};
@@ -149,15 +143,14 @@
}
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Creates a unfused_rvalue_args adapter
- for a given, unary Polymorphic
+ Creates a unfused_rvalue_args
adapter
+ for a given, unary Polymorphic
Function Object. The usual element
conversion is applied to the target function.
template <typename F>
-inline typename make_unfused_rvalue_args<F>::type
+inline typename make_unfused_rvalue_args
<F>::type
make_unfused_rvalue_args(F const & f);
- f
+ |
- Model of Polymorphic + Model of Polymorphic Function Object |
@@ -98,7 +93,7 @@
- Return type: A specialization of unfused_rvalue_args.
+ Return type: A specialization of unfused_rvalue_args
.
- Semantics: Returns a unfused_rvalue_args adapter
- for f.
+ Semantics: Returns a unfused_rvalue_args
adapter
+ for f
.
@@ -121,7 +116,7 @@ #include <boost/fusion/include/make_unfused_rvalue_args.hpp>
@@ -147,15 +142,14 @@
}
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Returns the result type of make_fused.
+ Returns the result type of make_fused
.
@@ -46,7 +43,7 @@ #include <boost/fusion/include/make_fused.hpp>
@@ -60,12 +57,11 @@
}
diff --git a/doc/html/fusion/functional/generation/metafunctions/mk_fused_fobj.html b/doc/html/fusion/functional/generation/metafunctions/mk_fused_fobj.html index 639fc218..b67b1fae 100644 --- a/doc/html/fusion/functional/generation/metafunctions/mk_fused_fobj.html +++ b/doc/html/fusion/functional/generation/metafunctions/mk_fused_fobj.html @@ -1,24 +1,21 @@ - |
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Returns the result type of make_fused_function_object.
+ Returns the result type of make_fused_function_object
.
@@ -47,7 +43,7 @@ #include <boost/fusion/include/make_fused_function_object.hpp>
@@ -61,12 +57,11 @@
}
diff --git a/doc/html/fusion/functional/generation/metafunctions/mk_fused_proc.html b/doc/html/fusion/functional/generation/metafunctions/mk_fused_proc.html index cdc1fc5d..f36eb387 100644 --- a/doc/html/fusion/functional/generation/metafunctions/mk_fused_proc.html +++ b/doc/html/fusion/functional/generation/metafunctions/mk_fused_proc.html @@ -1,24 +1,21 @@ - |
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Returns the result type of make_fused_procedure.
+ Returns the result type of make_fused_procedure
.
@@ -47,7 +43,7 @@ #include <boost/fusion/include/make_fused_procedure.hpp>
@@ -61,12 +57,11 @@
}
diff --git a/doc/html/fusion/functional/generation/metafunctions/mk_unfused_genrc.html b/doc/html/fusion/functional/generation/metafunctions/mk_unfused_genrc.html index 44465808..989834f4 100644 --- a/doc/html/fusion/functional/generation/metafunctions/mk_unfused_genrc.html +++ b/doc/html/fusion/functional/generation/metafunctions/mk_unfused_genrc.html @@ -1,24 +1,21 @@ - |
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Returns the result type of make_unfused_generic.
+ Returns the result type of make_unfused_generic
.
@@ -47,7 +43,7 @@ #include <boost/fusion/include/make_unfused_generic.hpp>
@@ -61,12 +57,11 @@
}
diff --git a/doc/html/fusion/functional/generation/metafunctions/mk_unfused_lvargs.html b/doc/html/fusion/functional/generation/metafunctions/mk_unfused_lvargs.html index 896cb942..265a895a 100644 --- a/doc/html/fusion/functional/generation/metafunctions/mk_unfused_lvargs.html +++ b/doc/html/fusion/functional/generation/metafunctions/mk_unfused_lvargs.html @@ -1,24 +1,21 @@ - |
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Returns the result type of make_unfused_lvalue_args.
+ Returns the result type of make_unfused_lvalue_args
.
@@ -47,7 +43,7 @@ #include <boost/fusion/include/make_unfused_lvalue_args.hpp>
@@ -61,12 +57,11 @@
}
diff --git a/doc/html/fusion/functional/generation/metafunctions/mk_unfused_rvargs.html b/doc/html/fusion/functional/generation/metafunctions/mk_unfused_rvargs.html index 62ede2eb..d278681c 100644 --- a/doc/html/fusion/functional/generation/metafunctions/mk_unfused_rvargs.html +++ b/doc/html/fusion/functional/generation/metafunctions/mk_unfused_rvargs.html @@ -1,14 +1,12 @@ - | ![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Returns the result type of make_unfused_rvalue_args.
+ Returns the result type of make_unfused_rvalue_args
.
@@ -46,7 +43,7 @@ #include <boost/fusion/include/make_unfused_rvalue_args.hpp>
@@ -60,12 +57,11 @@
}
diff --git a/doc/html/fusion/functional/invocation.html b/doc/html/fusion/functional/invocation.html index 107b46e1..0d368b72 100644 --- a/doc/html/fusion/functional/invocation.html +++ b/doc/html/fusion/functional/invocation.html @@ -3,11 +3,10 @@ | ![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Calls a Deferred + Calls a Deferred Callable Object with the arguments from a Sequence.
@@ -42,12 +41,12 @@
If the target function is a pointer to a class members, the corresponding
object can be specified as a reference, pointer, or smart pointer. In
- case of the latter, a freestanding get_pointer function
- must be defined (Boost provides this function for std::auto_ptr
- and boost::shared_ptr).
+ case of the latter, a freestanding get_pointer
function
+ must be defined (Boost provides this function for std::auto_ptr
+ and boost::shared_ptr
).
@@ -55,18 +54,18 @@ typename Function, class Sequence > -typename result_of::invoke<Function, Sequence>::type +typenameresult_of::invoke
<Function, Sequence>::type invoke(Function f, Sequence & s); template< typename Function, class Sequence > -typename result_of::invoke<Function, Sequence const>::type +typenameresult_of::invoke
<Function, Sequence const>::type invoke(Function f, Sequence const & s);
- f
+ |
@@ -115,13 +113,12 @@ |
- s
+ |
@@ -134,7 +131,7 @@ |
- Return type: Return type of f when invoked with the elements in
- s as its arguments.
+ Return type: Return type of f
when invoked with the elements in
+ s
as its arguments.
- Semantics: Invokes f
- with the elements in s
+ Semantics: Invokes f
+ with the elements in s
as arguments and returns the result of the call expression.
/functional/invocation/invoke.hpp>
-std::plus<int> add; -assert(invoke(add,make_vector(1,1)) == 2); +std::plus
<int> add; +assert(invoke(add,make_vector
(1,1)) == 2);
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Calls a Polymorphic Function + Calls a Polymorphic Function Object with the arguments from a Sequence.
@@ -43,7 +40,7 @@ and/or to control the const qualification of a function object.
@@ -51,20 +48,18 @@ typename Function, class Sequence > -typename result_of::invoke_function_object<Function, Sequence>::type +typenameresult_of::invoke_function_object
<Function, Sequence>::type invoke_function_object(Function f, Sequence & s); template< typename Function, class Sequence > -typename result_of::invoke_function_object<Function, Sequence const>::type +typenameresult_of::invoke_function_object
<Function, Sequence const>::type invoke_function_object(Function f, Sequence const & s);
- f
+ |
- Model of Polymorphic + Model of Polymorphic Function Object |
@@ -113,13 +107,12 @@
- s
+ |
- Model of Forward + Model of Forward Sequence |
@@ -132,7 +125,7 @@
- Return type: Return type of f when invoked with the elements in
- s as its arguments.
+ Return type: Return type of f
when invoked with the elements in
+ s
as its arguments.
- Semantics: Invokes f
- with the elements in s
+ Semantics: Invokes f
+ with the elements in s
as arguments and returns the result of the call expression.
/functional/invocation/invoke_function_object.hpp>
@@ -175,21 +168,19 @@
void try_it()
{
sub f;
- assert(f(2,1) == invoke_function_object(f,make_vector(2,1)));
+ assert(f(2,1) == invoke_function_object(f,make_vector
(2,1)));
}
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Calls a Callable + Calls a Callable Object with the arguments from a Sequence. The result of the call is ignored.
@@ -45,8 +43,8 @@
For pointers to class members corresponding object can be specified as
a reference, pointer, or smart pointer. In case of the latter, a freestanding
- get_pointer function must be defined (Boost provides
- this function for std::auto_ptr and boost::shared_ptr).
+ get_pointer
function must be defined (Boost provides
+ this function for std::auto_ptr
and boost::shared_ptr
).
The target function must not be a pointer to a member object (dereferencing @@ -54,7 +52,7 @@ isn't implemented).
@@ -62,20 +60,18 @@ typename Function, class Sequence > -typename result_of::invoke_procedure<Function, Sequence>::type +typenameresult_of::invoke_procedure
<Function, Sequence>::type invoke_procedure(Function f, Sequence & s); template< typename Function, class Sequence > -typename result_of::invoke_procedure<Function, Sequence const>::type +typenameresult_of::invoke_procedure
<Function, Sequence const>::type invoke_procedure(Function f, Sequence const & s);
- f
+ |
- Model of Callable + Model of Callable Object |
@@ -123,13 +119,12 @@
- s
+ |
- Model of Forward + Model of Forward Sequence |
@@ -142,7 +137,7 @@
- Return type: void
+ Return type: void
- Semantics: Invokes f
- with the elements in s
+ Semantics: Invokes f
+ with the elements in s
as arguments.
/functional/invocation/invoke_procedure.hpp>
-vector<int,int> v(1,2); +vector
<int,int> v(1,2); using namespace boost::lambda; invoke_procedure(_1 += _2, v); -assert(front(v) == 3); +assert(front
(v) == 3);
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Returns the result type of invoke.
+ Returns the result type of invoke
.
@@ -51,13 +51,13 @@
}
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Returns the result type of invoke_function_object.
+ Returns the result type of invoke_function_object
.
@@ -55,14 +52,13 @@
}
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Returns the result type of invoke_procedure.
+ Returns the result type of invoke_procedure
.
@@ -55,14 +52,13 @@
}
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
An advantage other languages such as Python and Lisp/ Scheme, ML and Haskell,
etc., over C++ is the ability to have heterogeneous containers that can hold
arbitrary element types. All the containers in the standard library can only
- hold a specific type. A vector<int>
- can only hold ints. A list<X> can
- only hold elements of type X,
+ hold a specific type. A vector<int>
+ can only hold int
s. A list<X>
can
+ only hold elements of type X
,
and so on.
@@ -41,8 +42,8 @@
on virtual functions to provide polymorphic behavior since the actual type
is erased as soon as you store a pointer to a derived class to a pointer to
its base. The held objects must be related: you cannot hold objects of unrelated
- types such as char, int, class
- X, float,
+ types such as char
, int
, class
+ X
, float
,
etc. Oh sure you can use something like Boost.Any
to hold arbitrary types, but then you pay more in terms of runtime costs and
due to the fact that you practically erased all type information, you'll have
@@ -51,7 +52,7 @@
The Boost.Tuple
library written by Jaakko
- Jarvi provides heterogeneous containers in C++. The tuple
+ Jarvi provides heterogeneous containers in C++. The tuple
is a basic data structure that can hold heterogeneous types. It's a good first
step, but it's not complete. What's missing are the algorithms. It's nice that
we can store and retrieve data to and from tuples, pass them around as arguments
@@ -89,23 +90,23 @@
fusion algorithms are functional in nature such that algorithms are non mutating
(no side effects). However, due to the high cost of returning full sequences
such as vectors and lists, Views are returned from Fusion
- algorithms instead. For example, the transform algorithm does not actually
- return a transformed version of the original sequence. transform returns a transform_view. This view holds a
+ algorithms instead. For example, the transform
algorithm does not actually
+ return a transformed version of the original sequence. transform
returns a transform_view
. This view holds a
reference to the original sequence plus the transform function. Iteration over
- the transform_view
+ the transform_view
will apply the transform function over the sequence elements on demand. This
lazy evaluation scheme allows us to chain as many algorithms
as we want without incurring a high runtime penalty.
The lazy evaluation scheme where algorithms return views
- allows operations such as push_back to be totally generic. In
- Fusion, push_back is actually a generic algorithm
- that works on all sequences. Given an input sequence s
- and a value x, Fusion's push_back algorithm simply returns
- a joint_view:
- a view that holds a reference to the original sequence s
- and the value x. Functions
+ allows operations such as push_back
to be totally generic. In
+ Fusion, push_back
is actually a generic algorithm
+ that works on all sequences. Given an input sequence s
+ and a value x
, Fusion's push_back
algorithm simply returns
+ a joint_view
:
+ a view that holds a reference to the original sequence s
+ and the value x
. Functions
that were once sequence specific and need to be implemented N times over N
different sequences are now implemented only once.
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Fusion iterators are divided into different traversal categories. Forward - Iterator is the most basic concept. Bidirectional - Iterator is a refinement of Forward - Iterator. Random - Access Iterator is a refinement of Bidirectional + Fusion iterators are divided into different traversal categories. Forward + Iterator is the most basic concept. Bidirectional + Iterator is a refinement of Forward + Iterator. Random + Access Iterator is a refinement of Bidirectional Iterator.
diff --git a/doc/html/fusion/iterator/concepts/bidirectional_iterator.html b/doc/html/fusion/iterator/concepts/bidirectional_iterator.html index 358b3268..787caa7d 100644 --- a/doc/html/fusion/iterator/concepts/bidirectional_iterator.html +++ b/doc/html/fusion/iterator/concepts/bidirectional_iterator.html @@ -1,24 +1,21 @@ -![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
A Bidirectional Iterator traverses a Sequence allowing movement in either direction one element at a time. @@ -41,42 +38,40 @@
Notation
i
A Bidirectional Iterator
I
A Bidirectional Iterator type
M
An MPL integral constant
N
An integral constant
- Forward Iterator + Forward Iterator
-- In addition to the requirements defined in Forward + In addition to the requirements defined in Forward Iterator, the following expressions must be valid:
@@ -125,13 +119,12 @@ | |
@@ -144,13 +137,12 @@ | |
@@ -163,13 +155,12 @@ | |
@@ -181,11 +172,11 @@ |
- result_of::prior<I>::type
+ |
@@ -216,15 +207,14 @@ |
The semantics of an expression are defined only where they differ from, - or are not defined in Forward + or are not defined in Forward Iterator
- An iterator to the element preceding i
+ An iterator to the element preceding |
- In addition to the invariants of Forward + In addition to the invariants of Forward Iterator, the following invariants always hold:
std::pair
iterator
boost::array
iterator
vector
iterator
iterator_range
+ (where adapted sequence is a Bidirectional
Sequence)
transform_view
+ (where adapted sequence is a Bidirectional
Sequence)
reverse_view
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
A Forward Iterator traverses a Sequence allowing movement in only one direction through it's elements, one element @@ -41,32 +39,32 @@
Notation
i
,
+ j
Forward Iterators
I
,
+ J
Forward Iterator types
M
An MPL integral constant
N
An integral constant
A type models Forward Iterator if, in addition to being CopyConstructable, the following expressions are valid: @@ -98,13 +96,12 @@
- i ==
- j
+ i ==
+ j
- i !=
- j
+ i !=
+ j
- result_of::distance<I,
- J>::type
+ result_of::distance
<I,
+ J>::type
- result_of::deref<I>::type
+ result_of::deref
<I>::type
- *i
+ *i
- result_of::deref<I>::type
+ result_of::deref
<I>::type
- result_of::next<I>::type
+ |
@@ -281,8 +276,8 @@ |
- result_of::equal_to<I,
- J>::type
+ |
@@ -294,8 +289,8 @@ |
- result_of::advance_c<I,
- N>::type
+ |
@@ -307,7 +302,7 @@ |
- result_of::advance<I ,M>::type
+ |
@@ -319,7 +314,7 @@ |
- result_of::distance<I ,J>::type
+ |
@@ -331,7 +326,7 @@ |
- result_of::deref<I>::type
+ |
@@ -343,7 +338,7 @@ |
- result_of::value_of<I>::type
+ |
@@ -354,11 +349,11 @@ |
- An iterator to the element following i
+ An iterator to the element following |
|
- i ==
- j
+ |
@@ -405,8 +400,8 @@ |
- i !=
- j
+ |
@@ -418,12 +413,12 @@ |
- An iterator n elements after i
+ An iterator n elements after |
@@ -431,134 +426,134 @@
|
- Equivalent to advance_c<M::value>(i)
+ Equivalent to |
|
- The number of elements between i
- and j
+ The number of elements between |
|
- The element at positioni
+ The element at position |
|
- *i
+ |
- Equivalent to deref(i)
+ Equivalent to |
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
sequence will never return to a previously seen position
deref
(i)
is equivalent to *i
i ==
+ j
then *i
is equivalent to *j
std::pair
iterator
boost::array
iterator
vector
iterator
cons
iterator
list
iterator
set
iterator
map
iterator
single_view
iterator
filter_view
iterator
iterator_range
iterator
joint_view
iterator
transform_view
iterator
reverse_view
iterator
A Random Access Iterator traverses a Sequence moving in either direction, permitting efficient arbitrary distance movements @@ -41,45 +39,43 @@
Notation
i
,
+ j
Random Access Iterators
I
,
+ J
Random Access Iterator types
M
An MPL integral constant
N
An integral constant
- Bidirectional + Bidirectional Iterator
-- In addition to the requirements defined in Bidirectional + In addition to the requirements defined in Bidirectional Iterator, the following expressions must be valid:
@@ -128,13 +123,12 @@ | |
@@ -147,13 +141,12 @@ | |
@@ -166,13 +159,12 @@ | |
@@ -184,11 +176,11 @@ |
- result_of::advance_c<I,
- N>::type
+ |
@@ -223,8 +215,8 @@ |
- result_of::advance<I,
- M>::type
+ |
@@ -236,7 +228,7 @@ |
- result_of::distance<I ,J>::type
+ |
@@ -247,39 +239,36 @@ |
vector
iterator
std::pair
iterator
boost::array
iterator
iterator_range
+ iterator (where adapted sequence is a Random
Access Sequence)
transform_view
+ iterator (where adapted sequence is a Random
Access Sequence)
reverse_view
+ iterator (where adapted sequence is a Random
Access Sequence)
Moves an iterator by a specified distance.
-
template<
typename I,
typename M
>
-typename result_of::advance<I, M>::type advance(I const& i);
+typename result_of::advance
<I, M>::type advance(I const& i);
Table 1.6. Parameters
-
- i
+ |
- Model of Forward + Model of Forward Iterator |
@@ -91,7 +91,7 @@
- N
+ |
@@ -107,41 +107,40 @@ |
-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
- is a Bidirectional
- Iterator then M
+ Semantics: Returns an iterator to the
+ element M
positions from
+ i
. If i
+ is a Bidirectional
+ Iterator then M
may be negative.
/iterator/advance.hpp>
--typedef vector<int,int,int> vec; +typedefvector
<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);
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Moves an iterator by a specified distance.
-
template<
typename I,
int N
>
-typename result_of::advance_c<I, N>::type advance_c(I const& i);
+typename result_of::advance_c
<I, N>::type advance_c(I const& i);
Table 1.7. Parameters
-
- i
+ |
- Model of Forward + Model of Forward Iterator |
@@ -91,7 +91,7 @@
- N
+ |
@@ -106,41 +106,40 @@ |
-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
- is a Bidirectional
- Iterator then N
+ Semantics: Returns an iterator to the
+ element N
positions from
+ i
. If i
+ is a Bidirectional
+ Iterator then N
may be negative.
/iterator/advance.hpp>
--typedef vector<int,int,int> vec; +typedefvector
<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);
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Deferences an iterator.
-
template<
typename I
>
-typename result_of::deref<I>::type deref(I const& i);
+typename result_of::deref
<I>::type deref(I const& i);
Table 1.2. Parameters
-
- i
+ |
- Model of Forward + Model of Forward Iterator |
@@ -86,38 +86,38 @@
-deref(i);
+deref
(i);
- Return type: result_of::deref<I>::type
+ Return type: result_of::deref
<I>::type
- Semantics: Dereferences the iterator
- i.
+ Semantics: Dereferences the iterator
+ i
.
/iterator/deref.hpp>
--typedef vector<int,int&> vec; +typedefvector
<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);
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Returns the distance between 2 iterators.
-
template<
typename I,
typename J
>
-typename result_of::distance<I, J>::type distance(I const& i, J const& j);
+typename result_of::distance
<I, J>::type distance(I const& i, J const& j);
Table 1.5. Parameters
-
- i, j
+ |
- Models of Forward + Models of Forward Iterator into the same sequence |
@@ -87,35 +87,35 @@
-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
.
/iterator/distance.hpp>
--typedef vector<int,int,int> vec; +typedefvector
<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);
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Moves an iterator 1 position forwards.
-
template<
typename I
>
-typename result_of::next<I>::type next(I const& i);
+typename result_of::next
<I>::type next(I const& i);
Table 1.3. Parameters
-
- i
+ |
- Model of Forward + Model of Forward Iterator |
@@ -86,38 +86,38 @@
next(i);
- Return type: A model of the same iterator
- concept as i.
+ Return type: A model of the same iterator
+ concept as i
.
- Semantics: Returns an iterator to the
- next element after i.
+ Semantics: Returns an iterator to the
+ next element after i
.
/iterator/next.hpp>
--typedef vector<int,int,int> vec; +typedefvector
<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);
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Moves an iterator 1 position backwards.
-
template<
typename I
>
-typename result_of::prior<I>::type prior(I const& i);
+typename result_of::prior
<I>::type prior(I const& i);
Table 1.4. Parameters
-
- i
+ |
- Model of Bidirectional + Model of Bidirectional Iterator |
@@ -86,37 +86,37 @@
-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
.
/iterator/prior.hpp>
--typedef vector<int,int> vec; +typedefvector
<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);
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Moves an iterator a specified distance.
-template< typename I, @@ -47,8 +48,8 @@ };
Table 1.17. Parameters
-
- I
+ |
- Model of Forward + Model of Forward Iterator |
@@ -94,7 +94,7 @@
- M
+ |
@@ -110,42 +110,41 @@ |
-result_of::advance<I,M>::type
+result_of::advance
<I,M>::type
- Return type: A model of the same iterator
- concept as I.
+ Return type: A model of the same iterator
+ concept as I
.
- Semantics: Returns an iterator a distance
- M from I.
- If I is a Bidirectional
- Iterator then M
+ Semantics: Returns an iterator a distance
+ M
from I
.
+ If I
is a Bidirectional
+ Iterator then M
may be negative.
/iterator/advance.hpp>
--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; +typedefvector
<int,double,char> vec; +typedefresult_of::begin
<vec>::type first; +typedefresult_of::next
<first>::type second; +typedefresult_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>));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Moves an iterator by a specified distance.
-template< typename I, @@ -47,8 +48,8 @@ };
Table 1.18. Parameters
-
- I
+ |
- Model of Forward + Model of Forward Iterator |
@@ -94,7 +94,7 @@
- N
+ |
@@ -109,42 +109,41 @@ |
-result_of::advance_c<I, N>::type
+result_of::advance_c
<I, N>::type
- Return type: A model of the same iterator
- concept as I.
+ Return type: A model of the same iterator
+ concept as I
.
- Semantics: Returns an iterator a distance
- N from I.
- If I is a Bidirectional
- Iterator then N
- may be negative. Equivalent to result_of::advance<I, boost::mpl::int_<N> >::type.
+ Semantics: Returns an iterator a distance
+ N
from I
.
+ If I
is a Bidirectional
+ Iterator then N
+ may be negative. Equivalent to
.
result_of::advance
<I, boost::mpl::int_<N> >::type
/iterator/advance.hpp>
--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; +typedefvector
<int,double,char> vec; +typedefresult_of::begin
<vec>::type first; +typedefresult_of::next
<first>::type second; +typedefresult_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>));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Returns the type that will be returned by dereferencing an iterator.
-template< typename I @@ -46,8 +47,8 @@ };
Table 1.12. Parameters
-
- I
+ |
- Model of Forward + Model of Forward Iterator |
@@ -89,41 +89,41 @@
-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
.
/iterator/deref.hpp>
--typedef vector<int,int&> vec; +typedefvector
<int,int&> vec; typedef const vec const_vec; -typedef result_of::begin<vec>::type first; -typedef result_of::next<first>::type second; +typedefresult_of::begin
<vec>::type first; +typedefresult_of::next
<first>::type second; -typedef result_of::begin<const_vec>::type const_first; -typedef result_of::next<const_first>::type const_second; +typedefresult_of::begin
<const_vec>::type const_first; +typedefresult_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&>));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Returns the distance between two iterators.
-template< typename I, @@ -47,8 +48,8 @@ };
Table 1.16. Parameters
-
- I, J
+ |
- Models of Forward + Models of Forward Iterator into the same sequence |
@@ -90,38 +90,38 @@
-result_of::distance<I, J>::type
+result_of::distance
<I, J>::type
- Return type: A model of MPL + Return type: A model of MPL Integral Constant.
- Semantics: Returns the distance between
- iterators of types I and
- J.
+ Semantics: Returns the distance between
+ iterators of types I
and
+ J
.
/iterator/distance.hpp>
--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; +typedefdiff --git a/doc/html/fusion/iterator/metafunctions/equal_to.html b/doc/html/fusion/iterator/metafunctions/equal_to.html index eeadcd86..44fe6770 100644 --- a/doc/html/fusion/iterator/metafunctions/equal_to.html +++ b/doc/html/fusion/iterator/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; BOOST_MPL_ASSERT_RELATION(dist::value, ==, 2);
Returns a true-valued MPL
- Integral Constant if I
- and J are equal.
+ Integral Constant if I
+ and J
are equal.
template< typename I, @@ -49,8 +50,8 @@ };
Table 1.15. Parameters
-
- I, J
+ |
@@ -90,38 +91,38 @@ |
-result_of::equal_to<I, J>::type
+result_of::equal_to
<I, J>::type
- Return type: A model of MPL + Return type: A model of MPL Integral Constant.
- Semantics: Returns boost::mpl::true_
- if I and J are iterators to the same position.
- Returns boost::mpl::false_ otherwise.
+ Semantics: Returns boost::mpl::true_
+ if I
and J
are iterators to the same position.
+ Returns boost::mpl::false_
otherwise.
/iterator/equal_to.hpp>
--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>)); +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>));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Returns the type of the next iterator in a sequence.
-template< typename I @@ -46,8 +47,8 @@ };
Table 1.13. Parameters
-
- I
+ |
- Model of Forward + Model of Forward Iterator |
@@ -89,36 +89,36 @@
-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
.
/iterator/next.hpp>
--typedef vector<int,double> vec; -typedef result_of::next<result_of::begin<vec>::type>::type second; +typedefvector
<int,double> vec; +typedefresult_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>));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Returns the type of the previous iterator in a sequence.
-template< typename I @@ -46,8 +47,8 @@ };
Table 1.14. Parameters
-
- I
+ |
- Model of Bidirectional + Model of Bidirectional Iterator |
@@ -89,39 +89,39 @@
-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
.
/iterator/prior.hpp>
--typedef vector<int,double> vec; -typedef result_of::next<result_of::begin<vec>::type>::type second; +typedefvector
<int,double> vec; +typedefresult_of::next
<result_of::begin
<vec>::type>::type second; -BOOST_MPL_ASSERT((boost::is_same<result_of::value_of<second>::type, double>)); +BOOST_MPL_ASSERT((boost::is_same<result_of::value_of
<second>::type, double>)); -typedef result_of::prior<second>::type first; -BOOST_MPL_ASSERT((boost::is_same<result_of::value_of<first>::type, int>)); +typedefresult_of::prior
<second>::type first; +BOOST_MPL_ASSERT((boost::is_same<result_of::value_of
<first>::type, int>));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Returns the type stored at the position of an iterator.
-template< typename I @@ -46,8 +47,8 @@ };
Table 1.11. Parameters
-
- I
+ |
- Model of Forward + Model of Forward Iterator |
@@ -89,39 +89,39 @@
-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
.
/iterator/value_of.hpp>
--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; +typedefvector
<int,int&,const int&> vec; +typedefresult_of::begin
<vec>::type first; +typedefresult_of::next
<first>::type second; +typedefresult_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&>));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Compares 2 iterators for equality.
-template< typename I, @@ -49,8 +46,8 @@ unspecified operator==(I const& i, J const& i);
Table 1.9. Parameters
-
- i, j
+ |
@@ -90,23 +87,23 @@ |
i == j
- Return type: Convertible to bool.
+ Return type: Convertible to bool
.
- Semantics: Equivalent to result_of::equal_to<I,J>::value
- where I and J are the types of i
- and j respectively.
+ Semantics: Equivalent to
+ where result_of::equal_to
<I,J>::valueI
and J
are the types of i
+ and j
respectively.
/iterator/equal_to.hpp> diff --git a/doc/html/fusion/iterator/operator/operator_inequality.html b/doc/html/fusion/iterator/operator/operator_inequality.html index 12836d8d..a0ad2bb8 100644 --- a/doc/html/fusion/iterator/operator/operator_inequality.html +++ b/doc/html/fusion/iterator/operator/operator_inequality.html @@ -1,14 +1,12 @@
-Compares 2 iterators for inequality.
-template< typename I, @@ -48,8 +46,8 @@ unspecified operator==(I const& i, J const& i);
Table 1.10. Parameters
-
- i, j
+ |
@@ -89,20 +87,20 @@ |
- Return type: Convertible to bool.
+ Return type: Convertible to bool
.
- Semantics: Equivalent to !result_of::equal_to<I,J>::value
- where I and J are the types of i
- and j respectively.
+ Semantics: Equivalent to !
+ where result_of::equal_to
<I,J>::valueI
and J
are the types of i
+ and j
respectively.
/iterator/equal_to.hpp> diff --git a/doc/html/fusion/iterator/operator/operator_unary_star.html b/doc/html/fusion/iterator/operator/operator_unary_star.html index 416d0d35..1641f64b 100644 --- a/doc/html/fusion/iterator/operator/operator_unary_star.html +++ b/doc/html/fusion/iterator/operator/operator_unary_star.html @@ -1,23 +1,21 @@
-![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Dereferences an iterator.
-
template<
typename I
>
-typename result_of::deref<I>::type operator*(unspecified<I> const& i);
+typename result_of::deref
<I>::type operator*(unspecified<I> const& i);
Table 1.8. Parameters
-
- i
+ |
- Model of Forward + Model of Forward Iterator |
@@ -90,38 +87,38 @@
*i
- Return type: Equivalent to the return
- type of deref(i).
+ Return type: Equivalent to the return
+ type of
.
deref
(i)
- Semantics: Equivalent to deref(i).
+ Semantics: Equivalent to
.
deref
(i)
/iterator/deref.hpp>
--typedef vector<int,int&> vec; +typedefvector
<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);
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- An interesting peculiarity of functions like at when applied to a Forward
- Sequence like list
+ An interesting peculiarity of functions like at
when applied to a Forward
+ Sequence like list
is that what could have been linear runtime complexity effectively becomes
constant O(1) due to compiler optimization of C++ inlined functions, however
deeply recursive (up to a certain compiler limit of course). Compile time complexity
remains linear.
Associative sequences use function overloading to implement membership testing
and type associated key lookup. This amounts to constant runtime and amortized
- constant compile time complexities. There is an overloaded function, f(k), for each key type k. The compiler chooses the appropriate function
- given a key, k.
+ constant compile time complexities. There is an overloaded function, f(k)
, for each key type k
. The compiler chooses the appropriate function
+ given a key, k
.
Tag dispatching is a generic programming technique for selecting template specializations. There are typically 3 components involved in the tag dispatching mechanism: @@ -70,7 +69,7 @@
- For example, the fusion result_of::begin metafunction
+ For example, the fusion result_of::begin
metafunction
is implemented as follows:
@@ -88,24 +87,24 @@-
- -Sequence is the type for - which a suitable implementation of result_of::begin_impl +
Sequence
is the type for + which a suitable implementation ofresult_of::begin_impl
is required- -traits::tag_of is the metafunction that associates - Sequence with an appropriate +
traits::tag_of
is the metafunction that associates +Sequence
with an appropriate tag- -result_of::begin_impl is the template which is specialized +
result_of::begin_impl
is the template which is specialized to provide an implementation for each tag type- +
++ Extensibility -
Unlike MPL, there is no extensibe sequence concept in fusion. This does not mean that Fusion @@ -115,13 +114,13 @@ and MPL on account of the lazy nature of fusion Algorithms. STL - containers extend themselves in place though member functions such as push_back and insert. MPL + containers extend themselves in place though member functions such as
push_back
andinsert
. MPL sequences, on the other hand, are extended through "intrinsic" functions that actually return whole sequences. MPL is purely functional and can not have side effects. For example, MPL's - push_back does not actually - mutate an mpl::vector. It can't do that. Instead, it returns - an extended mpl::vector. +push_back
does not actually + mutate anmpl::vector
. It can't do that. Instead, it returns + an extendedmpl::vector
.Like MPL, Fusion @@ -131,51 +130,51 @@ are sequences that do not actually contain data, but instead impart an alternative presentation over the data from one or more underlying sequences. Views are proxies. They provide an efficient yet purely functional way to work on - potentially expensive sequence operations. For example, given a vector, Fusion's push_back returns a joint_view, instead of an actual extended - vector. - A joint_view + potentially expensive sequence operations. For example, given a
-vector
, Fusion'spush_back
returns ajoint_view
, instead of an actual extended +vector
. + Ajoint_view
holds a reference to the original sequence plus the appended data --making it very cheap to pass around.- +
++ Element Conversion -
- Functions that take in elemental values to form sequences (e.g. make_list) convert their arguments + Functions that take in elemental values to form sequences (e.g.
make_list
) convert their arguments to something suitable to be stored as a sequence element. In general, the element types are stored as plain values. Example:-make_list(1, 'x') +make_list
(1, 'x')- returns a list<int, - char>. + returns a
list
<int, + char>
.There are a few exceptions, however.
- Arrays: + Arrays:
Array arguments are deduced to reference to const types. For example - [14] + [14] :
-make_list("Donald", "Daisy") +make_list
("Donald", "Daisy")- creates a list + creates a
list
of type-list<const char (&)[7], const char (&)[6]> +list
<const char (&)[7], const char (&)[6]>- Function pointers: + Function pointers:
Function pointers are deduced to the plain non-reference type (i.e. to plain @@ -184,38 +183,38 @@
void f(int i); ... -make_list(&f); +make_list
(&f);- creates a list + creates a
list
of type-list<void (*)(int)> +-list
<void (*)(int)>- +
++ boost::ref -
- Fusion's generation functions (e.g. make_list) by default stores the element + Fusion's generation functions (e.g.
make_list
) by default stores the element types as plain non-reference types. Example:void foo(const A& a, B& b) { ... - make_list(a, b) +make_list
(a, b)- creates a list + creates a
list
of type-list<A, B> +list
<A, B>- Sometimes the plain non-reference type is not desired. You can use boost::ref - and boost::cref to store references or const references + Sometimes the plain non-reference type is not desired. You can use
boost::ref
+ andboost::cref
to store references or const references (respectively) instead. The mechanism does not compromise const correctness since a const object wrapped with ref results in a tuple element with const reference type (see the fifth code line below). Examples: @@ -225,11 +224,11 @@A a; B b; const A ca = a; -make_list(cref(a), b); // creates list<const A&, B> -make_list(ref(a), b); // creates list<A&, B> -make_list(ref(a), cref(b)); // creates list<A&, const B&> -make_list(cref(ca)); // creates list<const A&> -make_list(ref(ca)); // creates list<const A&> +make_list
(cref(a), b); // creates list<const A&, B> +make_list
(ref(a), b); // creates list<A&, B> +make_list
(ref(a), cref(b)); // creates list<A&, const B&> +make_list
(cref(ca)); // creates list<const A&> +make_list
(ref(ca)); // creates list<const A&>See Boost.Ref for @@ -237,11 +236,11 @@
diff --git a/doc/html/fusion/organization.html b/doc/html/fusion/organization.html index bd98ce83..3d3f34c3 100644 --- a/doc/html/fusion/organization.html +++ b/doc/html/fusion/organization.html @@ -3,7 +3,7 @@
-[14] +
[14] Note that the type of a string literal is an array of const characters, - not const char*. To get make_list to create a list with an element of a non-const - array type one must use the ref - wrapper (see boost::ref). + not
const char*
. To getmake_list
to create alist
with an element of a non-const + array type one must use theref
+ wrapper (seeboost::ref
).Organization - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
The library is organized into layers of modules, with each module addressing a particular area of responsibility. A module may not depend on modules in @@ -33,10 +34,10 @@
The library is organized in three layers:
-@@ -47,15 +48,15 @@
- The entire library is found in the "boost/fusion"
+ The entire library is found in the "boost/fusion"
directory. Modules are organized in directories. Each module has its own header
file placed in the same directory with the actual module-directory. For example,
- there exists "boost/fusion/support.hpp"
+ there exists "boost/fusion/support.hpp"
in the same directory as "boost/fusion/support". Everything, except
those found inside "detail" directories, is public.
- There is also a "boost/fusion/include/"
+ There is also a "boost/fusion/include/"
directory that contains all the headers to all the components and modules.
If you are unsure where to find a specific component or module, or don't want
to fuss with hierarchy and nesting, use this.
@@ -64,10 +65,10 @@
The library is header-only. There is no need to build object files to link
against.
- If, for example, you want to use list,
+ If, for example, you want to use list
,
depending on the granularity that you desire, you may do so by including one
of
- The first includes all containers The second includes only list
- [3]
+ The first includes all containers The second includes only list
+ [3]
.
[3] +
[3] Modules may contain smaller components. Header file information for each component will be provided as part of the component's documentation.
@@ -38,15 +39,15 @@
- --Niklaus Wirth + --Niklaus Wirth
Fusion is a library for working with heterogenous collections of data, commonly referred to as tuples. A set of containers (vector, list, set and map) is provided, @@ -61,10 +62,10 @@ It is named "fusion" because the library is a "fusion" of compile time metaprogramming with runtime programming.
-Tuples are powerful beasts. After having developed two significant projects (Spirit and Phoenix) @@ -87,17 +88,17 @@ had an adhoc collection of tuple manipulation and traversal routines. It was an instant AHA! moment.
-Some icons are used to mark certain topics indicative of their relevance. These icons precede some text to indicate:
-
+
This documentation is automatically generated by Boost QuickBook documentation tool. QuickBook can be found in the Boost Tools.
-
Please direct all questions to Spirit's mailing list. You can subscribe to
the Spirit
diff --git a/doc/html/fusion/quick_start.html b/doc/html/fusion/quick_start.html
index f6aa9396..96e4bf12 100644
--- a/doc/html/fusion/quick_start.html
+++ b/doc/html/fusion/quick_start.html
@@ -3,7 +3,7 @@
I assume the reader is already familiar with tuples (Boost.Tuple)
- and its ancestor std::pair. The tuple is a generalization of std::pair
+ and its ancestor std::pair
. The tuple is a generalization of std::pair
for multiple heterogeneous elements (triples, quadruples, etc.). The tuple
- is more or less a synonym for fusion's vector.
+ is more or less a synonym for fusion's
.
vector
For starters, we shall include all of Fusion's Sequence(s) - [1] + [1] :
@@ -41,29 +42,29 @@ #include <boost/fusion/include/sequence.hpp>
- Let's begin with a vector
- [2]
+ Let's begin with a
+ [2]
:
vector
-vector<int, char, std::string> stuff(1, 'x', "howdy"); -int i = at_c<0>(stuff); -char ch = at_c<1>(stuff); -std::string s = at_c<2>(stuff); +vector
<int, char, std::string> stuff(1, 'x', "howdy"); +int i =at_c
<0>(stuff); +char ch =at_c
<1>(stuff); +std::string s =at_c
<2>(stuff);
- Just replace tuple for vector
- and get for at_c and this is exactly like
+ Just replace tuple
for
+ and vector
get
for
and this is exactly like
Boost.Tuple.
Actually, either names can be used interchangeably. Yet, the similarity ends
- there. You can do a lot more with Fusion vector or tuple.
+ there. You can do a lot more with Fusion at_c
or vector
tuple
.
Let's see some examples.
First, let's include the algorithms:
@@ -93,38 +94,38 @@ Now, finally:
-for_each(stuff, print_xml());
+for_each
(stuff, print_xml());
- That's it! for_each is a fusion algorithm.
+ That's it!
is a fusion algorithm.
It is a generic algorithm similar to STL's.
It iterates over the sequence and calls a user supplied function. In our case,
- it calls print_xml's operator() for
- each element in stuff.
+ it calls for_each
print_xml
's operator()
for
+ each element in stuff
.
![]() |
Caution |
---|---|
- The result of typeid(x).name() is platform specific. The code here is + | |
+ The result of |
- for_each is generic. With
- print_xml, you can use it to
+
is generic. With
+ for_each
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:
@@ -137,37 +138,37 @@ template <typename Sequence> void xml_print_pointers(Sequence const& seq) { - for_each(filter_if<boost::is_pointer<_> >(seq), print_xml()); +for_each
(filter_if
<boost::is_pointer<_> >(seq), print_xml()); }
- filter_if is another Fusion
- algorithm. It returns a filter_view, a conforming Fusion sequence.
+
is another Fusion
+ algorithm. It returns a filter_if
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 vector,
+ Apart from
,
fusion has a couple of other sequence types to choose from. Each sequence has
- its own characteristics. We have list, set, map, plus a multitude of views that provide various ways to present
+ its own characteristics. We have vector
, list
, set
, plus a multitude of map
views
that provide various ways to present
the sequences.
- Fusion's map
+ Fusion's
associate types with elements. It can be used as a cleverer replacement of
- the struct. Example:
+ the map
struct
. Example:
namespace fields @@ -176,32 +177,32 @@ struct age; } -typedef map< - fusion::pair<fields::name, std::string> - , fusion::pair<fields::age, int> > +typedefmap
< +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 std::pair. Fusion pairs only contain one member,
+ from map
std::pair
. Fusion pairs only contain one member,
with the type of their second template parameter. The first type parameter
of the pair is used as an index to the associated element in the sequence.
- For example, given a a_person
- of type, person, you can do:
+ For example, given a a_person
+ of type, person
, you can do:
using namespace fields; -std::string person_name = at_key<name>(a_person); -int person_age = at_key<age>(a_person); +std::string person_name =at_key
<name>(a_person); +int person_age =at_key
<age>(a_person);
- Why go through all this trouble, you say? Well, for one, unlike the struct, we are dealing with a generic data structure.
+ Why go through all this trouble, you say? Well, for one, unlike the struct
, we are dealing with a generic data structure.
There are a multitude of facilities available at your disposal provided out
of the box with fusion or written by others. With these facilities, introspection
comes for free, for example. We can write one serialization function (well,
two, if you consider loading and saving) that will work for all your fusion
- maps.
+
s.
Example:
map
@@ -217,19 +218,19 @@
template <typename Stuff>
void save(Stuff const& stuff)
{
- for_each(stuff, saver());
+ for_each
(stuff, saver());
}
- The save function is generic
- and will work for all types of stuff
- regardless if it is a person,
- a dog or a whole alternate_universe.
+ The save
function is generic
+ and will work for all types of stuff
+ regardless if it is a person
,
+ a dog
or a whole alternate_universe
.
And... we've barely scratched the surface! You can compose and expand the data structures, remove elements from the structures, find specific data types, @@ -238,14 +239,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.
#include <boost/fusion/sequence.hpp> #include <boost/fusion/include/sequence.hpp> diff --git a/doc/html/fusion/sequence/concepts.html b/doc/html/fusion/sequence/concepts.html index 0340f9a9..38b660d1 100644 --- a/doc/html/fusion/sequence/concepts.html +++ b/doc/html/fusion/sequence/concepts.html @@ -3,20 +3,19 @@Concepts - + - +
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Fusion Sequences are organized into a hierarchy of concepts.
-Fusion's sequence traversal related concepts parallel Fusion's Iterator - Concepts. Forward - Sequence is the most basic concept. Bidirectional - Sequence is a refinement of Forward - Sequence. Random - Access Sequence is a refinement of Bidirectional + Concepts. Forward + Sequence is the most basic concept. Bidirectional + Sequence is a refinement of Forward + Sequence. Random + Access Sequence is a refinement of Bidirectional Sequence. These concepts pertain to sequence traversal.
-- The Associative + The Associative Sequence concept is orthogonal to traversal. An Associative Sequence allows efficient retrieval of elements based on keys.
diff --git a/doc/html/fusion/sequence/concepts/associative_sequence.html b/doc/html/fusion/sequence/concepts/associative_sequence.html index 6bc665f4..2b9d507e 100644 --- a/doc/html/fusion/sequence/concepts/associative_sequence.html +++ b/doc/html/fusion/sequence/concepts/associative_sequence.html @@ -1,14 +1,12 @@ -An Associative Sequence allows efficient retrieval of elements based on keys. Like associative sequences in MPL, @@ -48,33 +46,33 @@
Notation
s
An Associative Sequence
S
An Associative Sequence type
K
An arbitrary key type
o
An arbitrary object
e
A Sequence element
For any Associative Sequence the following expressions must be valid:
@@ -111,7 +109,7 @@
- s is mutable and
- e =
- o, where e is the first element in the
+ s
is mutable and
+ e =
+ o
, where e
is the first element in the
sequence, is a valid expression.
- result_of::has_key<S,
- K>::type
+ |
@@ -218,8 +216,8 @@ |
- result_of::at_key<S,
- K>::type
+ |
@@ -231,8 +229,8 @@ |
- result_of::value_at_key<S,
- K>::type
+ |
@@ -243,19 +241,22 @@ |
- A boolean Integral Constant c
- such that c::value ==
- true if and only if there
- is one or more elements with the key k
- in s; see has_key.
+ A boolean Integral Constant |
|
- The element associated with the key K
- in the sequence s;
- see at.
+ The element associated with the key |
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- A Bidirectional Sequence is a Forward - Sequence whose iterators model Bidirectional + A Bidirectional Sequence is a Forward + Sequence whose iterators model Bidirectional Iterator.
-- Forward Sequence + Forward Sequence
Notation
s
A Forward Sequence
S
A Forward Sequence type
o
An arbitrary object
e
A Sequence element
- In addition to the requirements defined in Forward + In addition to the requirements defined in Forward Sequence, for any Bidirectional Sequence the following must be met:
@@ -137,13 +129,12 @@ | ||
@@ -160,7 +151,7 @@ | ||
@@ -181,8 +172,8 @@ | ||
@@ -192,9 +183,9 @@ |
- s is mutable and
- e =
- o, where e is the first element in the
+ |
@@ -206,11 +197,11 @@
- result_of::begin<S>::type
+ |
@@ -244,7 +235,7 @@ |
- result_of::end<S>::type
+ |
@@ -256,7 +247,7 @@ |
- result_of::back<S>::type
+ |
@@ -267,15 +258,14 @@ |
The semantics of an expression are defined only where they differ from, - or are not defined in Forward + or are not defined in Forward Sequence.
- The last element in the sequence; see back.
+ The last element in the sequence; see |
std::pair
boost::array
vector
reverse_view
iterator_range
(where adapted sequence is a Bidirectional Sequence)
transform_view
(where adapted sequence is a Bidirectional Sequence)
zip_view
(where adapted sequences are models Bidirectional Sequence)
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
A Forward Sequence is a Sequence whose elements are arranged in a definite order. The ordering is guaranteed not to change from iteration to iteration. @@ -43,29 +41,29 @@
Notation
s
A Forward Sequence
S
A Forward Sequence type
o
An arbitrary object
e
A Sequence element
For any Forward Sequence the following expressions must be valid:
@@ -102,13 +100,12 @@
- s is mutable and
- e =
- o, where e is the first element in the
+ s
is mutable and
+ e =
+ o
, where e
is the first element in the
sequence, is a valid expression.
- result_of::begin<S>::type
+ |
@@ -276,7 +272,7 @@ |
- result_of::end<S>::type
+ |
@@ -288,7 +284,7 @@ |
- result_of::size<S>::type
+ |
@@ -300,7 +296,7 @@ |
- result_of::empty<S>::type
+ |
@@ -312,7 +308,7 @@ |
- result_of::front<S>::type
+ |
@@ -323,11 +319,11 @@ |
- An iterator to the first element of the sequence; see begin.
+ An iterator to the first element of the sequence; see |
|
- A past-the-end iterator to the sequence; see end.
+ A past-the-end iterator to the sequence; see |
|
- The size of the sequence; see size.
+ The size of the sequence; see |
|
- A boolean Integral Constant c
- such that c::value ==
- true if and only if the
- sequence is empty; see empty.
+ A boolean Integral Constant |
|
- The first element in the sequence; see front.
+ The first element in the sequence; see |
For any Forward Sequence s the following invariants always hold:
[begin
(s), end
(s))
is always a valid 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.
s
will access its elements in the same order.
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- A Random Access Sequence is a Bidirectional - Sequence whose iterators model Random + A Random Access Sequence is a Bidirectional + Sequence whose iterators model Random Access Iterator. It guarantees constant time access to arbitrary sequence elements.
-- Bidirectional + Bidirectional Sequence
Notation
s
A Random Access Sequence
S
A Random Access Sequence type
N
o
An arbitrary object
e
A Sequence element
- In addition to the requirements defined in Bidirectional + In addition to the requirements defined in Bidirectional Sequence, for any Random Access Sequence the following must be met:
@@ -144,13 +136,12 @@ | ||
@@ -167,7 +158,7 @@ | ||
@@ -188,8 +179,8 @@ | ||
@@ -199,9 +190,9 @@ |
- s is mutable and
- e =
- o, where e is the first element in the
+ |
@@ -213,11 +204,11 @@
- result_of::begin<S>::type
+ |
@@ -251,7 +242,7 @@ |
- result_of::end<S>::type
+ |
@@ -263,8 +254,8 @@ |
- result_of::at<S,
- N>::type
+ |
@@ -276,8 +267,8 @@ |
- result_of::value_at<S,
- N>::type
+ |
@@ -288,23 +279,25 @@ |
The semantics of an expression are defined only where they differ from, - or are not defined in Bidirectional + or are not defined in Bidirectional Sequence.
- The Nth element from the beginning of the sequence; see at.
+ The Nth element from the beginning of the sequence; see |
std::pair
boost::array
vector
reverse_view
iterator_range
(where adapted sequence is a Random Access Sequence)
transform_view
(where adapted sequence is a Random Access Sequence)
zip_view
(where adapted sequences are models Random Access Sequence)
#include <boost/fusion/sequence/intrinsic.hpp> #include <boost/fusion/include/intrinsic.hpp>
[4] +
[4] In practice, many of intrinsic functions have default implementations that will work in majority of cases
Returns the N-th element from the beginning of the sequence.
template <typename N, typename Sequence> -typename result_of::at<Sequence, N>::type +typenameresult_of::at
<Sequence, N>::type at(Sequence& seq); template <typename N, typename Sequence> -typename result_of::at<Sequence const, N>::type +typenameresult_of::at
<Sequence const, N>::type at(Sequence const& seq);
- seq
+ |
- Model of Random + Model of Random Access Sequence |
@@ -95,7 +95,7 @@
- N
+ |
@@ -113,7 +113,7 @@ |
- Return type: Returns a reference to
- the N-th element from the beginning of the sequence seq
- if seq is mutable and
- e =
- o, where e
+ Return type: Returns a reference to
+ the N-th element from the beginning of the sequence seq
+ if seq
is mutable and
+ e =
+ o
, where e
is the N-th element from the beginning of the sequence, is a valid expression.
Else, returns a type convertable to the N-th element from the beginning
of the sequence.
- Precondition: 0
- <= N::value < size(s)
+ Precondition: 0
+ <= N::value <
size
(s)
- Semantics: Equivalent to + Semantics: Equivalent to
-deref(advance<N>(begin(s))) +deref
(advance
<N>(begin
(s)))
@@ -149,11 +149,11 @@ #include <boost/fusion/include/at.hpp>
-vector<int, int, int> v(1, 2, 3);
+vector
<int, int, int> v(1, 2, 3);
assert(at<mpl::int_<1> >(v) == 2);
diff --git a/doc/html/fusion/sequence/intrinsic/functions/at_c.html b/doc/html/fusion/sequence/intrinsic/functions/at_c.html
index 6ed7d633..2b8ee198 100644
--- a/doc/html/fusion/sequence/intrinsic/functions/at_c.html
+++ b/doc/html/fusion/sequence/intrinsic/functions/at_c.html
@@ -3,7 +3,7 @@
Returns the N-th element from the beginning of the sequence.
template <int N, typename Sequence> -typename result_of::at_c<Sequence, N>::type +typenameresult_of::at_c
<Sequence, N>::type at_c(Sequence& seq); template <int N, typename Sequence> -typename result_of::at_c<Sequence const, N>::type +typenameresult_of::at_c
<Sequence const, N>::type at_c(Sequence const& seq);
- seq
+ |
- Model of Random + Model of Random Access Sequence |
@@ -95,7 +95,7 @@
- N
+ |
@@ -112,7 +112,7 @@ |
- Return type: Returns a reference to
- the N-th element from the beginning of the sequence seq
- if seq is mutable and
- e =
- o, where e
+ Return type: Returns a reference to
+ the N-th element from the beginning of the sequence seq
+ if seq
is mutable and
+ e =
+ o
, where e
is the N-th element from the beginning of the sequence, is a valid expression.
Else, returns a type convertable to the N-th element from the beginning
of the sequence.
- Precondition: 0
+ Precondition: 0
<= N
- < size(s)
+ < size
(s)
- Semantics: Equivalent to + Semantics: Equivalent to
-deref(advance<N>(begin(s))) +deref
(advance
<N>(begin
(s)))
@@ -149,11 +149,11 @@ #include <boost/fusion/include/at_c.hpp>
-vector<int, int, int> v(1, 2, 3);
+vector
<int, int, int> v(1, 2, 3);
assert(at_c<1>(v) == 2);
diff --git a/doc/html/fusion/sequence/intrinsic/functions/at_key.html b/doc/html/fusion/sequence/intrinsic/functions/at_key.html
index 4fae466d..9a3fd0ec 100644
--- a/doc/html/fusion/sequence/intrinsic/functions/at_key.html
+++ b/doc/html/fusion/sequence/intrinsic/functions/at_key.html
@@ -3,7 +3,7 @@
Returns the element associated with a Key from the sequence.
template <typename Key, typename Sequence> -typename result_of::at_key<Sequence, Key>::type +typenameresult_of::at_key
<Sequence, Key>::type at_key(Sequence& seq); template <typename Key, typename Sequence> -typename result_of::at_key<Sequence const, Key>::type +typenameresult_of::at_key
<Sequence const, Key>::type at_key(Sequence const& seq);
- seq
+ |
- Model of Associative + Model of Associative Sequence |
@@ -95,7 +95,7 @@
- Key
+ |
@@ -112,7 +112,7 @@ |
- 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.
@@ -144,11 +144,11 @@ #include <boost/fusion/include/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/sequence/intrinsic/functions/back.html b/doc/html/fusion/sequence/intrinsic/functions/back.html
index d08eedb6..bb75c44d 100644
--- a/doc/html/fusion/sequence/intrinsic/functions/back.html
+++ b/doc/html/fusion/sequence/intrinsic/functions/back.html
@@ -3,7 +3,7 @@
Returns the last element in the sequence.
template <typename Sequence> -typename result_of::back<Sequence>::type +typenameresult_of::back
<Sequence>::type back(Sequence& seq); template <typename Sequence> -typename result_of::back<Sequence const>::type +typenameresult_of::back
<Sequence const>::type back(Sequence const& seq);
- seq
+ |
- Model of Bidirectional + Model of Bidirectional Sequence |
@@ -93,7 +93,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: empty(seq) == false
+ Precondition: empty
(seq) == false
- Semantics: Returns the last element + Semantics: Returns the last element in the sequence.
@@ -125,11 +125,11 @@ #include <boost/fusion/include/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/sequence/intrinsic/functions/begin.html b/doc/html/fusion/sequence/intrinsic/functions/begin.html
index d678e0c8..7fdf7dcc 100644
--- a/doc/html/fusion/sequence/intrinsic/functions/begin.html
+++ b/doc/html/fusion/sequence/intrinsic/functions/begin.html
@@ -3,7 +3,7 @@
Returns an iterator pointing to the first element in the sequence.
template <typename Sequence> -typename result_of::begin<Sequence>::type +typenameresult_of::begin
<Sequence>::type begin(Sequence& seq); template <typename Sequence> -typename result_of::begin<Sequence const>::type +typenameresult_of::begin
<Sequence const>::type begin(Sequence const& seq);
- seq
+ |
- Model of Forward + Model of Forward Sequence |
@@ -93,7 +93,7 @@
- Return type: Forward
- Iterator if seq
- is a Forward
- Sequence else, Bidirectional
- Iterator if seq
- is a Bidirectional
- Sequence else, Random
- Access Iterator if seq
- is a Random
+ Return type: Forward
+ Iterator if seq
+ is a Forward
+ Sequence else, Bidirectional
+ Iterator if seq
+ is a Bidirectional
+ Sequence else, Random
+ Access Iterator if seq
+ is a Random
Access Sequence.
- Semantics: Returns an iterator pointing + Semantics: Returns an iterator pointing to the first element in the sequence.
@@ -131,12 +125,12 @@ #include <boost/fusion/include/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);
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Returns a type convertible to bool
- that evaluates to true if
- the sequence is empty, else, evaluates to false.
+ Returns a type convertible to bool
+ that evaluates to true
if
+ the sequence is empty, else, evaluates to false
.
template <typename Sequence>
-typename result_of::empty<Sequence>::type
+typename result_of::empty
<Sequence>::type
empty(Sequence const& seq);
- seq
+ |
- Model of Forward + Model of Forward Sequence |
@@ -91,7 +91,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
.
@@ -114,11 +114,11 @@ #include <boost/fusion/include/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/sequence/intrinsic/functions/end.html b/doc/html/fusion/sequence/intrinsic/functions/end.html
index bdac3243..9dba7d8b 100644
--- a/doc/html/fusion/sequence/intrinsic/functions/end.html
+++ b/doc/html/fusion/sequence/intrinsic/functions/end.html
@@ -3,7 +3,7 @@
Returns an iterator pointing to one element past the end of the sequence.
template <typename Sequence> -typename result_of::end<Sequence>::type +typenameresult_of::end
<Sequence>::type end(Sequence& seq); template <typename Sequence> -typename result_of::end<Sequence const>::type +typenameresult_of::end
<Sequence const>::type end(Sequence const& seq);
- seq
+ |
- Model of Forward + Model of Forward Sequence |
@@ -93,7 +93,7 @@
- Return type: Forward
- Iterator if seq
- is a Forward
- Sequence else, Bidirectional
- Iterator if seq
- is a Bidirectional
- Sequence else, Random
- Access Iterator if seq
- is a Random
+ Return type: Forward
+ Iterator if seq
+ is a Forward
+ Sequence else, Bidirectional
+ Iterator if seq
+ is a Bidirectional
+ Sequence else, Random
+ Access Iterator if seq
+ is a Random
Access Sequence.
- Semantics: Returns an iterator pointing + Semantics: Returns an iterator pointing to one element past the end of the sequence.
@@ -131,12 +125,12 @@ #include <boost/fusion/include/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);
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Returns the first element in the sequence.
template <typename Sequence> -typename result_of::front<Sequence>::type +typenameresult_of::front
<Sequence>::type front(Sequence& seq); template <typename Sequence> -typename result_of::front<Sequence const>::type +typenameresult_of::front
<Sequence const>::type front(Sequence const& seq);
- seq
+ |
- Model of Forward + Model of Forward Sequence |
@@ -93,7 +93,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: empty(seq) == false
+ Precondition: empty
(seq) == false
- Semantics: Returns the first element + Semantics: Returns the first element in the sequence.
@@ -125,11 +125,11 @@ #include <boost/fusion/include/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/sequence/intrinsic/functions/has_key.html b/doc/html/fusion/sequence/intrinsic/functions/has_key.html
index 0dd8ac89..b86d5dec 100644
--- a/doc/html/fusion/sequence/intrinsic/functions/has_key.html
+++ b/doc/html/fusion/sequence/intrinsic/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
+ |
- Model of Associative + Model of Associative Sequence |
@@ -94,7 +94,7 @@
- Key
+ |
@@ -111,7 +111,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
.
@@ -134,11 +134,11 @@ #include <boost/fusion/include/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/sequence/intrinsic/functions/size.html b/doc/html/fusion/sequence/intrinsic/functions/size.html
index b39c2b24..cf36c5fa 100644
--- a/doc/html/fusion/sequence/intrinsic/functions/size.html
+++ b/doc/html/fusion/sequence/intrinsic/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);
- seq
+ |
- Model of Forward + Model of Forward Sequence |
@@ -90,7 +90,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.
@@ -113,11 +113,11 @@ #include <boost/fusion/include/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/sequence/intrinsic/functions/swap.html b/doc/html/fusion/sequence/intrinsic/functions/swap.html
index af676b30..aa021700 100644
--- a/doc/html/fusion/sequence/intrinsic/functions/swap.html
+++ b/doc/html/fusion/sequence/intrinsic/functions/swap.html
@@ -3,7 +3,7 @@
Performs an element by element swap of the elements in 2 sequences.
@@ -41,7 +42,7 @@ void swap(Seq1& seq1, Seq2& seq2);
- seq1, seq2
+ |
- Models of Forward + Models of Forward Sequence |
@@ -88,7 +88,7 @@
- Return type: void
+ Return type: void
- Precondition: size(seq1) == size(seq2)
+ Precondition: size
(seq1) == size
(seq2)
- Semantics: Calls swap(a1, b1) for corresponding elements in seq1 and seq2.
+ Semantics: Calls swap(a1, b1)
for corresponding elements in seq1
and seq2
.
/sequence/intrinsic/swap.hpp>
-vector<int, std::string> v1(1, "hello"), v2(2, "world"); +vector
<int, std::string> v1(1, "hello"), v2(2, "world"); swap(v1, v2); -assert(v1 == make_vector(2, "world")); -assert(v2 == make_vector(1, "hello")); +assert(v1 ==make_vector
(2, "world")); +assert(v2 ==make_vector
(1, "hello"));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Returns the result type of at
- [5]
+ Returns the result type of at
+ [5]
.
@@ -48,8 +49,8 @@
};
Table 1.25. Parameters
-
- Seq
+ |
- A model of Forward + A model of Forward Sequence |
@@ -95,7 +95,7 @@
- N
+ |
@@ -111,10 +111,10 @@ |
- Return type: Any type. + Return type: Any type.
- Semantics: Returns the result type of
- using at to access the Nth element of Seq.
+ Semantics: Returns the result type of
+ using at
to access the N
th element of Seq
.
/sequence/intrinsic/at.hpp>
-typedef vector<int,float,char> vec; -BOOST_MPL_ASSERT((boost::is_same<result_of::at<vec, boost::mpl::int_<1> >::type, float&>)); +typedefvector
<int,float,char> vec; +BOOST_MPL_ASSERT((boost::is_same<result_of::at
<vec, boost::mpl::int_<1> >::type, float&>));
[5] - 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 +
[5]
+ 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
- [6]
+ Returns the result type of at_c
+ [6]
.
@@ -48,8 +49,8 @@
};
Table 1.26. Parameters
-
- Seq
+ |
- A model of Forward + A model of Forward Sequence |
@@ -95,7 +95,7 @@
- M
+ |
@@ -110,10 +110,10 @@ |
- Return type: Any type + Return type: Any type
- Semantics: Returns the result type of
- using at_c to access the Mth element of Seq.
+ Semantics: Returns the result type of
+ using at_c
to access the M
th element of Seq
.
/sequence/intrinsic/at.hpp>
-typedef vector<int,float,char> vec; -BOOST_MPL_ASSERT((boost::is_same<result_of::at_c<vec, 1>::type, float&>)); +typedefvector
<int,float,char> vec; +BOOST_MPL_ASSERT((boost::is_same<result_of::at_c
<vec, 1>::type, float&>));
[6] - 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 +
[6]
+ 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
- [7]
+ Returns the result type of at_key
+ [7]
.
@@ -48,8 +49,8 @@
};
Table 1.30. Parameters
-
- Seq
+ |
- A model of Forward + A model of Forward Sequence |
@@ -95,7 +95,7 @@
- Key
+ |
@@ -110,10 +110,10 @@ |
- Return type: Any type. + Return type: Any type.
- Semantics: Returns the result of using
- at_key to access the element
- with key type Key in
- Seq.
+ Semantics: Returns the result of using
+ at_key
to access the element
+ with key type Key
in
+ Seq
.
/sequence/intrinsic/at_key.hpp>
-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&>)); +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&>));
[7] - result_of::at_key reflects the actual - return type of the function at_key. _sequence_s - typically return references to its elements via the at_key function. If you - want to get the actual element type, use result_of::value_at_key +
[7]
+ result_of::at_key
reflects the actual
+ return type of the function at_key
. _sequence_s
+ typically return references to its elements via the at_key
function. If you
+ 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,8 +45,8 @@
};
Table 1.23. Parameters
-
- Seq
+ |
- A model of Forward + A model of Forward Sequence |
@@ -87,10 +87,10 @@
- Return type: Any type + Return type: Any type
- Semantics: The type returned by dereferencing
- an iterator to the last element in the sequence. Equivalent to result_of::deref<result_of::prior<result_of::end<Seq>::type>::type>::type.
+ Semantics: The type returned by dereferencing
+ an iterator to the last element in the sequence. Equivalent to
.
result_of::deref
<result_of::prior
<result_of::end
<Seq>::type>::type>::type
/sequence/intrinsic/back.hpp>
-typedef vector<int,char> vec; -BOOST_MPL_ASSERT((boost::is_same<result_of::back<vec>::type, char&>)); +typedefvector
<int,char> vec; +BOOST_MPL_ASSERT((boost::is_same<result_of::back
<vec>::type, char&>));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Returns the result type of begin.
+ Returns the result type of begin
.
@@ -44,8 +45,8 @@
};
Table 1.19. Parameters
-
- Seq
+ |
- A model of Forward + A model of Forward Sequence |
@@ -87,10 +87,10 @@
- Return type: An iterator modelling the
- same traversal concept as Seq.
+ Return type: An iterator modelling the
+ same traversal concept as Seq
.
- Semantics: Returns the type of an iterator
- to the first element of Seq.
+ Semantics: Returns the type of an iterator
+ to the first element of Seq
.
/sequence/intrinsic/begin.hpp>
-typedef vector<int> vec; -typedef result_of::begin<vec>::type it; -BOOST_MPL_ASSERT((boost::is_same<result_of::deref<it>::type, int&>)) +typedefvector
<int> vec; +typedefresult_of::begin
<vec>::type it; +BOOST_MPL_ASSERT((boost::is_same<result_of::deref
<it>::type, int&>))
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Returns the result type of empty.
+ Returns the result type of empty
.
@@ -44,8 +45,8 @@
};
Table 1.21. Parameters
-
- Seq
+ |
- A model of Forward + A model of Forward Sequence |
@@ -87,10 +87,10 @@
- Return type: An MPL + Return type: An MPL Integral Constant
- Semantics: Returns mpl::true_
- if Seq has zero elements,
- mpl::false_ otherwise.
+ Semantics: Returns mpl::true_
+ if Seq
has zero elements,
+ mpl::false_
otherwise.
/sequence/intrinsic/empty.hpp>
-typedef vector<> empty_vec; -typedef vector<int,float,char> vec; +typedefvector
<> empty_vec; +typedefvector
<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>));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Returns the result type of end.
+ Returns the result type of end
.
@@ -44,8 +45,8 @@
};
Table 1.20. Parameters
-
- Seq
+ |
- A model of Forward + A model of Forward Sequence |
@@ -87,10 +87,10 @@
- Return type: A model of the same traversal
- concept as Seq.
+ Return type: A model of the same traversal
+ concept as Seq
.
- Semantics: Returns the type of an iterator
- one past the end of Seq.
+ Semantics: Returns the type of an iterator
+ one past the end of Seq
.
/sequence/intrinsic/end.hpp>
-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>)) +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>))
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Returns the result type of front.
+ Returns the result type of front
.
@@ -44,8 +45,8 @@
};
Table 1.22. Parameters
-
- Seq
+ |
- A model of Forward + A model of Forward Sequence |
@@ -87,10 +87,10 @@
- Return type: Any type + Return type: Any type
- Semantics: The type returned by dereferencing
- an iterator to the first element in Seq.
- Equivalent to result_of::deref<result_of::begin<Seq>::type>::type.
+ Semantics: The type returned by dereferencing
+ an iterator to the first element in Seq
.
+ Equivalent to
.
result_of::deref
<result_of::begin
<Seq>::type>::type
/sequence/intrinsic/front.hpp>
-typedef vector<int,char> vec; -BOOST_MPL_ASSERT((boost::is_same<result_of::front<vec>::type, int&>)); +typedefvector
<int,char> vec; +BOOST_MPL_ASSERT((boost::is_same<result_of::front
<vec>::type, int&>));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Returns the result type of has_key.
+ Returns the result type of has_key
.
@@ -46,8 +47,8 @@
};
Table 1.29. Parameters
-
- Seq
+ |
- A model of Forward + A model of Forward Sequence |
@@ -93,7 +93,7 @@
- Key
+ |
@@ -108,10 +108,10 @@ |
- Return type: An MPL + Return type: An MPL Integral Constant.
- Semantics: Returns mpl::true_
- if Seq contains an element
- with key type Key, returns
- mpl::false_ otherwise.
+ Semantics: Returns mpl::true_
+ if Seq
contains an element
+ with key type Key
, returns
+ mpl::false_
otherwise.
/sequence/intrinsic/has_key.hpp>
-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*>)); +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*>));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Returns the result type of size.
+ Returns the result type of size
.
@@ -44,8 +45,8 @@
};
Table 1.24. Parameters
-
- Seq
+ |
- A model of Forward + A model of Forward Sequence |
@@ -87,10 +87,10 @@
- Return type: An MPL + Return type: An MPL Integral Constant.
- Semantics: Returns the number of elements
- in Seq.
+ Semantics: Returns the number of elements
+ in Seq
.
/sequence/intrinsic/size.hpp>
-typedef vector<int,float,char> vec; -typedef result_of::size<vec>::type size_mpl_integral_constant; +typedefdiff --git a/doc/html/fusion/sequence/intrinsic/metafunctions/swap.html b/doc/html/fusion/sequence/intrinsic/metafunctions/swap.html index 487d52c8..b65895f8 100644 --- a/doc/html/fusion/sequence/intrinsic/metafunctions/swap.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/swap.html @@ -3,7 +3,7 @@vector
<int,float,char> vec; +typedefresult_of::size
<vec>::type size_mpl_integral_constant; BOOST_MPL_ASSERT_RELATION(size_mpl_integral_constant::value, ==, 3);
Returns the return type of swap.
@@ -44,8 +45,8 @@
};
Table 1.32. Parameters
-
- Seq1, Seq2
+ |
- Models of Forward + Models of Forward Sequence |
@@ -87,10 +87,10 @@
- Return type: void.
+ Return type: void
.
- Semantics: Always returns void.
+ Semantics: Always returns void
.
/sequence/intrinsic/swap.hpp> diff --git a/doc/html/fusion/sequence/intrinsic/metafunctions/value_at.html b/doc/html/fusion/sequence/intrinsic/metafunctions/value_at.html index dde3a635..a0c03cf9 100644 --- a/doc/html/fusion/sequence/intrinsic/metafunctions/value_at.html +++ b/doc/html/fusion/sequence/intrinsic/metafunctions/value_at.html @@ -3,7 +3,7 @@
Returns the actual type at a given index from the Sequence.
@@ -46,8 +47,8 @@
};
Table 1.27. Parameters
-
- Seq
+ |
- A model of Forward + A model of Forward Sequence |
@@ -93,7 +93,7 @@
- N
+ |
@@ -109,10 +109,10 @@ |
- Return type: Any type. + Return type: Any type.
- Semantics: Returns the actual type at
- the Nth element of Seq.
+ Semantics: Returns the actual type at
+ the N
th element of Seq
.
/sequence/intrinsic/value_at.hpp>
-typedef vector<int,float,char> vec; -BOOST_MPL_ASSERT((boost::is_same<result_of::value_at<vec, boost::mpl::int_<1> >::type, float>)); +typedefvector
<int,float,char> vec; +BOOST_MPL_ASSERT((boost::is_same<result_of::value_at
<vec, boost::mpl::int_<1> >::type, float>));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Returns the actual type at a given index from the Sequence.
@@ -46,8 +47,8 @@
};
Table 1.28. Parameters
-
- Seq
+ |
- A model of Forward + A model of Forward Sequence |
@@ -93,7 +93,7 @@
- M
+ |
@@ -108,10 +108,10 @@ |
- Return type: Any type + Return type: Any type
- Semantics: Returns the actual type at
- the Mth element of Seq.
+ Semantics: Returns the actual type at
+ the M
th element of Seq
.
/sequence/intrinsic/value_at.hpp>
-typedef vector<int,float,char> vec; -BOOST_MPL_ASSERT((boost::is_same<result_of::value_at_c<vec, 1>::type, float>)); +typedefvector
<int,float,char> vec; +BOOST_MPL_ASSERT((boost::is_same<result_of::value_at_c
<vec, 1>::type, float>));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Returns the actual element type associated with a Key from the Sequence.
@@ -46,8 +47,8 @@
};
Table 1.31. Parameters
-
- Seq
+ |
- A model of Forward + A model of Forward Sequence |
@@ -93,7 +93,7 @@
- Key
+ |
@@ -108,10 +108,10 @@ |
- Return type: Any type. + Return type: Any type.
- Semantics: Returns the actual element
- type associated with key type Key
- in Seq.
+ Semantics: Returns the actual element
+ type associated with key type Key
+ in Seq
.
/sequence/intrinsic/value_at_key.hpp>
-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>)); +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>));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- The Comparison operators: ==,
- !=, <,
- <=, >=
- and >= work generically
+ The Comparison operators: ==
,
+ !=
, <
,
+ <=
, >=
+ and >=
work generically
on all Fusion sequences. Comparison operators are "short- circuited":
elementary comparisons start from the first elements and are performed
only until the result is clear.
#include <boost/fusion/sequence/comparison.hpp> #include <boost/fusion/include/comparison.hpp> diff --git a/doc/html/fusion/sequence/operator/comparison/equal.html b/doc/html/fusion/sequence/operator/comparison/equal.html index e0c55ec8..ab9e643c 100644 --- a/doc/html/fusion/sequence/operator/comparison/equal.html +++ b/doc/html/fusion/sequence/operator/comparison/equal.html @@ -3,20 +3,19 @@equal - + - +
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Compare two sequences for equality.
@@ -43,7 +43,7 @@ operator==(Seq1 const& a, Seq2 const& b);
- a,
- b
+ |
@@ -89,7 +89,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.
@@ -114,18 +114,18 @@ 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.
@@ -133,12 +133,12 @@ #include <boost/fusion/include/equal_to.hpp>
-vector<int, char> v1(5, 'a'); -vector<int, char> v2(5, 'a'); +diff --git a/doc/html/fusion/sequence/operator/comparison/greater_than.html b/doc/html/fusion/sequence/operator/comparison/greater_than.html index abd98ba6..3b18e4d4 100644 --- a/doc/html/fusion/sequence/operator/comparison/greater_than.html +++ b/doc/html/fusion/sequence/operator/comparison/greater_than.html @@ -1,24 +1,21 @@ -vector
<int, char> v1(5, 'a'); +vector
<int, char> v2(5, 'a'); assert(v1 == v2);
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Lexicographically compare two sequences.
@@ -43,7 +40,7 @@ operator>(Seq1 const& a, Seq2 const& b);
- a,
- b
+ |
@@ -89,7 +86,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.
@@ -114,10 +111,10 @@ compile time error.
- Semantics: Returns b < a. + Semantics: Returns b < a.
@@ -125,13 +122,13 @@ #include <boost/fusion/include/less_equal.hpp>
-vector<int, float> v1(4, 3.3f); -vector<short, float> v2(5, 3.3f); -vector<long, double> v3(5, 4.4); +diff --git a/doc/html/fusion/sequence/operator/comparison/greater_than_equal.html b/doc/html/fusion/sequence/operator/comparison/greater_than_equal.html index 6533dbf9..4dd40636 100644 --- a/doc/html/fusion/sequence/operator/comparison/greater_than_equal.html +++ b/doc/html/fusion/sequence/operator/comparison/greater_than_equal.html @@ -1,14 +1,12 @@ -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);
Lexicographically compare two sequences.
@@ -42,7 +40,7 @@ operator>=(Seq1 const& a, Seq2 const& b);
- a,
- b
+ |
@@ -88,7 +86,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.
@@ -113,10 +111,10 @@ compile time error.
- Semantics: Returns !(a < b). + Semantics: Returns !(a < b).
@@ -124,13 +122,13 @@ #include <boost/fusion/include/greater_equal.hpp>
-vector<int, float> v1(4, 3.3f); -vector<short, float> v2(5, 3.3f); -vector<long, double> v3(5, 4.4); +diff --git a/doc/html/fusion/sequence/operator/comparison/less_than.html b/doc/html/fusion/sequence/operator/comparison/less_than.html index aa37d8ee..d8273d3b 100644 --- a/doc/html/fusion/sequence/operator/comparison/less_than.html +++ b/doc/html/fusion/sequence/operator/comparison/less_than.html @@ -1,24 +1,21 @@ -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);
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Lexicographically compare two sequences.
@@ -43,7 +40,7 @@ operator<(Seq1 const& a, Seq2 const& b);
- a,
- b
+ |
@@ -89,7 +86,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.
@@ -114,12 +111,12 @@ compile time error.
- Semantics: Returns the lexicographical
- comparison of between a
- and b.
+ Semantics: Returns the lexicographical
+ comparison of between a
+ and b
.
@@ -127,13 +124,13 @@ #include <boost/fusion/include/less.hpp>
-vector<int, float> v1(4, 3.3f); -vector<short, float> v2(5, 3.3f); -vector<long, double> v3(5, 4.4); +diff --git a/doc/html/fusion/sequence/operator/comparison/less_than_equal.html b/doc/html/fusion/sequence/operator/comparison/less_than_equal.html index d0c57fb5..6afbf8aa 100644 --- a/doc/html/fusion/sequence/operator/comparison/less_than_equal.html +++ b/doc/html/fusion/sequence/operator/comparison/less_than_equal.html @@ -1,24 +1,21 @@ -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);
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Lexicographically compare two sequences.
@@ -43,7 +40,7 @@ operator<=(Seq1 const& a, Seq2 const& b);
- a,
- b
+ |
@@ -89,7 +86,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.
@@ -114,10 +111,10 @@ compile time error.
- Semantics: Returns !(b < a). + Semantics: Returns !(b < a).
@@ -125,13 +122,13 @@ #include <boost/fusion/include/less_equal.hpp>
-vector<int, float> v1(4, 3.3f); -vector<short, float> v2(5, 3.3f); -vector<long, double> v3(5, 4.4); +diff --git a/doc/html/fusion/sequence/operator/comparison/not_equal.html b/doc/html/fusion/sequence/operator/comparison/not_equal.html index 888c5a35..bbfdae78 100644 --- a/doc/html/fusion/sequence/operator/comparison/not_equal.html +++ b/doc/html/fusion/sequence/operator/comparison/not_equal.html @@ -1,23 +1,21 @@ -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);
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Compare two sequences for inequality.
@@ -42,7 +40,7 @@ operator!=(Seq1 const& a, Seq2 const& b);
- a,
- b
+ |
@@ -88,7 +86,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.
@@ -113,13 +111,13 @@ compile time error.
- Semantics: + Semantics:
Returns !(a == b).
@@ -127,12 +125,12 @@ #include <boost/fusion/include/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/sequence/operator/i_o.html b/doc/html/fusion/sequence/operator/i_o.html index 57deee8e..69bce413 100644 --- a/doc/html/fusion/sequence/operator/i_o.html +++ b/doc/html/fusion/sequence/operator/i_o.html @@ -3,7 +3,7 @@I/O - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,31 +24,32 @@- 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 globaloperator<<
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 callingoperator<<
for each element. Analogously, + the globaloperator>>
has been overloaded to extract Sequence(s) - from generic input streams by recursively calling operator>> for each element. + from generic input streams by recursively callingoperator>>
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 + outputs the
vector
as: (1.0 2 Howdy folks!)@@ -57,23 +58,23 @@
Manipulators
-
- tuple_open(arg)
+tuple_open(arg)
- -
Defines the character that is output before the first element.
- tuple_close(arg)
+tuple_close(arg)
- -
Defines the character that is output after the last element.
- tuple_delimiter(arg)
+tuple_delimiter(arg)
Defines the delimiter character between elements.
- The argument to tuple_open, - tuple_close and tuple_delimiter may be a char, wchar_t, + The argument to
tuple_open
, +tuple_close
andtuple_delimiter
may be achar
,wchar_t
, a C-string, or a wide C-string.@@ -83,12 +84,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:
@@ -98,27 +99,27 @@ The code:-vector<int, int, int> i; -vector<int, int> j; +vector
<int, int, int> i; +vector
<int, int> j; std::cin >> i; std::cin >> set_open('[') >> set_close(']') >> set_delimiter(':'); std::cin >> j;- reads the data into the vector(s) i - and j. + reads the data into the
vector
(s)i
+ andj
.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 -
#include <boost/fusion/sequence/io.hpp> #include <boost/fusion/include/io.hpp> diff --git a/doc/html/fusion/sequence/operator/i_o/in.html b/doc/html/fusion/sequence/operator/i_o/in.html index f3d8bd62..ae285c8d 100644 --- a/doc/html/fusion/sequence/operator/i_o/in.html +++ b/doc/html/fusion/sequence/operator/i_o/in.html @@ -3,7 +3,7 @@in - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,9 +24,10 @@- + Description
@@ -34,7 +35,7 @@ stream.
- + Synopsis
@@ -43,7 +44,7 @@ operator>>(IStream& is, Sequence& seq);- + Parameters
@@ -107,7 +108,7 @@
- + Expression Semantics
@@ -115,15 +116,15 @@ is >> seq- Return type: IStream& + Return type: IStream&
- Semantics: For each element, e, in sequence, seq, - call is >> - e. + Semantics: For each element,
e
, in sequence,seq
, + callis >> + e
.- + Header
@@ -131,11 +132,11 @@ #include <boost/fusion/include/in.hpp>- + Example
-vector<int, std::string, char> v; +diff --git a/doc/html/fusion/sequence/operator/i_o/out.html b/doc/html/fusion/sequence/operator/i_o/out.html index ff958594..7aac041a 100644 --- a/doc/html/fusion/sequence/operator/i_o/out.html +++ b/doc/html/fusion/sequence/operator/i_o/out.html @@ -3,7 +3,7 @@vector
<int, std::string, char> v; std::cin >> v;out - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,9 +24,10 @@- + Description
@@ -34,7 +35,7 @@ stream.
- + Synopsis
@@ -43,7 +44,7 @@ operator<<(OStream& os, Sequence& seq);- + Parameters
@@ -107,7 +108,7 @@
- + Expression Semantics
@@ -115,15 +116,15 @@ 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
.
@@ -131,11 +132,11 @@ #include <boost/fusion/include/out.hpp>
-std::cout << make_vector(123, "Hello", 'x') << std::endl;
+std::cout << make_vector
(123, "Hello", 'x') << std::endl;
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
A metafunction that establishes the conceptual classification of a particular Sequence or Iterator (see Iterator Concepts and Sequence Concepts).
-namespace traits { @@ -49,10 +50,10 @@ }; }-
- T
+ |
@@ -94,16 +95,16 @@ |
typedef traits::category_of<T>::type category;
- Return type: + Return type:
For Iterators, the return type is derived from one of: @@ -157,25 +158,25 @@ }}
- Semantics: Establishes the conceptual classification + Semantics: Establishes the conceptual classification of a particular Sequence or Iterator.
-#include <boost/fusion/support/category_of.hpp> #include <boost/fusion/include/category_of.hpp>-
using boost::is_base_of; -typedef traits::category_of<list<> >::type list_category; -typedef traits::category_of<vector<> >::type vector_category; +typedef traits::category_of<diff --git a/doc/html/fusion/support/deduce.html b/doc/html/fusion/support/deduce.html index 322b1e23..9a8de243 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; BOOST_MPL_ASSERT(( is_base_of<forward_traversal_tag, list_category> )); BOOST_MPL_ASSERT(( is_base_of<random_access_traversal_tag, vector_category> ));
Metafunction to apply element conversion to the full argument type.
- It removes references to const,
- references to array types are kept, even if the array is const.
- Reference wrappers are removed (see boost::ref).
+ It removes references to const
,
+ references to array types are kept, even if the array is const
.
+ Reference wrappers are removed (see boost::ref
).
#include <boost/fusion/support/deduce.hpp> #include <boost/fusion/include/deduce.hpp>-
namespace traits { @@ -60,10 +61,10 @@ }; }-
template <typename T> struct holder @@ -81,11 +82,11 @@ return holder<T>(a); }-
diff --git a/doc/html/fusion/support/deduce_sequence.html b/doc/html/fusion/support/deduce_sequence.html index 67e63b47..1aa45c67 100644 --- a/doc/html/fusion/support/deduce_sequence.html +++ b/doc/html/fusion/support/deduce_sequence.html @@ -3,7 +3,7 @@ | ![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
Applies element - conversion to each element in a Forward - Sequence. The resulting type is a Random + conversion to each element in a Forward + Sequence. The resulting type is a Random Access Sequence that provides a converting constructor accepting the original type as its argument.
-#include <boost/fusion/support/deduce_sequence.hpp> #include <boost/fusion/include/deduce_sequence.hpp>-
namespace traits { @@ -60,10 +59,10 @@ }; }-
template <class Seq> struct holder @@ -76,18 +75,18 @@ }; template <typename T0, typename T1> -holder< vector<T0 const &, T1 const &> > +holder<-vector
<T0 const &, T1 const &> > make_holder(T0 const & a0, T1 const & a1) { - typedef vector<T0 const &, T1 const &> arg_vec_t; + typedefvector
<T0 const &, T1 const &> arg_vec_t; return holder<arg_vec_t>( arg_vec_t(a0,a1) ); }
diff --git a/doc/html/fusion/support/is_sequence.html b/doc/html/fusion/support/is_sequence.html index c2decf52..4cae712a 100644 --- a/doc/html/fusion/support/is_sequence.html +++ b/doc/html/fusion/support/is_sequence.html @@ -3,7 +3,7 @@ | ![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Metafunction that evaluates to mpl::true_
- if a certain type T is a
- conforming Fusion Sequence, mpl::false_
+ Metafunction that evaluates to mpl::true_
+ if a certain type T
is a
+ conforming Fusion Sequence, mpl::false_
otherwise. This may be specialized to accomodate clients which provide Fusion
conforming sequences.
namespace traits { @@ -50,10 +51,10 @@ }; }-
- T
+ |
@@ -95,43 +96,43 @@ |
typedef traits::is_sequence<T>::type c;
- Return type: An MPL + Return type: An MPL Boolean Constant.
- Semantics: Metafunction that evaluates to
- mpl::true_ if a certain type T
- is a conforming Fusion sequence, mpl::false_
+ Semantics: Metafunction that evaluates to
+ mpl::true_
if a certain type T
+ is a conforming Fusion sequence, mpl::false_
otherwise.
#include <boost/fusion/support/is_sequence.hpp> #include <boost/fusion/include/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> > ));
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- Metafunction that evaluates to mpl::true_
- if a certain type T is a
- conforming Fusion View, mpl::false_
+ Metafunction that evaluates to mpl::true_
+ if a certain type T
is a
+ conforming Fusion View, mpl::false_
otherwise. A view is a specialized sequence that does not actually contain
data. Views hold sequences which may be other views. In general, views are
held by other views by value, while non-views are held by other views by
- reference. is_view may be
+ reference. is_view
may be
specialized to accomodate clients providing Fusion conforming views.
namespace traits { @@ -53,10 +54,10 @@ }; }-
- T
+ |
@@ -98,43 +99,43 @@ |
typedef traits::is_view<T>::type c;
- Return type: An MPL + Return type: An MPL Boolean Constant.
- Semantics: Metafunction that evaluates to
- mpl::true_ if a certain type T
- is a conforming Fusion view, mpl::false_
+ Semantics: Metafunction that evaluates to
+ mpl::true_
if a certain type T
+ is a conforming Fusion view, mpl::false_
otherwise.
#include <boost/fusion/support/is_view.hpp> #include <boost/fusion/include/is_view.hpp>-
BOOST_MPL_ASSERT_NOT(( traits::is_view<std::vector<int> > )); BOOST_MPL_ASSERT_NOT(( traits::is_view<int> )); using boost::mpl::_ using boost::is_pointer; -typedef vector<int*, char, long*, bool, double> vector_type; -typedef filter_view<vector_type, is_pointer<_> > filter_view_type; +typedefdiff --git a/doc/html/fusion/support/pair.html b/doc/html/fusion/support/pair.html index 4d79502a..75bee4ba 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; 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.
template <typename First, typename Second> struct pair; @@ -60,10 +61,10 @@ typename result_of::make_pair<First,Second>::type make_pair(Second const &);-
- P::first_type
+ |
- The type of the first template parameter, F,
- equivalent to result_of::first<P>::type.
+ The type of the first template parameter, |
- P::second_type
+ |
- The type of the second template parameter, S,
- equivalent to result_of::second<P>::type.
+ The type of the second template parameter, |
- P()
+ |
@@ -202,37 +203,37 @@ |
- P(s)
+ |
- Construct a pair given value for the second type, s.
+ Construct a pair given value for the second type, |
- P(p2)
+ |
- Copy constructs a pair from another pair, p2.
+ Copy constructs a pair from another pair, |
- p =
- p2
+ |
- Assigns a pair, p1, from another pair, p2.
+ Assigns a pair, p1, from another pair, |
- Make a pair given the first type, F,
- and a value for the second type, s.
- The second type assumes the type of s
+ Make a pair given the first type, |
- o <<
- p
+ |
- Output p to output
- stream, o.
+ Output |
- i >>
- p
+ |
- Input p from input
- stream, i.
+ Input |
- p ==
- p2
+ |
@@ -294,8 +295,8 @@ |
- p !=
- p2
+ |
@@ -306,18 +307,18 @@ |
#include <boost/fusion/support/pair.hpp> #include <boost/fusion/include/pair.hpp>-
pair<int, char> p('X'); std::cout << p << std::endl; diff --git a/doc/html/fusion/support/tag_of.html b/doc/html/fusion/support/tag_of.html index d29ac923..e91dbaa6 100644 --- a/doc/html/fusion/support/tag_of.html +++ b/doc/html/fusion/support/tag_of.html @@ -3,7 +3,7 @@tag_of - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
All conforming Fusion sequences and iterators have an associated tag type. The purpose of the tag is to enable tag @@ -39,10 +40,10 @@ This metafunction may be specialized to accomodate clients providing Fusion conforming sequences.
-namespace traits { @@ -53,10 +54,10 @@ }; }-
- T
+ |
@@ -98,37 +99,37 @@ |
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
.
#include <boost/fusion/support/tag_of.hpp> #include <boost/fusion/include/tag_of.hpp>-
-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/tuple.html b/doc/html/fusion/tuple.html index 8319ff15..91058ed9 100644 --- a/doc/html/fusion/tuple.html +++ b/doc/html/fusion/tuple.html @@ -3,7 +3,7 @@Tuple - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,7 +24,8 @@diff --git a/doc/html/fusion/tuple/class_template_tuple.html b/doc/html/fusion/tuple/class_template_tuple.html index 9a259637..a0a3d998 100644 --- a/doc/html/fusion/tuple/class_template_tuple.html +++ b/doc/html/fusion/tuple/class_template_tuple.html @@ -3,7 +3,7 @@
- Class template tuple
@@ -43,12 +44,12 @@
The TR1 technical report describes extensions to the C++ standard library. Many of these extensions will be considered for the next iteration of the C++ - standard. TR1 describes a tuple type, and support for treating std::pair + standard. TR1 describes a tuple type, and support for treating
std::pair
as a type of tuple.Fusion provides full support for the TR1 - Tuple interface, and the extended uses of std::pair described + Tuple interface, and the extended uses of
std::pair
described in the TR1 document.Class template tuple - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,7 +24,8 @@Fusion's implementation of the TR1 - Tuple is also a fusion Forward + Tuple is also a fusion Forward Sequence. As such the fusion tuple type provides a lot of functionality beyond that required by TR1.
- Currently tuple is basically a synonym for vector, although this may be changed + Currently tuple is basically a synonym for
-vector
, although this may be changed in future releases of fusion.- +
++ Synopsis -
template< typename T1 = unspecified, diff --git a/doc/html/fusion/tuple/class_template_tuple/construction.html b/doc/html/fusion/tuple/class_template_tuple/construction.html index c4c70c4f..fe31305b 100644 --- a/doc/html/fusion/tuple/class_template_tuple/construction.html +++ b/doc/html/fusion/tuple/class_template_tuple/construction.html @@ -3,20 +3,19 @@Construction - + - +
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
The TR1 Tuple type provides a default constructor, a constructor that takes @@ -37,34 +37,34 @@ copy constructor. The details of the various constructors are described in this section.
-Notation
T1
+ ... TN
,
+ U1 ...
+ UN
Tuple element types
P1
+ ... PN
Parameter types
Ti
,
+ Ui
- The type of the ith
+ The type of the i
th
element of a tuple
Pi
- The type of the ith
+ The type of the i
th
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
- is Ti if Ti is a reference type, const Ti& otherwise.
+ Requirements: Each Pi
+ is Ti
if Ti
is a reference type, const Ti&
otherwise.
- Semantics: Copy initializes each element + Semantics: Copy initializes each element with the corresponding parameter.
tuple(const tuple& t);
- Requirements: Each Ti
+ Requirements: Each Ti
should be copy constructable.
- Semantics: Copy constructs each element
- of *this
- with the corresponding element of t.
+ Semantics: Copy constructs each element
+ of *this
+ with the corresponding element of t
.
template<typename U1, typename U2, ..., typename UN> tuple(const tuple<U1, U2, ..., UN>& t);
- Requirements: Each Ti
- shall be constructible from the corresponding Ui.
+ Requirements: Each Ti
+ shall be constructible from the corresponding Ui
.
- Semantics: Constructs each element of
- *this
- with the corresponding element of t.
+ Semantics: Constructs each element of
+ *this
+ with the corresponding element of t
.
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
The TR1
- Tuple provides the get
+ Tuple provides the get
function to provide access to it's elements by zero based numeric index.
template<int I, T> RJ get(T& t);
- Requires: 0
+ Requires: 0
< I
- <= N
.
- The program is ill formed if I
- is out of bounds. T is
- any fusion sequence type, including tuple.
+ <= N.
+ The program is ill formed if I
+ is out of bounds. T
is
+ any fusion sequence type, including tuple
.
- Return type: RJ
- is equivalent to result_of::at_c<I,T>::type.
+ Return type: RJ
+ is equivalent to
.
result_of::at_c
<I,T>::type
- Returns: A reference to the Ith element of T.
+ Returns: A reference to the I
th element of T
.
template<int I, typename T> PJ get(T const& t);
- Requires: 0
+ Requires: 0
< I
- <= N
.
- The program is ill formed if I
- is out of bounds. T is
- any fusion sequence type, including tuple.
+ <= N.
+ The program is ill formed if I
+ is out of bounds. T
is
+ any fusion sequence type, including tuple
.
- Return type: PJ
- is equivalent to result_of::at_c<I,T>::type.
+ Return type: PJ
+ is equivalent to
.
result_of::at_c
<I,T>::type
- Returns: A const reference to the Ith element of T.
+ Returns: A const reference to the I
th element of T
.
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
The TR1 Tuple provides the standard boolean relational operators.
-Notation
T1
+ ... TN
,
+ U1 ...
+ UN
Tuple element types
P1
+ ... PN
Parameter types
Ti
,
+ Ui
- The type of the ith
+ The type of the i
th
element of a tuple
Pi
- The type of the ith
+ The type of the i
th
parameter
- Requirements: For all i,
- 1 <=
+ Requirements: For all i
,
+ 1 <=
i <
- N
, get<i>(lhs) == get<i>(rhs)
- is a valid expression returning a type that is convertible to bool.
+ N,
+ is a valid expression returning a type that is convertible to get
<i>(lhs) == get
<i>(rhs)bool
.
- Semantics: Returns true
- if and only if get<i>(lhs) == get<i>(rhs)
- for all i. For any 2 zero
- length tuples e and f, e
- == f
- returns true.
+ Semantics: Returns true
+ if and only if
+ for all get
<i>(lhs) == get
<i>(rhs)i
. For any 2 zero
+ length tuples e
and f
, e
+ == f
+ returns true
.
template<typename T1, typename T2, ..., typename TN, @@ -103,18 +97,16 @@ const tuple<U1, U2, ..., UN>& rhs);
- Requirements: For all i,
- 1 <=
+ Requirements: For all i
,
+ 1 <=
i <
- N
, get<i>(lhs) < get<i>(rhs)
- is a valid expression returning a type that is convertible to bool.
+ N,
+ is a valid expression returning a type that is convertible to get
<i>(lhs) < get
<i>(rhs)bool
.
- Semantics: Returns the lexicographical
- comparison of between lhs
- and rhs.
+ Semantics: Returns the lexicographical
+ comparison of between lhs
+ and rhs
.
template<typename T1, typename T2, ..., typename TN, @@ -124,16 +116,14 @@ const tuple<U1, U2, ..., UN>& rhs);
- Requirements: For all i,
- 1 <=
+ Requirements: For all i
,
+ 1 <=
i <
- N
, get<i>(lhs) == get<i>(rhs)
- is a valid expression returning a type that is convertible to bool.
+ N,
+ is a valid expression returning a type that is convertible to get
<i>(lhs) == get
<i>(rhs)bool
.
- Semantics: Returns !(lhs == rhs).
+ Semantics: Returns !(lhs == rhs)
.
template<typename T1, typename T2, ..., typename TN, @@ -143,16 +133,14 @@ const tuple<U1, U2, ..., UN>& rhs);
- Requirements: For all i,
- 1 <=
+ Requirements: For all i
,
+ 1 <=
i <
- N
, get<i>(rhs) < get<i>(lhs)
- is a valid expression returning a type that is convertible to bool.
+ N,
+ is a valid expression returning a type that is convertible to get
<i>(rhs) < get
<i>(lhs)bool
.
- Semantics: Returns !(rhs < lhs)
+ Semantics: Returns !(rhs < lhs)
template<typename T1, typename T2, ..., typename TN, @@ -162,17 +150,15 @@ const tuple<U1, U2, ..., UN>& rhs);
- Requirements: For all i,
- 1 <=
+ Requirements: For all i
,
+ 1 <=
i <
- N
, get<i>(rhs) < get<i>(lhs)
- is a valid expression returning a type that is convertible to bool.
+ N,
+ is a valid expression returning a type that is convertible to get
<i>(rhs) < get
<i>(lhs)bool
.
- Semantics: Returns rhs
- < lhs.
+ Semantics: Returns rhs
+ < lhs
.
template<typename T1, typename T2, ..., typename TN, @@ -182,16 +168,14 @@ const tuple<U1, U2, ..., UN>& rhs);
- Requirements: For all i,
- 1 <=
+ Requirements: For all i
,
+ 1 <=
i <
- N
, get<i>(lhs) < get<i>(rhs)
- is a valid expression returning a type that is convertible to bool.
+ N,
+ is a valid expression returning a type that is convertible to get
<i>(lhs) < get
<i>(rhs)bool
.
- Semantics: Returns !(lhs < rhs).
+ Semantics: Returns !(lhs < rhs)
.
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
- TR1 describes 2 utility functions for creating _tr1tuple_s. make_tuple
- builds a tuple out of it's argument list, and tie
+ TR1 describes 2 utility functions for creating _tr1tuple_s. make_tuple
+ builds a tuple out of it's argument list, and tie
builds a tuple of references to it's arguments. The details of these creation
functions are described in this section.
template<typename T1, typename T2, ..., typename TN> tuple<V1, V2, ..., VN> make_tuple(const T1& t1, const T2& t2, ..., const TN& tn);
- Where Vi is X&
- if the cv-unqualified type Ti
- is reference_wrapper<X>,
- otherwise Vi is Ti.
+ Where Vi
is X&
+ if the cv-unqualified type Ti
+ is reference_wrapper<X>
,
+ otherwise Vi
is Ti
.
- Returns: tuple<V1, V2, ..., VN>(t1, t2, ..., tN)
+ Returns: tuple<V1, V2, ..., VN>(t1, t2, ..., tN)
template<typename T1, typename T2, ..., typename TN> tuple<T1&, T2&, ..., TN&> tie(T1& t1, T2& t2, ..., TN& tn);
- Returns: tuple<T1&, T2&, ...,
- TN&>(t1, t2, ..., tN). When argument ti
- is ignore, assigning any
+ Returns: tuple<T1&, T2&, ...,
+ TN&>(t1, t2, ..., tN). When argument ti
+ is ignore
, assigning any
value to the corresponding tuple element has has no effect.
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
The TR1 Tuple provides 2 helper traits, for compile time access to the tuple size, and the element types.
-tuple_size<T>::value
- Requires: T
- is any fusion sequence type, including tuple.
+ Requires: T
+ is any fusion sequence type, including tuple
.
- Type: MPL + Type: MPL Integral Constant
- Value: The number of elements in the sequence.
- Equivalent to result_of::size<T>::type.
+ Value: The number of elements in the sequence.
+ Equivalent to
.
result_of::size
<T>::type
tuple_element<I, T>::type
- Requires: T
- is any fusion sequence type, including tuple.
- 0 <=
+ Requires: T
+ is any fusion sequence type, including tuple
.
+ 0 <=
I <
- N
or the program is ill formed.
+ N or the program is ill formed.
- Value: The type of the Ith
- element of T. Equivalent
- to result_of::value_at<I,T>::type.
+ Value: The type of the I
th
+ element of T
. Equivalent
+ to
.
result_of::value_at
<I,T>::type
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
The TR1
- Tuple interface is specified to provide uniform access to std::pair
+ Tuple interface is specified to provide uniform access to std::pair
as if it were a 2 element tuple.
tuple_size<std::pair<T1, T2> >::value
- Type: An MPL + Type: An MPL Integral Constant
- Value: Returns 2, the number of elements + Value: Returns 2, the number of elements in a pair.
tuple_element<0, std::pair<T1, T2> >::type
- Type: T1
+ Type: T1
- Value: Returns the type of the first element + Value: Returns the type of the first element of the pair
tuple_element<1, std::pair<T1, T2> >::type
- Type: T2
+ Type: T2
- Value: Returns thetype of the second element + Value: Returns thetype of the second element of the pair
@@ -78,21 +78,21 @@ const P& get(const std::pair<T1, T2>& pr);
- Type: If I
- == 0
- P is T1,
- else if I ==
- 1 P
- is T2 else the program is
+ Type: If I
+ == 0
+ P
is T1
,
+ else if I ==
+ 1
P
+ is T2
else the program is
ill-formed.
- Returns: pr.first
- if I ==
- 0 else pr.second.[*Returns:
- pr.first if I
- == 0
- else pr.second.
+ Returns: pr.first
+ if I ==
+ 0
else pr.second
.[*Returns:
+ pr.first
if I
+ == 0
+ else pr.second
.
![]() |
Home | Libraries | -People | -FAQ | +People | +FAQ | More |
#include <boost/fusion/view.hpp> #include <boost/fusion/include/view.hpp> diff --git a/doc/html/fusion/view/filter_view.html b/doc/html/fusion/view/filter_view.html index eb410f4b..c280c961 100644 --- a/doc/html/fusion/view/filter_view.html +++ b/doc/html/fusion/view/filter_view.html @@ -3,7 +3,7 @@filter_view - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
- filter_view is a view into
+ filter_view
is a view into
a subset of its underlying sequence's elements satisfying a given predicate
(an MPL metafunction).
- The filter_view presents
- only those elements for which its predicate evaluates to mpl::true_.
+ The filter_view
presents
+ only those elements for which its predicate evaluates to mpl::true_
.
#include <boost/fusion/view/filter_view.hpp> #include <boost/fusion/include/filter_view.hpp>-
template <typename Sequence, typename Pred> struct filter_view;-
- Sequence
+ |
@@ -101,12 +101,12 @@ | |
- Pred
+ |
- Unary Metafunction returning an mpl::bool_
+ Unary Metafunction returning an |
@@ -116,39 +116,36 @@ |
Notation
F
- A filter_view type
+ A filter_view
type
f
,
+ f2
- Instances of filter_view
+ Instances of filter_view
s
- A Forward Sequence + A Forward Sequence
Semantics of an expression is defined only where it differs from, or is not - defined in Forward + defined in Forward Sequence.
- F(s)
+ |
- Creates a filter_view
- given a sequence, s.
+ Creates a |
- F(f)
+ |
- Copy constructs a filter_view
- from another filter_view,
- f.
+ Copy constructs a |
- f =
- f2
+ |
- Assigns to a filter_view,
- f, from another
- filter_view, f2.
+ Assigns to a |
using boost::mpl::_; using boost::mpl::not_; using boost::is_class; -typedef vector<std::string, char, long, bool, double> vector_type; +typedefvector
<std::string, char, long, bool, double> vector_type; vector_type v("a-string", '@', 987654, true, 6.6); filter_view<vector_type const, not_<is_class<_> > > view(v); diff --git a/doc/html/fusion/view/iterator_range.html b/doc/html/fusion/view/iterator_range.html index 62357d4e..59b1ef03 100644 --- a/doc/html/fusion/view/iterator_range.html +++ b/doc/html/fusion/view/iterator_range.html @@ -3,7 +3,7 @@iterator_range - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
- iterator_range presents a
+ iterator_range
presents a
sub-range of its underlying sequence delimited by a pair of iterators.
#include <boost/fusion/view/iterator_range.hpp> #include <boost/fusion/include/iterator_range.hpp>-
template <typename First, typename Last> struct iterator_range;-
- First
+ |
@@ -96,7 +97,7 @@ |
- Last
+ |
@@ -111,17 +112,14 @@ |
Notation
IR
- An iterator_range type
+ An iterator_range
type
f
- An instance of First
+ An instance of First
l
- An instance of Last
+ An instance of Last
ir
,
+ ir2
- Instances of iterator_range
+ Instances of iterator_range
Semantics of an expression is defined only where it differs from, or is not - defined in Forward + defined in Forward Sequence.
- IR(f, l)
+ |
- Creates an iterator_range
- given iterators, f
- and l.
+ Creates an |
- IR(ir)
+ |
- Copy constructs an iterator_range
- from another iterator_range,
- ir.
+ Copy constructs an |
- ir =
- ir2
+ |
- Assigns to a iterator_range,
- ir, from another
- iterator_range,
- ir2.
+ Assigns to a |
char const* s = "Ruby"; -typedef vector<int, char, double, char const*> vector_type; +typedefvector
<int, char, double, char const*> vector_type; vector_type vec(1, 'x', 3.3, s); -typedef result_of::begin<vector_type>::type A; -typedef result_of::end<vector_type>::type B; -typedef result_of::next<A>::type C; -typedef result_of::prior<B>::type D; +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; C c(vec); D d(vec); diff --git a/doc/html/fusion/view/joint_view.html b/doc/html/fusion/view/joint_view.html index aef924a0..17ca42d9 100644 --- a/doc/html/fusion/view/joint_view.html +++ b/doc/html/fusion/view/joint_view.html @@ -3,7 +3,7 @@joint_view - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,35 +24,36 @@
- joint_view presents a view
+ joint_view
presents a view
which is a concatenation of two sequences.
#include <boost/fusion/view/joint_view.hpp> #include <boost/fusion/include/joint_view.hpp>-
template <typename Sequence1, typename Sequence2> struct joint_view;-
- Sequence1
+ |
@@ -98,13 +98,12 @@ |
- Sequence2
+ |
@@ -115,42 +114,40 @@ |
Notation
JV
- A joint_view type
+ A joint_view
type
s1
- An instance of Sequence1
+ An instance of Sequence1
s2
- An instance of Sequence2
+ An instance of Sequence2
jv
,
+ jv2
- Instances of joint_view
+ Instances of joint_view
Semantics of an expression is defined only where it differs from, or is not - defined in Forward + defined in Forward Sequence.
- JV(s1, s2)
+ |
- Creates a joint_view
- given sequences, s1
- and s2.
+ Creates a |
- JV(jv)
+ |
- Copy constructs a joint_view
- from another joint_view,
- jv.
+ Copy constructs a |
- jv =
- jv2
+ |
- Assigns to a joint_view,
- jv, from another
- joint_view, jv2.
+ Assigns to a |
-vector<int, char> v1(3, 'x'); -vector<std::string, int> v2("hello", 123); +diff --git a/doc/html/fusion/view/reverse_view.html b/doc/html/fusion/view/reverse_view.html index 8af6f29c..46940e46 100644 --- a/doc/html/fusion/view/reverse_view.html +++ b/doc/html/fusion/view/reverse_view.html @@ -3,7 +3,7 @@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 reversed
+ reverse_view
presents a reversed
view of underlying sequence. The first element will be its last and the last
element will be its first.
#include <boost/fusion/view/reverse_view.hpp> #include <boost/fusion/include/reverse_view.hpp>-
template <typename Sequence> struct reverse_view;-
- Sequence
+ |
@@ -92,40 +92,38 @@ |
Notation
RV
- A reverse_view type
+ A reverse_view
type
s
- An instance of Sequence
+ An instance of Sequence
rv
,
+ rv2
- Instances of reverse_view
+ Instances of reverse_view
Semantics of an expression is defined only where it differs from, or is not - defined in Bidirectional + defined in Bidirectional Sequence.
- RV(s)
+ |
- Creates a unary reverse_view
- given sequence, s.
+ Creates a unary |
- RV(rv)
+ |
- Copy constructs a reverse_view
- from another reverse_view,
- rv.
+ Copy constructs a |
- rv =
- rv2
+ |
- Assigns to a reverse_view,
- rv, from another
- reverse_view, rv2.
+ Assigns to a |
-typedef vector<int, short, double> vector_type; +typedefvector
<int, short, double> vector_type; vector_type vec(2, 5, 3.3); reverse_view<vector_type> reverse(vec); diff --git a/doc/html/fusion/view/single_view.html b/doc/html/fusion/view/single_view.html index 0cad96c7..0a273e68 100644 --- a/doc/html/fusion/view/single_view.html +++ b/doc/html/fusion/view/single_view.html @@ -3,7 +3,7 @@single_view - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,31 +24,32 @@
- single_view is a view into
+ single_view
is a view into
a value as a single element sequence.
#include <boost/fusion/view/single_view.hpp> #include <boost/fusion/include/single_view.hpp>-
template <typename T> struct single_view;-
- T
+ |
@@ -89,38 +90,36 @@ |
Notation
S
- A single_view type
+ A single_view
type
s
,
+ s2
- Instances of single_view
+ Instances of single_view
x
- An instance of T
+ An instance of T
Semantics of an expression is defined only where it differs from, or is not - defined in Forward + defined in Forward Sequence.
- S(x)
+ |
- Creates a single_view
- from x.
+ Creates a |
- S(s)
+ |
- Copy constructs a single_view
- from another single_view,
- s.
+ Copy constructs a |
- s =
- s2
+ |
- Assigns to a single_view,
- s, from another
- single_view, s2.
+ Assigns to a |
single_view<int> view(3); std::cout << view << std::endl; diff --git a/doc/html/fusion/view/transform_view.html b/doc/html/fusion/view/transform_view.html index 70434e88..72eab620 100644 --- a/doc/html/fusion/view/transform_view.html +++ b/doc/html/fusion/view/transform_view.html @@ -3,7 +3,7 @@transform_view - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,46 +24,47 @@- The unary version of transform_view + The unary version of
-transform_view
presents a view of its underlying sequence given a unary function object - or function pointer. The binary version of transform_view + or function pointer. The binary version oftransform_view
presents a view of 2 underlying sequences, given a binary function object - or function pointer. The transform_view + or function pointer. Thetransform_view
inherits the traversal characteristics (see Sequence Traversal Concept) of its underlying sequence or sequences.- +
++ Header -
#include <boost/fusion/view/transform_view.hpp> #include <boost/fusion/include/transform_view.hpp>-- +
++ Synopsis -
- Unary Version + Unary Version
template <typename Sequence, typename F1> struct transform_view;- Binary Version + Binary Version
template <typename Sequence1, typename Sequence2, typename F2> struct transform_view;-- +
++ Template parameters -
-
@@ -91,13 +92,12 @@ - Sequence +
Sequence
@@ -109,13 +109,12 @@ - Sequence1 +
Sequence1
@@ -127,13 +126,12 @@ - Sequence2 +
Sequence2
@@ -145,14 +143,14 @@ - F1 +
F1
@@ -164,14 +162,14 @@ - A unary function object or function pointer. boost::result_of<F1(E)>::type is the return type of an instance - of F1 when called - with a value of each element type E + A unary function object or function pointer.
is the return type of an instance + of
boost::result_of
<F1(E)>::typeF1
when called + with a value of each element typeE
in the input sequence.- F2 +
F2
@@ -182,17 +180,14 @@ - A binary function object or function pointer. boost::result_of<F2(E1, E2)>::type is the return type of an instance - of F2 when called - with a value of each corresponding pair of element type E1 and E2 + A binary function object or function pointer.
is the return type of an instance + of
boost::result_of
<F2(E1, E2)>::typeF2
when called + with a value of each corresponding pair of element typeE1
andE2
in the input sequences.- +
++ Model of -
-
- -Forward Sequence, - Bidirectional - Sequence or Random +Forward Sequence, + Bidirectional + Sequence or Random Access Sequence depending on the traversal characteristics (see Sequence Traversal Concept) of its underlying sequence. @@ -200,60 +195,57 @@
-Notation
-
- TV
+TV
- -
- A transform_view type + A
transform_view
type- BTV
+BTV
- -
- A binary transform_view + A binary
transform_view
type- UTV
+UTV
- -
- A unary transform_view + A unary
transform_view
type- f1
+f1
- -
- An instance of F1 + An instance of
F1
- f2
+f2
- -
- An instance of F2 + An instance of
F2
- s
+s
- -
- An instance of Sequence + An instance of
Sequence
- s1
+s1
- -
- An instance of Sequence1 + An instance of
Sequence1
- s2
+s2
- -
- An instance of Sequence2 + An instance of
Sequence2
- tv, - tv2
+tv
, +tv2
- Instances of transform_view + Instances of
transform_view
- +
++ Expression Semantics -
Semantics of an expression is defined only where it differs from, or is not - defined in Forward - Sequence, Bidirectional - Sequence or Random + defined in Forward + Sequence, Bidirectional + Sequence or Random Access Sequence depending on the traversal characteristics (see Sequence Traversal Concept) of its underlying sequence or sequences.
@@ -278,68 +270,68 @@- UTV(s, f1) +
UTV(s, f1)
- Creates a unary transform_view - given sequence, s - and unary function object or function pointer, f1. + Creates a unary
transform_view
+ given sequence,s
+ and unary function object or function pointer,f1
.- BTV(s1, s2, f2) +
BTV(s1, s2, f2)
- Creates a binary transform_view - given sequences, s1 - and s2 and binary - function object or function pointer, f2. + Creates a binary
transform_view
+ given sequences,s1
+ ands2
and binary + function object or function pointer,f2
.- TV(tv) +
TV(tv)
- Copy constructs a transform_view - from another transform_view, - tv. + Copy constructs a
transform_view
+ from anothertransform_view
, +tv
.- tv = - tv2 +
tv = + tv2
- Assigns to a transform_view, - tv, from another - transform_view, - tv2. + Assigns to a
transform_view
, +tv
, from another +transform_view
, +tv2
.- +
++ Example -
struct square { @@ -358,7 +350,7 @@ } }; -typedef vector<int, short, double> vector_type; +typedefvector
<int, short, double> vector_type; vector_type vec(2, 5, 3.3); transform_view<vector_type, square> transform(vec, square()); diff --git a/doc/html/fusion/view/zip_view.html b/doc/html/fusion/view/zip_view.html index 39d8d387..628798f6 100644 --- a/doc/html/fusion/view/zip_view.html +++ b/doc/html/fusion/view/zip_view.html @@ -3,7 +3,7 @@zip_view - + @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -24,38 +24,39 @@ ++ Description - +
- zip_view presents a view +
-zip_view
presents a view which iterates over a collection of Sequence(s) - in parallel. A zip_view is + in parallel. Azip_view
is constructed from a Sequence of references to the component _sequence_s.- +
++ Header -
#include <boost/fusion/view/zip_view.hpp> #include <boost/fusion/include/zip_view.hpp>-- +
++ Synopsis -
template <typename Sequences> struct zip_view;-- +
++ Template parameters -
-
@@ -82,13 +83,12 @@ - Sequences +
Sequences
@@ -98,17 +98,14 @@ - A Forward + A Forward Sequence of references to other Fusion _sequence_s
- +
++ Model of -
diff --git a/doc/html/index.html b/doc/html/index.html index 2ce13dde..4f07e29b 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -3,7 +3,7 @@
- -Forward Sequence, - Bidirectional - Sequence or Random +Forward Sequence, + Bidirectional + Sequence or Random Access Sequence depending on the traversal characteristics (see Sequence Traversal Concept) of its underlying sequence. @@ -116,29 +113,28 @@
-Notation
-
- ZV
+ZV
- -
- A joint_view type + A
joint_view
type- s
+s
- -
- An instance of Sequences + An instance of
Sequences
- zv1, - zv2
+zv1
, +zv2
- Instances of ZV + Instances of
ZV
- +
++ Expression Semantics -
Semantics of an expression is defined only where it differs from, or is not - defined in Forward + defined in Forward Sequence.
-@@ -162,12 +158,12 @@
- ZV(s) +
ZV(s)
@@ -175,44 +171,44 @@ - Creates a zip_view + Creates a
zip_view
given a sequence of references to the component _sequence_s.- ZV(zv1) +
ZV(zv1)
- Copy constructs a zip_view - from another zip_view, - zv. + Copy constructs a
zip_view
+ from anotherzip_view
, +zv
.- zv1 = - zv2 +
zv1 = + zv2
- Assigns to a zip_view, - zv, from another - zip_view, zv2. + Assigns to a
zip_view
, +zv
, from another +zip_view
,zv2
.- +
++ Example -
-typedef vector<int,int> vec1; -typedef vector<char,char> vec2; +typedefvector
<int,int> vec1; +typedefvector
<char,char> vec2; vec1 v1(1,2); vec2 v2('a','b'); -typedef vector<vec1&, vec2&> sequences; +typedefvector
<vec1&, vec2&> sequences; std::cout << zip_view<sequences>(sequences(v1, v2)) << std::endl; // ((1 a) (2 b))Chapter 1. Fusion 2.0 - + @@ -12,8 +12,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -34,7 +34,7 @@Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
-Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -244,7 +244,7 @@
Last revised: November 14, 2007 at 10:10:22 GMT |
+Last revised: December 02, 2007 at 22:55:03 GMT |