diff --git a/doc/functional.qbk b/doc/functional.qbk
index 6b83c554..120ae0d2 100644
--- a/doc/functional.qbk
+++ b/doc/functional.qbk
@@ -10,7 +10,9 @@
Components to call functions and function objects and to make Fusion code
callable through a function object interface.
-/functional.hpp>
+[heading Header]
+
+ #include
- Fusion provides a couple of adapters for other sequences such as std::pair,
+ Fusion provides a couple of adapters for other sequences such as
@@ -60,15 +59,13 @@
and Fusion. To make Fusion sequences fully conforming MPL
sequences, include:
If you want bi-directional adaptation to and from MPL
and Fusion, simply include:
The header includes all the necessary headers.
diff --git a/doc/html/fusion/adapted/adapt_assoc.html b/doc/html/fusion/adapted/adapt_assoc.html
index 2232d58c..39c2d608 100644
--- a/doc/html/fusion/adapted/adapt_assoc.html
+++ b/doc/html/fusion/adapted/adapt_assoc.html
@@ -3,7 +3,7 @@
@@ -38,11 +38,10 @@
Sequence.
- The above macro generates the necessary code to adapt struct_name
+ The above macro generates the necessary code to adapt
- The macro should be used at global scope, and struct_name
+ The macro should be used at global scope, and
@@ -36,11 +36,10 @@
Access Sequence.
- The above macro generates the necessary code to adapt struct_name
+ The above macro generates the necessary code to adapt
- The macro should be used at global scope, and struct_name
+ The macro should be used at global scope, and
- This module provides adapters for boost::array.
- Including the module header makes boost::array
+ This module provides adapters for
diff --git a/doc/html/fusion/adapted/boost__tuple.html b/doc/html/fusion/adapted/boost__tuple.html
index 394ece3e..b17d1f50 100644
--- a/doc/html/fusion/adapted/boost__tuple.html
+++ b/doc/html/fusion/adapted/boost__tuple.html
@@ -3,7 +3,7 @@
- This module provides adapters for boost::tuple.
- Including the module header makes boost::tuple
+ This module provides adapters for
diff --git a/doc/html/fusion/adapted/mpl_sequence.html b/doc/html/fusion/adapted/mpl_sequence.html
index 6932d063..c08320db 100644
--- a/doc/html/fusion/adapted/mpl_sequence.html
+++ b/doc/html/fusion/adapted/mpl_sequence.html
@@ -3,7 +3,7 @@
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.
@@ -46,11 +46,10 @@
various data structures, non-intrusively, as full fledged Fusion sequences.
-
+
Header
-
-#include <boost/fusion/adapted.hpp>
+
#include <boost/fusion/adapted.hpp>
#include <boost/fusion/include/adapted.hpp>
-#include <boost/fusion/mpl.hpp>
+
#include <boost/fusion/mpl.hpp>
-#include <boost/fusion/include/mpl.hpp>
+
#include <boost/fusion/include/mpl.hpp>
-
+
Description
-
+
Synopsis
-
-BOOST_FUSION_ADAPT_ASSOC_STRUCT(
+
BOOST_FUSION_ADAPT_ASSOC_STRUCT(
struct_name
(member_type0, member_name0, key_type0)
(member_type1, member_name1, key_type1)
@@ -50,39 +49,37 @@
)
-
+
Semantics
struct_name
as a model of Random
Access Sequence and Associative
- Sequence. The sequence of (member_typeN,
+ 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.
struct_name
should be the fully namespace qualified name of the struct to be converted.
-
+
Header
-
-#include <boost/fusion/adapted/struct/adapt_assoc_struct.hpp>
+
#include <boost/fusion/adapted/struct/adapt_assoc_struct.hpp>
#include <boost/fusion/include/adapt_assoc_struct.hpp>
-
+
Example
-
-namespace demo
+
namespace demo
{
struct employee
{
diff --git a/doc/html/fusion/adapted/adapt_struct.html b/doc/html/fusion/adapted/adapt_struct.html
index 49146958..fffe4ea9 100644
--- a/doc/html/fusion/adapted/adapt_struct.html
+++ b/doc/html/fusion/adapted/adapt_struct.html
@@ -3,7 +3,7 @@
-
+
Description
-
+
Synopsis
-
-BOOST_FUSION_ADAPT_STRUCT(
+
BOOST_FUSION_ADAPT_STRUCT(
struct_name
(member_type0, member_name0)
(member_type1, member_name1)
@@ -48,36 +47,34 @@
)
-
+
Semantics
struct_name
as a model of Random
- Access Sequence. The sequence of (member_typeN,
- member_nameN)
+ 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.
struct_name
should be the fully namespace qualified name of the struct to be converted.
-
+
Header
-
-#include <boost/fusion/adapted/struct/adapt_struct.hpp>
+
#include <boost/fusion/adapted/struct/adapt_struct.hpp>
#include <boost/fusion/include/adapt_struct.hpp>
-
+
Example
-
-namespace demo
+
namespace demo
{
struct employee
{
diff --git a/doc/html/fusion/adapted/boost__array.html b/doc/html/fusion/adapted/boost__array.html
index aa011b30..b7986a9c 100644
--- a/doc/html/fusion/adapted/boost__array.html
+++ b/doc/html/fusion/adapted/boost__array.html
@@ -3,7 +3,7 @@
boost::array
.
+ Including the module header makes boost::array
a fully conforming Random
Access Sequence.
-
+
Header
-
-#include <boost/fusion/adapted/array.hpp>
+
#include <boost/fusion/adapted/array.hpp>
#include <boost/fusion/include/array.hpp>
-
+
Model of
-
+
Example
-
-boost::array<int,3> arr = {{1,2,3}};
+
boost::array<int,3> arr = {{1,2,3}};
-std::cout << *begin(arr) << std::endl;
-std::cout << *next(begin(arr)) << std::endl;
-std::cout << *advance_c<2>(begin(arr)) << std::endl;
-std::cout << *prior(end(arr)) << std::endl;
-std::cout << at_c<2>(arr) << std::endl;
+std::cout << *
begin
(arr) << std::endl;
+std::cout << *next
(begin
(arr)) << std::endl;
+std::cout << *advance_c
<2>(begin
(arr)) << std::endl;
+std::cout << *prior
(end
(arr)) << std::endl;
+std::cout << at_c
<2>(arr) << std::endl;
-
+
See also
boost::tuple
.
+ Including the module header makes boost::tuple
a fully conforming Forward
Sequence.
-
+
Header
-
-#include <boost/fusion/adapted/boost_tuple.hpp>
+
#include <boost/fusion/adapted/boost_tuple.hpp>
#include <boost/fusion/include/boost_tuple.hpp>
-
+
Model of
-
+
Example
-
-boost::tuple<int,std::string> example_tuple(101, "hello");
+
boost::tuple<int,std::string> example_tuple(101, "hello");
std::cout << *boost::fusion::begin(example_tuple) << '\n';
std::cout << *boost::fusion::next(boost::fusion::begin(example_tuple)) << '\n';
-
+
See also
-#include <boost/fusion/adapted/mpl.hpp> +#include <boost/fusion/adapted/mpl.hpp> #include <boost/fusion/include/mpl.hpp>- + Model of
@@ -63,21 +62,20 @@
- + Example
--mpl::vector_c<int, 123, 456> vec_c; +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;- + See also
diff --git a/doc/html/fusion/adapted/std__pair.html b/doc/html/fusion/adapted/std__pair.html index 53e5cbd6..55d17194 100644 --- a/doc/html/fusion/adapted/std__pair.html +++ b/doc/html/fusion/adapted/std__pair.html @@ -3,7 +3,7 @@
std::pair - + @@ -26,45 +26,43 @@- This module provides adapters for std::pair. - Including the module header makes std::pair + This module provides adapters for
std::pair
. + Including the module header makesstd::pair
a fully conforming Random Access Sequence.- + Header
--#include <boost/fusion/adapted/std_pair.hpp> +#include <boost/fusion/adapted/std_pair.hpp> #include <boost/fusion/include/std_pair.hpp>- + Model of
- + Example
--std::pair<int, std::string> p(123, "Hola!!!"); -std::cout << at_c<0>(p) << std::endl; -std::cout << at_c<1>(p) << std::endl; +std::pair<int, std::string> p(123, "Hola!!!"); +std::cout <<at_c
<0>(p) << std::endl; +std::cout <<at_c
<1>(p) << std::endl; std::cout << p << std::endl;- + See also
- std::pair, - TR1 - and std::pair +
std::pair
, +TR1 + and std::pair
- 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
+ Sequence, |
@@ -100,7 +99,7 @@ |
- initial_state
+ |
@@ -117,14 +116,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
+ |
@@ -137,41 +136,38 @@ |
-accumulate(seq, initial_state, f); +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)))
+ wheree1 ...eN
are the elements ofseq
.- + Complexity
- Linear, exactly result_of::size<Sequence>::value applications of f. + Linear, exactly
applications of
result_of::size
<Sequence>::valuef
.- + Header
--#include <boost/fusion/algorithm/iteration/accumulate.hpp> +#include <boost/fusion/algorithm/iteration/accumulate.hpp> #include <boost/fusion/include/accumulate.hpp>- + Example
--struct make_string +struct make_string { typedef std::string result_type; @@ -182,8 +178,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");
- seq
+ |
A model of Forward
- Sequence,f(e,s) must be a valid expression for
- each element e
- in seq, and current
- state s
+ Sequence, |
@@ -100,7 +99,7 @@ |
- initial_state
+ |
@@ -117,14 +116,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
+ |
@@ -137,41 +136,38 @@ |
-fold(seq, initial_state, f); +fold(seq, initial_state, f);- Return type: Any type + Return type: Any type
- Semantics: Equivalent to f(eN ....f(e2,f(e1,initial_state))) - where e1 ...eN are the elements of seq. + Semantics: Equivalent to
f(eN ....f(e2,f(e1,initial_state)))
+ wheree1 ...eN
are the elements ofseq
.- + Complexity
- Linear, exactly result_of::size<Sequence>::value applications of f. + Linear, exactly
applications of
result_of::size
<Sequence>::valuef
.- + Header
--#include <boost/fusion/algorithm/iteration/fold.hpp> +#include <boost/fusion/algorithm/iteration/fold.hpp> #include <boost/fusion/include/fold.hpp>- + Example
--struct make_string +struct make_string { typedef std::string result_type; @@ -182,8 +178,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");
- seq
+ |
A model of Forward
- Sequence, f(e) must be a valid expression for
- each element e
- in seq
+ Sequence, |
@@ -94,7 +93,7 @@ |
- f
+ |
@@ -114,41 +113,38 @@ |
-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 elemente
+ inseq
.- + Complexity
- Linear, exactly result_of::size<Sequence>::value applications of f. + Linear, exactly
applications of
result_of::size
<Sequence>::valuef
.- + Header
--#include <boost/fusion/algorithm/iteration/for_each.hpp> +#include <boost/fusion/algorithm/iteration/for_each.hpp> #include <boost/fusion/include/for_each.hpp>- + Example
--struct increment +struct increment { template<typename T> void operator()(T& t) const @@ -157,9 +153,9 @@ } }; ... -vector<int,int> vec(1,2); -for_each(vec, increment()); -assert(vec == make_vector(2,3)); +vector
<int,int> vec(1,2); +for_each
(vec, increment()); +assert(vec ==make_vector
(2,3));
- Sequence
+ |
@@ -94,7 +93,7 @@ | |
- State
+ |
@@ -104,21 +103,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
+ |
@@ -131,36 +130,34 @@ |
-result_of::accumulate<Sequence, State, F>::type +result_of::accumulate
<Sequence, State, F>::type- Return type: Any type + Return type: Any type
- Semantics: Returns the result of applying - accumulate to a sequence - of type Sequence, with - an initial state of type State - and binary function object or function pointer of type F. + Semantics: Returns the result of applying +
accumulate
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
--#include <boost/fusion/algorithm/iteration/accumulate.hpp> +#include <boost/fusion/algorithm/iteration/accumulate.hpp> #include <boost/fusion/include/accumulate.hpp>diff --git a/doc/html/fusion/algorithm/iteration/metafunctions/fold.html b/doc/html/fusion/algorithm/iteration/metafunctions/fold.html index 52f2f29f..ba334caf 100644 --- a/doc/html/fusion/algorithm/iteration/metafunctions/fold.html +++ b/doc/html/fusion/algorithm/iteration/metafunctions/fold.html @@ -3,7 +3,7 @@fold - + @@ -26,18 +26,17 @@- + Description
- Returns the result type of fold. + Returns the result type of
fold
.- + Synopsis
--template< +template< typename Sequence, typename State, typename F> @@ -47,7 +46,7 @@ };-Table 1.36. Parameters
+Table 1.36. Parameters
@@ -75,7 +74,7 @@ - Sequence +
Sequence
@@ -94,7 +93,7 @@ - State +
State
@@ -104,21 +103,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
@@ -131,36 +130,34 @@ - + Expression Semantics
--result_of::fold<Sequence, State, F>::type +result_of::fold
<Sequence, State, F>::type- Return type: Any type + Return type: Any type
- Semantics: Returns the result of applying - fold to a sequence of - 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
--#include <boost/fusion/algorithm/iteration/fold.hpp> +#include <boost/fusion/algorithm/iteration/fold.hpp> #include <boost/fusion/include/fold.hpp>diff --git a/doc/html/fusion/algorithm/iteration/metafunctions/for_each.html b/doc/html/fusion/algorithm/iteration/metafunctions/for_each.html index f20f2608..1f6aa5c3 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 - + @@ -26,19 +26,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
--template< +template< typename Sequence, typename F > @@ -48,7 +47,7 @@ };-Table 1.38. Parameters
+Table 1.38. Parameters
@@ -76,7 +75,7 @@ - Sequence +
Sequence
@@ -95,7 +94,7 @@ - F +
F
@@ -113,36 +112,34 @@ - + 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
--#include <boost/fusion/algorithm/iteration/for_each.hpp> +#include <boost/fusion/algorithm/iteration/for_each.hpp> #include <boost/fusion/include/for_each.hpp>diff --git a/doc/html/fusion/algorithm/query.html b/doc/html/fusion/algorithm/query.html index ce86f7dc..23c93c72 100644 --- a/doc/html/fusion/algorithm/query.html +++ b/doc/html/fusion/algorithm/query.html @@ -3,7 +3,7 @@Query - + @@ -33,11 +33,10 @@ The query algorithms provide support for searching and analyzing sequences.- + Header
--#include <boost/fusion/algorithm/query.hpp> +#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 95f520ea..07b2ccee 100644 --- a/doc/html/fusion/algorithm/query/functions.html +++ b/doc/html/fusion/algorithm/query/functions.html @@ -3,7 +3,7 @@Functions - + diff --git a/doc/html/fusion/algorithm/query/functions/all.html b/doc/html/fusion/algorithm/query/functions/all.html index f390c520..407765fa 100644 --- a/doc/html/fusion/algorithm/query/functions/all.html +++ b/doc/html/fusion/algorithm/query/functions/all.html @@ -3,7 +3,7 @@all - + @@ -26,30 +26,29 @@- + 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
--template< +template< 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 +76,16 @@ - seq +
seq
A model of Forward - Sequence, f(e) is a valid expression, convertible - to bool, for every - element e in seq + Sequence,
f(e)
is a valid expression, convertible + tobool
, for every + elemente
inseq
@@ -98,7 +97,7 @@ - f +
f
@@ -116,43 +115,40 @@ - + 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
--#include <boost/fusion/algorithm/query/all.hpp> +#include <boost/fusion/algorithm/query/all.hpp> #include <boost/fusion/include/all.hpp>- + Example
--struct odd +struct odd { template<typename T> bool operator()(T t) const @@ -161,8 +157,8 @@ } }; ... -assert(all(make_vector(1,3), odd())); -assert(!all(make_vector(1,2), odd())); +assert(all
(make_vector
(1,3), odd())); +assert(!all
(make_vector
(1,2), odd()));
- seq
+ |
A model of Forward
- Sequence, f(e) must be a valid expression, convertible
- to bool, for each
- element e in seq
+ Sequence, |
@@ -98,7 +97,7 @@ |
- f
+ |
@@ -116,43 +115,40 @@ |
-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 totrue
for some + elemente
inseq
.- + Complexity
- Linear. At most result_of::size<Sequence>::value comparisons. + Linear. At most
comparisons.
result_of::size
<Sequence>::value- + Header
--#include <boost/fusion/algorithm/query/any.hpp> +#include <boost/fusion/algorithm/query/any.hpp> #include <boost/fusion/include/any.hpp>- + Example
--struct odd +struct odd { template<typename T> bool operator()(T t) const @@ -161,8 +157,8 @@ } }; ... -assert(any(make_vector(1,2), odd())); -assert(!any(make_vector(2,4), odd())); +assert(any
(make_vector
(1,2), odd())); +assert(!any
(make_vector
(2,4), odd()));
- seq
+ |
A model of Forward
- Sequence, e == t
- must be a valid expression, convertible to bool,
- for each element e
- in seq
+ Sequence, |
@@ -95,7 +94,7 @@ |
- T
+ |
@@ -113,43 +112,40 @@ |
-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
inseq
.- + Complexity
- Linear. At most result_of::size<Sequence>::value comparisons. + Linear. At most
comparisons.
result_of::size
<Sequence>::value- + Header
--#include <boost/fusion/algorithm/query/count.hpp> +#include <boost/fusion/algorithm/query/count.hpp> #include <boost/fusion/include/count.hpp>- + Example
--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);
- seq
+ |
A model of Forward
- Sequence, f(e) is a valid expression, convertible
- to bool, for each
- element e in seq
+ Sequence, |
@@ -95,7 +94,7 @@ |
- f
+ |
@@ -113,42 +112,39 @@ |
-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
wheref
evaluates totrue
.- + Complexity
- Linear. At most result_of::size<Sequence>::value comparisons. + Linear. At most
comparisons.
result_of::size
<Sequence>::value- + Header
--#include <boost/fusion/algorithm/query/count_if.hpp> +#include <boost/fusion/algorithm/query/count_if.hpp> #include <boost/fusion/include/count_if.hpp>- + Example
--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);
- seq
+ |
@@ -97,7 +96,7 @@ |
- T
+ |
@@ -115,46 +114,43 @@ |
-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 typeT
, orif there is no such element. Equivalent + to
end
(seq)
find_if
<boost::is_same<_, T> >(seq)- + Complexity
- Linear. At most result_of::size<Sequence>::value comparisons. + Linear. At most
comparisons.
result_of::size
<Sequence>::value- + Header
--#include <boost/fusion/algorithm/query/find.hpp> +#include <boost/fusion/algorithm/query/find.hpp> #include <boost/fusion/include/find.hpp>- + Example
--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));
- seq
+ |
@@ -99,7 +98,7 @@ |
- F
+ |
@@ -118,42 +117,40 @@ |
-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 ExpressionF
+ evaluates toboost::mpl::true_
, orif there is no such element.
end
(seq)- + Complexity
- Linear. At most result_of::size<Sequence>::value comparisons. + Linear. At most
comparisons.
result_of::size
<Sequence>::value/algorithm/query/find_if.hpp>
- + Example
--const vector<double,int> vec(1.0,2); -assert(*find_if<is_integral<mpl::_> >(vec) == 2); -assert(find_if<is_class<mpl::_> >(vec) == end(vec)); +constvector
<double,int> vec(1.0,2); +assert(*find_if
<is_integral<mpl::_> >(vec) == 2); +assert(find_if
<is_class<mpl::_> >(vec) ==end
(vec));
- seq
+ |
A model of Forward
- Sequence, f(e) is a valid expression, convertible
- to bool, for every
- element e in seq
+ Sequence, |
@@ -98,7 +97,7 @@ |
- f
+ |
@@ -116,43 +115,40 @@ |
-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 tofalse
for every + elemente
inseq
. Result equivalent to!any(seq, f)
.- + Complexity
- Linear. At most result_of::size<Sequence>::value comparisons. + Linear. At most
comparisons.
result_of::size
<Sequence>::value- + Header
--#include <boost/fusion/algorithm/query/none.hpp> +#include <boost/fusion/algorithm/query/none.hpp> #include <boost/fusion/include/none.hpp>- + Example
--struct odd +struct odd { template<typename T> bool operator()(T t) const @@ -161,8 +157,8 @@ } }; ... -assert(none(make_vector(2,4), odd())); -assert(!none(make_vector(1,2), odd())); +assert(none
(make_vector
(2,4), odd())); +assert(!none
(make_vector
(1,2), odd()));
- Sequence
+ |
@@ -94,7 +93,7 @@ |
- F
+ |
@@ -114,38 +113,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 + Semantics: Returns the return type of +
all
+ given a sequence of typeSequence
and a unary Polymorphic - Function Object of type F. - The return type is always bool. + Function Object of typeF
. + The return type is alwaysbool
.- + Complexity
Constant.
- + Header
--#include <boost/fusion/algorithm/query/all.hpp> +#include <boost/fusion/algorithm/query/all.hpp> #include <boost/fusion/include/all.hpp>diff --git a/doc/html/fusion/algorithm/query/metafunctions/any.html b/doc/html/fusion/algorithm/query/metafunctions/any.html index 7f1f5dfb..9280553b 100644 --- a/doc/html/fusion/algorithm/query/metafunctions/any.html +++ b/doc/html/fusion/algorithm/query/metafunctions/any.html @@ -3,7 +3,7 @@any - + @@ -26,18 +26,17 @@- + Description
- A metafunction returning the result type of any. + A metafunction returning the result type of
any
.- + Synopsis
--template< +template< typename Sequence, typename F > @@ -47,7 +46,7 @@ };-Table 1.46. Parameters
+Table 1.46. Parameters
@@ -75,7 +74,7 @@ - Sequence +
Sequence
@@ -94,7 +93,7 @@ - F +
F
@@ -114,38 +113,36 @@ - + 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 + Semantics: Returns the return type of +
any
+ given a sequence of typeSequence
and a unary Polymorphic - Function Object of type F. - The return type is always bool. + Function Object of typeF
. + The return type is alwaysbool
.- + Complexity
Constant.
- + Header
--#include <boost/fusion/algorithm/query/any.hpp> +#include <boost/fusion/algorithm/query/any.hpp> #include <boost/fusion/include/any.hpp>diff --git a/doc/html/fusion/algorithm/query/metafunctions/count.html b/doc/html/fusion/algorithm/query/metafunctions/count.html index ba0a6c9d..316ff757 100644 --- a/doc/html/fusion/algorithm/query/metafunctions/count.html +++ b/doc/html/fusion/algorithm/query/metafunctions/count.html @@ -3,7 +3,7 @@count - + @@ -26,19 +26,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
--template< +template< typename Sequence, typename T > @@ -48,7 +47,7 @@ };-Table 1.51. Parameters
+Table 1.51. Parameters
@@ -76,7 +75,7 @@ - Sequence +
Sequence
@@ -95,7 +94,7 @@ - T +
T
@@ -113,34 +112,32 @@ - + 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
--#include <boost/fusion/algorithm/query/count.hpp> +#include <boost/fusion/algorithm/query/count.hpp> #include <boost/fusion/include/count.hpp>diff --git a/doc/html/fusion/algorithm/query/metafunctions/count_if.html b/doc/html/fusion/algorithm/query/metafunctions/count_if.html index ac63d902..383e8fd6 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 - + @@ -26,19 +26,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
--template< +template< typename Sequence, typename Pred > @@ -48,7 +47,7 @@ };-Table 1.52. Parameters
+Table 1.52. Parameters
@@ -76,7 +75,7 @@ - Sequence +
Sequence
@@ -95,7 +94,7 @@ - Pred +
Pred
@@ -113,34 +112,32 @@ - + 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
--#include <boost/fusion/algorithm/query/count_if.hpp> +#include <boost/fusion/algorithm/query/count_if.hpp> #include <boost/fusion/include/count_if.hpp>diff --git a/doc/html/fusion/algorithm/query/metafunctions/find.html b/doc/html/fusion/algorithm/query/metafunctions/find.html index 9292780b..58e1886d 100644 --- a/doc/html/fusion/algorithm/query/metafunctions/find.html +++ b/doc/html/fusion/algorithm/query/metafunctions/find.html @@ -3,7 +3,7 @@find - + @@ -26,19 +26,18 @@- + Description
- Returns the result type of find, + Returns the result type of
find
, given the sequence and search types.- + Synopsis
--template< +template< typename Sequence, typename T > @@ -48,7 +47,7 @@ };-Table 1.49. Parameters
+Table 1.49. Parameters
@@ -76,7 +75,7 @@ - Sequence +
Sequence
@@ -95,7 +94,7 @@ - T +
T
@@ -113,36 +112,34 @@ - + 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
--#include <boost/fusion/algorithm/query/find.hpp> +#include <boost/fusion/algorithm/query/find.hpp> #include <boost/fusion/include/find.hpp>diff --git a/doc/html/fusion/algorithm/query/metafunctions/find_if.html b/doc/html/fusion/algorithm/query/metafunctions/find_if.html index d5b827c6..cc252843 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 - + @@ -26,19 +26,18 @@- + Description
- Returns the result type of find_if + Returns the result type of
find_if
given the sequence and predicate types.- + Synopsis
--template< +template< typename Sequence, typename Pred > @@ -48,7 +47,7 @@ };-Table 1.50. Parameters
+Table 1.50. Parameters
@@ -76,7 +75,7 @@ - Sequence +
Sequence
@@ -95,7 +94,7 @@ - Pred +
Pred
@@ -114,36 +113,34 @@ - + 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
--#include <boost/fusion/algorithm/query/find_if.hpp> +#include <boost/fusion/algorithm/query/find_if.hpp> #include <boost/fusion/include/find_if.hpp>diff --git a/doc/html/fusion/algorithm/query/metafunctions/none.html b/doc/html/fusion/algorithm/query/metafunctions/none.html index e4550802..d308a34f 100644 --- a/doc/html/fusion/algorithm/query/metafunctions/none.html +++ b/doc/html/fusion/algorithm/query/metafunctions/none.html @@ -3,7 +3,7 @@none - + @@ -26,18 +26,17 @@- + Description
- A metafunction returning the result type of none. + A metafunction returning the result type of
none
.- + Synopsis
--template< +template< typename Sequence, typename F > @@ -47,7 +46,7 @@ };-Table 1.48. Parameters
+Table 1.48. Parameters
@@ -75,7 +74,7 @@ - Sequence +
Sequence
@@ -94,7 +93,7 @@ - F +
F
@@ -114,38 +113,36 @@ - + 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 + Semantics: Returns the return type of +
none
+ given a sequence of typeSequence
and a unary Polymorphic - Function Object of type F. - The return type is always bool. + Function Object of typeF
. + The return type is alwaysbool
.- + Complexity
Constant.
- + Header
--#include <boost/fusion/algorithm/query/none.hpp> +#include <boost/fusion/algorithm/query/none.hpp> #include <boost/fusion/include/none.hpp>diff --git a/doc/html/fusion/algorithm/transformation.html b/doc/html/fusion/algorithm/transformation.html index 7bc9e08f..a62cb896 100644 --- a/doc/html/fusion/algorithm/transformation.html +++ b/doc/html/fusion/algorithm/transformation.html @@ -3,7 +3,7 @@Transformation - + @@ -39,18 +39,17 @@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.
-#include <boost/fusion/algorithm/transformation.hpp> +#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 c6a3c502..2cab406b 100644 --- a/doc/html/fusion/algorithm/transformation/functions.html +++ b/doc/html/fusion/algorithm/transformation/functions.html @@ -3,7 +3,7 @@Functions - + diff --git a/doc/html/fusion/algorithm/transformation/functions/clear.html b/doc/html/fusion/algorithm/transformation/functions/clear.html index 756245e2..0b0afa90 100644 --- a/doc/html/fusion/algorithm/transformation/functions/clear.html +++ b/doc/html/fusion/algorithm/transformation/functions/clear.html @@ -3,7 +3,7 @@clear - + @@ -26,24 +26,23 @@- + Description
- clear returns an empty sequence. +
clear
returns an empty sequence.- + Synposis
--template< +template< typename Sequence > -typename result_of::clear<Sequence const>::type clear(Sequence const& seq); +typenameresult_of::clear
<Sequence const>::type clear(Sequence const& seq);- + Expression Semantics
--clear(seq); +clear
(seq);- Return type: A model of Return type: A model of Forward Sequence.
- Expression Semantics: Returns a sequence + Expression Semantics: Returns a sequence with no elements.
- + Complexity
Constant.
- + Header
--#include <boost/fusion/algorithm/transformation/clear.hpp> +#include <boost/fusion/algorithm/transformation/clear.hpp> #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
());
- seq
+ |
@@ -101,7 +100,7 @@ | |
- it1
+ |
@@ -113,14 +112,14 @@ |
- Iterator into seq
+ Iterator into |
- it2
+ |
@@ -132,8 +131,8 @@ |
- Iterator into seq
- after it1
+ Iterator into |
-erase(seq, pos); +erase
(seq, pos);- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, containing - all the elements of seq - except the element at pos. + Semantics: Returns a new sequence, containing + all the elements of
-seq
+ except the element atpos
.-erase(seq, first, last); +erase
(seq, first, last);- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, with - all the elements of seq, - in their original order, except those in the range [first,last). + Semantics: Returns a new sequence, with + all the elements of
seq
, + in their original order, except those in the range [first
,last
).- + Complexity
Constant. Returns a view which is lazily evaluated.
- + Header
--#include <boost/fusion/algorithm/transformation/erase.hpp> +#include <boost/fusion/algorithm/transformation/erase.hpp> #include <boost/fusion/include/erase.hpp>- + Example
--const vector<int, double, char> vec(1, 2.0, 'c'); -assert(erase(vec, next(begin(vec))) == make_vector(1, 'c')); -assert(erase(vec, next(begin(vec)), end(vec)) == make_vector(1)); +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));
- seq
+ |
@@ -97,7 +96,7 @@ |
- Key
+ |
@@ -115,44 +114,41 @@ |
-erase_key<Key>(seq); +erase_key
<Key>(seq);- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, containing - all the elements of seq, - except those with key Key. + Semantics: Returns a new sequence, containing + all the elements of
seq
, + except those with keyKey
.- + Complexity
Constant. Returns a view which is lazily evaluated.
- + Header
--#include <boost/fusion/algorithm/transformation/erase_key.hpp> +#include <boost/fusion/algorithm/transformation/erase_key.hpp> #include <boost/fusion/include/erase_key.hpp>- + Example
--assert(erase_key<int>(make_map<int, long>('a', 'b')) == make_map<long>('b')); +assert(erase_key
<int>(make_map
<int, long>('a', 'b')) ==make_map
<long>('b'));
- seq
+ |
@@ -92,7 +91,7 @@ |
- T
+ |
@@ -110,46 +109,43 @@ |
-filter<T>(seq); +filter
<T>(seq);- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a sequence containing - all the elements of seq - of type T. Equivalent - to filter_if<boost::same_type<_, T> >(seq). + Semantics: Returns a sequence containing + all the elements of
seq
+ of typeT
. Equivalent + to.
filter_if
<boost::same_type<_, T> >(seq)- + Complexity
Constant. Returns a view which is lazily evaluated.
- + Header
--#include <boost/fusion/algorithm/transformation/filter.hpp> +#include <boost/fusion/algorithm/transformation/filter.hpp> #include <boost/fusion/include/filter.hpp>- + Example
--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));
- seq
+ |
@@ -93,7 +92,7 @@ |
- Pred
+ |
@@ -112,47 +111,44 @@ |
-filter_if<Pred>(seq); +filter_if
<Pred>(seq);- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a sequence containing - all the elements of seq - with types for which Pred - evaluates to boost::mpl::true_. The order of the retained elements + Semantics: Returns a sequence containing + all the elements of
seq
+ with types for whichPred
+ evaluates toboost::mpl::true_
. The order of the retained elements is the same as in the original sequence.- + Complexity
Constant. Returns a view which is lazily evaluated.
- + Header
--#include <boost/fusion/algorithm/transformation/filter_if.hpp> +#include <boost/fusion/algorithm/transformation/filter_if.hpp> #include <boost/fusion/include/filter_if.hpp>- + Example
--const vector<int,int,double,double> vec(1,2,3.0,4.0); -assert(filter_if<is_integral<mpl::_> >(vec) == make_vector(1,2)); +constvector
<int,int,double,double> vec(1,2,3.0,4.0); +assert(filter_if
<is_integral<mpl::_> >(vec) ==make_vector
(1,2));
- seq
+ |
@@ -93,7 +92,7 @@ |
- pos
+ |
@@ -112,7 +111,7 @@ |
- t
+ |
@@ -130,47 +129,44 @@ |
-insert(seq, p, t); +insert
(seq, p, t);- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, containing - all the elements of seq, + Semantics: Returns a new sequence, containing + all the elements of
seq
, in their original order, and a new element with the type and value of - t inserted at iterator - pos. +t
inserted at iterator +pos
.- + Complexity
Constant. Returns a view which is lazily evaluated.
- + Header
--#include <boost/fusion/algorithm/transformation/insert.hpp> +#include <boost/fusion/algorithm/transformation/insert.hpp> #include <boost/fusion/include/insert.hpp>- + Example
--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));
- seq
+ |
@@ -94,7 +93,7 @@ |
- pos
+ |
@@ -113,7 +112,7 @@ |
- range
+ |
@@ -133,47 +132,44 @@ |
-insert(seq, pos, range); +insert
(seq, pos, range);- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, containing - all the elements of seq, - and the elements of range - inserted at iterator pos. + Semantics: Returns a new sequence, containing + all the elements of
seq
, + and the elements ofrange
+ inserted at iteratorpos
. All elements retaining their ordering from the orignal sequences.- + Complexity
Constant. Returns a view which is lazily evaluated.
- + Header
--#include <boost/fusion/algorithm/transformation/insert_range.hpp> +#include <boost/fusion/algorithm/transformation/insert_range.hpp> #include <boost/fusion/include/insert_range.hpp>- + Example
--const vector<int,int> vec(1,2); -assert(insert_range(vec, next(begin(vec)), make_vector(3,4)) == make_vector(1,3,4,2)); +constvector
<int,int> vec(1,2); +assert(insert_range
(vec,next
(begin
(vec)),make_vector
(3,4)) ==make_vector
(1,3,4,2));
- lhs
+ |
@@ -91,7 +90,7 @@ |
- rhs
+ |
@@ -111,47 +110,44 @@ |
-join(lhs, rhs); +join
(lhs, rhs);- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a sequence containing - all the elements of lhs - followed by all the elements of rhs. + Semantics: Returns a sequence containing + all the elements of
lhs
+ followed by all the elements ofrhs
. The order of th elements is preserved.- + Complexity
Constant. Returns a view which is lazily evaluated.
- + Header
--#include <boost/fusion/algorithm/transformation/join.hpp> +#include <boost/fusion/algorithm/transformation/join.hpp> #include <boost/fusion/include/join.hpp>- + Example
--vector<int,char> v1(1, 'a'); -vector<int,char> v2(2, 'b'); -assert(join(v1, v2) == make_vector(1,'a',2,'b')); +vector
<int,char> v1(1, 'a'); +vector
<int,char> v2(2, 'b'); +assert(join
(v1, v2) ==make_vector
(1,'a',2,'b'));
- seq
+ |
@@ -92,7 +91,7 @@ |
- t
+ |
@@ -110,45 +109,42 @@ |
-push_back(seq, t); +push_back
(seq, t);- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, containing - all the elements of seq, - and new element t appended - to the end. The elements are in the same order as they were in seq. + Semantics: Returns a new sequence, containing + all the elements of
seq
, + and new elementt
appended + to the end. The elements are in the same order as they were inseq
.- + Complexity
Constant. Returns a view which is lazily evaluated.
- + Header
--#include <boost/fusion/algorithm/transformation/push_back.hpp> +#include <boost/fusion/algorithm/transformation/push_back.hpp> #include <boost/fusion/include/push_back.hpp>- + Example
--assert(push_back(make_vector(1,2,3),4) == make_vector(1,2,3,4)); +assert(push_back
(make_vector
(1,2,3),4) ==make_vector
(1,2,3,4));
- seq
+ |
@@ -92,7 +91,7 @@ |
- t
+ |
@@ -110,46 +109,43 @@ |
-push_back(seq, t); +push_back
(seq, t);- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, containing - all the elements of seq, - and new element t appended + Semantics: Returns a new sequence, containing + all the elements of
seq
, + and new elementt
appended to the beginning. The elements are in the same order as they were in - seq. +seq
.- + Complexity
Constant. Returns a view which is lazily evaluated.
- + Header
--#include <boost/fusion/algorithm/transformation/push_front.hpp> +#include <boost/fusion/algorithm/transformation/push_front.hpp> #include <boost/fusion/include/push_front.hpp>- + Example
--assert(push_front(make_vector(1,2,3),0) == make_vector(0,1,2,3)); +assert(push_front
(make_vector
(1,2,3),0) ==make_vector
(0,1,2,3));
- seq
+ |
@@ -92,7 +91,7 @@ |
- T
+ |
@@ -110,46 +109,43 @@ |
-remove<T>(seq); +remove
<T>(seq);- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, containing - all the elements of seq, - in their original order, except those of type T. - Equivalent to 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 typeT
. + Equivalent to.
remove_if
<boost::is_same<_,T> >(seq)- + Complexity
Constant. Returns a view which is lazily evaluated.
- + Header
--#include <boost/fusion/algorithm/transformation/remove.hpp> +#include <boost/fusion/algorithm/transformation/remove.hpp> #include <boost/fusion/include/remove.hpp>- + Example
--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));
- seq
+ |
@@ -92,7 +91,7 @@ |
- Pred
+ |
@@ -111,47 +110,44 @@ |
-remove_if<Pred>(seq); +remove_if
<Pred>(seq);- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, containing - all the elements of seq, + Semantics: Returns a new sequence, containing + all the elements of
seq
, in their original order, except those elements with types for which - Pred evaluates to boost::mpl::true_. Equivalent to filter<boost::mpl::not_<Pred> - >(seq). +Pred
evaluates toboost::mpl::true_
. Equivalent to.
filter
<boost::mpl::not_<Pred> + >(seq)- + Complexity
Constant. Returns a view which is lazily evaluated.
- + Header
--#include <boost/fusion/algorithm/transformation/remove_if.hpp> +#include <boost/fusion/algorithm/transformation/remove_if.hpp> #include <boost/fusion/include/remove_if.hpp>- + Example
--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));
- seq
+ |
A model of Forward
- Sequence, e == old_value
- is a valid expression, convertible to bool,
- for each element e
- in seq with type
- convertible to T
+ Sequence, |
@@ -97,7 +96,7 @@ |
- old_value
+ |
@@ -114,7 +113,7 @@ | |
- new_value
+ |
@@ -132,45 +131,42 @@ |
-replace(seq, old_value, new_value); +replace
(seq, old_value, new_value);- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence with - all the values of seq - with new_value assigned - to elements with the same type and equal to old_value. + Semantics: Returns a new sequence with + all the values of
seq
+ withnew_value
assigned + to elements with the same type and equal toold_value
.- + Complexity
Constant. Returns a view which is lazily evaluated.
- + Header
--#include <boost/fusion/algorithm/transformation/replace.hpp> +#include <boost/fusion/algorithm/transformation/replace.hpp> #include <boost/fusion/include/replace.hpp>- + Example
--assert(replace(make_vector(1,2), 2, 3) == make_vector(1,3)); +assert(replace
(make_vector
(1,2), 2, 3) ==make_vector
(1,3));
- seq
+ |
@@ -94,14 +93,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 +112,7 @@ |
- new_value
+ |
@@ -131,46 +130,43 @@ |
-replace_if(seq, f, new_value); +replace_if
(seq, f, new_value);- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence with - all the elements of seq, - with new_value assigned - to each element for which f - evaluates to true. + Semantics: Returns a new sequence with + all the elements of
seq
, + withnew_value
assigned + to each element for whichf
+ evaluates totrue
.- + Complexity
Constant. Returns a view which is lazily evaluated.
- + Header
--#include <boost/fusion/algorithm/transformation/replace_if.hpp> +#include <boost/fusion/algorithm/transformation/replace_if.hpp> #include <boost/fusion/include/replace_if.hpp>- + Example
--struct odd +struct odd { template<typename T> bool operator()(T t) const @@ -179,7 +175,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));
- seq
+ |
@@ -97,15 +96,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.
+ |
@@ -118,39 +117,37 @@ |
-transform(seq, f); +transform
(seq, f);- Return type: A model of Return type: A model of Forward Sequence
- Semantics: Returns a new sequence, containing - the return values of f(e) for each element e - within seq. + Semantics: Returns a new sequence, containing + the return values of
f(e)
for each elemente
+ withinseq
.- + Binary version synopsis
--template< +template< typename Sequence1, 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.56. Parameters
+Table 1.56. Parameters
@@ -178,7 +175,7 @@ - seq1 +
seq1
@@ -197,7 +194,7 @@ - seq2 +
seq2
@@ -216,16 +213,16 @@ - 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
@@ -238,36 +235,34 @@ - Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, containing - the return values of f(e1, e2) for each pair of elements e1 and e2 - within seq1 and seq2 respectively. + Semantics: Returns a new sequence, containing + the return values of
f(e1, e2)
for each pair of elementse1
ande2
+ withinseq1
andseq2
respectively.- + Complexity
Constant. Returns a view which is lazily evaluated.
- + Header
--#include <boost/fusion/algorithm/transformation/transform.hpp> +#include <boost/fusion/algorithm/transformation/transform.hpp> #include <boost/fusion/include/transform.hpp>- + Example
--struct triple +struct triple { typedef int result_type; @@ -277,7 +272,7 @@ }; }; ... -assert(transform(make_vector(1,2,3), triple()) == make_vector(3,6,9)); +assert(transform
(make_vector
(1,2,3), triple()) ==make_vector
(3,6,9));
- seq1 to seqN
+ |
@@ -94,51 +93,48 @@ |
-zip(seq1, seq2, ... seqN); +zip
(seq1, seq2, ... seqN);- Return type: A model of 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
+ toseqN
. For example, + applying zip to tuples(1, 2, 3)
+ and('a', 'b', + 'c')
+ would return((1, 'a'),(2, 'b'),(3, + 'c'))
- + Complexity
Constant. Returns a view which is lazily evaluated.
- + Header
--#include <boost/fusion/algorithm/transformation/zip.hpp> +#include <boost/fusion/algorithm/transformation/zip.hpp> #include <boost/fusion/include/zip.hpp>- + Example
--vector<int,char> v1(1, 'a'); -vector<int,char> v2(2, 'b'); -assert(zip(v1, v2) == make_vector(make_vector(1, 2),make_vector('a', 'b')); +vector
<int,char> v1(1, 'a'); +vector
<int,char> v2(2, 'b'); +assert(zip
(v1, v2) ==make_vector
(make_vector
(1, 2),make_vector
('a', 'b'));
- Sequence
+ |
@@ -91,34 +90,32 @@ |
-result_of::clear<Sequence>::type +result_of::clear
<Sequence>::type- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns an empty sequence. + Semantics: Returns an empty sequence.
- + Complexity
Constant.
- + Header
--#include <boost/fusion/algorithm/transformation/clear.hpp> +#include <boost/fusion/algorithm/transformation/clear.hpp> #include <boost/fusion/include/clear.hpp>diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/erase.html b/doc/html/fusion/algorithm/transformation/metafunctions/erase.html index c32a4b43..774fe7d6 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/erase.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/erase.html @@ -3,7 +3,7 @@erase - + @@ -26,19 +26,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
--template< +template< typename Sequence, typename It1, typename It2 = unspecified> @@ -48,7 +47,7 @@ };-Table 1.83. Parameters
+Table 1.83. Parameters
@@ -76,7 +75,7 @@ - Sequence +
Sequence
@@ -95,7 +94,7 @@ - It1 +
It1
@@ -114,7 +113,7 @@ - It2 +
It2
@@ -134,48 +133,45 @@ - + Expression Semantics
--result_of::erase<Sequence, It1>::type +result_of::erase
<Sequence, It1>::type- Return type: A model of 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 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
--#include <boost/fusion/algorithm/transformation/erase.hpp> +#include <boost/fusion/algorithm/transformation/erase.hpp> #include <boost/fusion/include/erase.hpp>diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/erase_key.html b/doc/html/fusion/algorithm/transformation/metafunctions/erase_key.html index 85a718b6..6386ed58 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 - + @@ -26,19 +26,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
--template< +template< typename Sequence, typename Key > @@ -48,7 +47,7 @@ };-Table 1.84. Parameters
+Table 1.84. Parameters
@@ -76,7 +75,7 @@ - Sequence +
Sequence
@@ -95,7 +94,7 @@ - Key +
Key
@@ -113,36 +112,34 @@ - + Expression Semantics
--result_of::erase_key<Sequence, Key>::type +result_of::erase_key
<Sequence, Key>::type- Return type: A model of 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
--#include <boost/fusion/algorithm/transformation/erase_key.hpp> +#include <boost/fusion/algorithm/transformation/erase_key.hpp> #include <boost/fusion/include/erase_key.hpp>diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/filter.html b/doc/html/fusion/algorithm/transformation/metafunctions/filter.html index ba16d426..ee7d130f 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/filter.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/filter.html @@ -3,7 +3,7 @@filter - + @@ -26,19 +26,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
--template< +template< typename Sequence, typename T > @@ -48,7 +47,7 @@ };-Table 1.73. Parameter
+Table 1.73. Parameter
@@ -76,7 +75,7 @@ - Sequence +
Sequence
@@ -95,7 +94,7 @@ - T +
T
@@ -113,38 +112,36 @@ - + Expression Semantics
--result_of::filter<Sequence, T>::type +result_of::filter
<Sequence, T>::type- Return type: A model of 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
--#include <boost/fusion/algorithm/transformation/filter.hpp> +#include <boost/fusion/algorithm/transformation/filter.hpp> #include <boost/fusion/include/filter.hpp>diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/filter_if.html b/doc/html/fusion/algorithm/transformation/metafunctions/filter_if.html index 602f8fa4..b2da03be 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 - + @@ -26,20 +26,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
--template< +template< typename Sequence, typename Pred > @@ -49,7 +48,7 @@ };-Table 1.74. Parameter
+Table 1.74. Parameter
@@ -77,7 +76,7 @@ - Sequence +
Sequence
@@ -96,7 +95,7 @@ - Pred +
Pred
@@ -115,37 +114,35 @@ - + Expression Semantics
--result_of::filter_if<Sequence, Pred>::type +result_of::filter_if
<Sequence, Pred>::type- Return type: A model of 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
--#include <boost/fusion/algorithm/transformation/filter_if.hpp> +#include <boost/fusion/algorithm/transformation/filter_if.hpp> #include <boost/fusion/include/filter_if.hpp>diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/insert.html b/doc/html/fusion/algorithm/transformation/metafunctions/insert.html index 5bce505a..2c756830 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/insert.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/insert.html @@ -3,7 +3,7 @@insert - + @@ -26,19 +26,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
--template< +template< typename Sequence, typename Position, typename T @@ -49,7 +48,7 @@ };-Table 1.85. Parameters
+Table 1.85. Parameters
@@ -77,7 +76,7 @@ - Sequence +
Sequence
@@ -96,7 +95,7 @@ - Position +
Position
@@ -115,7 +114,7 @@ - T +
T
@@ -133,37 +132,35 @@ - + Expression Semantics
--result_of::insert<Sequence, Position, T>::type +result_of::insert
<Sequence, Position, T>::type- Return type: A model of 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
--#include <boost/fusion/algorithm/transformation/insert.hpp> +#include <boost/fusion/algorithm/transformation/insert.hpp> #include <boost/fusion/include/insert.hpp>diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/insert_range.html b/doc/html/fusion/algorithm/transformation/metafunctions/insert_range.html index 236e8355..d8119673 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 - + @@ -26,19 +26,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
--template< +template< typename Sequence, typename Position, typename Range @@ -49,7 +48,7 @@ };-Table 1.86. Parameters
+Table 1.86. Parameters
@@ -77,7 +76,7 @@ - Sequence +
Sequence
@@ -96,7 +95,7 @@ - Position +
Position
@@ -115,7 +114,7 @@ - Range +
Range
@@ -135,37 +134,35 @@ - + Expression Semantics
--result_of::insert_range<Sequence, Position, Range>::type +result_of::insert_range
<Sequence, Position, Range>::type- Return type: A model of 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
--#include <boost/fusion/algorithm/transformation/insert_range.hpp> +#include <boost/fusion/algorithm/transformation/insert_range.hpp> #include <boost/fusion/include/insert_range.hpp>diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/join.html b/doc/html/fusion/algorithm/transformation/metafunctions/join.html index 0c8f3fb3..3b63937f 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/join.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/join.html @@ -3,7 +3,7 @@join - + @@ -26,18 +26,17 @@- + Description
Returns the result of joining 2 sequences, given the sequence types.
- + Synopsis
--template< +template< typename LhSequence, typename RhSequence > @@ -47,37 +46,35 @@ };- + Expression Semantics
--result_of::join<LhSequence, RhSequence>::type +result_of::join
<LhSequence, RhSequence>::type- Return type: A model of 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
--#include <boost/fusion/algorithm/transformation/join.hpp> +#include <boost/fusion/algorithm/transformation/join.hpp> #include <boost/fusion/include/join.hpp>diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/pop_back.html b/doc/html/fusion/algorithm/transformation/metafunctions/pop_back.html index 48bc70d6..f8672d95 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 - + @@ -26,19 +26,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
--template< +template< typename Sequence > struct pop_back @@ -47,7 +46,7 @@ };-Table 1.87. Parameters
+Table 1.87. Parameters
@@ -74,7 +73,7 @@ - Sequence +
Sequence
@@ -93,36 +92,34 @@ - + Expression Semantics
--result_of::pop_back<Sequence>::type +result_of::pop_back
<Sequence>::type- Return type: A model of 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
--#include <boost/fusion/algorithm/tranformation/pop_back.hpp> +#include <boost/fusion/algorithm/tranformation/pop_back.hpp> #include <boost/fusion/include/pop_back.hpp>diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/pop_front.html b/doc/html/fusion/algorithm/transformation/metafunctions/pop_front.html index a6d0a6ce..1d06e361 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 - + @@ -26,19 +26,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
--template< +template< typename Sequence > struct pop_front @@ -47,7 +46,7 @@ };-Table 1.88. Parameters
+Table 1.88. Parameters
@@ -74,7 +73,7 @@ - Sequence +
Sequence
@@ -93,25 +92,24 @@ - + Expression Semantics
--result_of::pop_front<Sequence>::type +result_of::pop_front
<Sequence>::type- Return type: A model of 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 0f6c814d..0ff2fdd2 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 - + @@ -26,19 +26,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
--template< +template< typename Sequence, typename T > @@ -48,7 +47,7 @@ };-Table 1.89. Parameters
+Table 1.89. Parameters
@@ -76,7 +75,7 @@ - Sequence +
Sequence
@@ -95,7 +94,7 @@ - T +
T
@@ -113,26 +112,25 @@ - + Expression Semantics
--result_of::push_back<Sequence, T>::type +result_of::push_back
<Sequence, T>::type- Return type: A model of 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 1809423b..344426e0 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 - + @@ -26,19 +26,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
--template< +template< typename Sequence, typename T > @@ -48,7 +47,7 @@ };-Table 1.90. Parameters
+Table 1.90. Parameters
@@ -76,7 +75,7 @@ - Sequence +
Sequence
@@ -95,7 +94,7 @@ - T +
T
@@ -113,26 +112,25 @@ - + Expression Semantics
--result_of::push_front<Sequence, T>::type +result_of::push_front
<Sequence, T>::type- Return type: A model of 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 667c78ce..ffa4b3cf 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/remove.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/remove.html @@ -3,7 +3,7 @@
remove - + @@ -26,19 +26,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
--template< +template< typename Sequence, typename T > @@ -48,7 +47,7 @@ };-Table 1.79. Parameters
+Table 1.79. Parameters
@@ -76,7 +75,7 @@ - Sequence +
Sequence
@@ -95,7 +94,7 @@ - T +
T
@@ -113,38 +112,36 @@ - + Expression Semantics
--result_of::remove<Sequence, T>::type +result_of::remove
<Sequence, T>::type- Return type: A model of 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
--#include <boost/fusion/algorithm/transformation/remove.hpp> +#include <boost/fusion/algorithm/transformation/remove.hpp> #include <boost/fusion/include/remove.hpp>diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/remove_if.html b/doc/html/fusion/algorithm/transformation/metafunctions/remove_if.html index d5959258..0b64c657 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 - + @@ -26,20 +26,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
--template< +template< typename Sequence, typename Pred > @@ -49,7 +48,7 @@ };-Table 1.80. Parameters
+Table 1.80. Parameters
@@ -77,7 +76,7 @@ - Sequence +
Sequence
@@ -96,7 +95,7 @@ @@ -115,37 +114,35 @@ - Pred +
Pred
@@ -107,7 +106,7 @@ - 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 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
--#include <boost/fusion/algorithm/transformation/remove_if.hpp> +#include <boost/fusion/algorithm/transformation/remove_if.hpp> #include <boost/fusion/include/remove_if.hpp>diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/replace.html b/doc/html/fusion/algorithm/transformation/metafunctions/replace.html index e30d64c8..40a33690 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/replace.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/replace.html @@ -3,7 +3,7 @@replace - + @@ -26,19 +26,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
--template< +template< typename Sequence, typename T > @@ -48,7 +47,7 @@ };-Table 1.77. Parameters
+Table 1.77. Parameters
@@ -76,7 +75,7 @@ - Sequence +
Sequence
@@ -95,7 +94,7 @@ - T +
T
@@ -113,35 +112,33 @@ - + Expression Semantics
--result_of::replace<Sequence,T>::type +result_of::replace
<Sequence,T>::type- Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns the return type of - replace. + Semantics: Returns the return type of +
replace
.- + Complexity
Constant.
- + Header
--#include <boost/fusion/algorithm/transformation/replace.hpp> +#include <boost/fusion/algorithm/transformation/replace.hpp> #include <boost/fusion/include/replace.hpp>diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/replace_if.html b/doc/html/fusion/algorithm/transformation/metafunctions/replace_if.html index 5f1d7401..fb2b2d5d 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 - + @@ -26,21 +26,20 @@- + Description
- Returns the result type of replace_if, given the types + Returns the result type of
replace_if
, given the types of the sequence, Polymorphic Function Object predicate and replacement object.- + Synopsis
--template< +template< typename Sequence, typename F, typename T> @@ -50,7 +49,7 @@ };-Table 1.78. Parameters
+Table 1.78. Parameters
@@ -78,7 +77,7 @@ - Sequence +
Sequence
@@ -97,7 +96,7 @@ - F +
F
@@ -116,7 +115,7 @@ - T +
T
@@ -134,35 +133,33 @@ - + Expression Semantics
--result_of::replace_if<Sequence,F,T>::type +result_of::replace_if
<Sequence,F,T>::type- Return type: A model of 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
--#include <boost/fusion/algorithm/transformation/replace_if.hpp> +#include <boost/fusion/algorithm/transformation/replace_if.hpp> #include <boost/fusion/include/replace_if.hpp>diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/reverse.html b/doc/html/fusion/algorithm/transformation/metafunctions/reverse.html index 6937de0e..c911b4a1 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/reverse.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/reverse.html @@ -3,7 +3,7 @@reverse - + @@ -26,19 +26,18 @@- + Description
- Returns the result type of reverse, given the input sequence + Returns the result type of
reverse
, given the input sequence type.- + Synopsis
--template< +template< typename Sequence > struct reverse @@ -47,7 +46,7 @@ };-Table 1.81. Parameters
+Table 1.81. Parameters
@@ -74,7 +73,7 @@ - Sequence +
Sequence
@@ -93,35 +92,33 @@ - + Expression Semantics
--result_of::reverse<Sequence>::type +result_of::reverse
<Sequence>::type- Return type: A model of 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
--#include <boost/fusion/algorithm/transformation/reverse.hpp> +#include <boost/fusion/algorithm/transformation/reverse.hpp> #include <boost/fusion/include/reverse.hpp>diff --git a/doc/html/fusion/algorithm/transformation/metafunctions/transform.html b/doc/html/fusion/algorithm/transformation/metafunctions/transform.html index 04477d12..b3021959 100644 --- a/doc/html/fusion/algorithm/transformation/metafunctions/transform.html +++ b/doc/html/fusion/algorithm/transformation/metafunctions/transform.html @@ -3,7 +3,7 @@transform - + @@ -26,31 +26,30 @@- + 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
--template< +template< 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,7 +77,7 @@ - seq +
seq
@@ -97,15 +96,15 @@ - 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
.@@ -118,39 +117,37 @@ - + Expression Semantics
--transform(seq, f); +transform
(seq, f);- Return type: A model of Return type: A model of Forward Sequence
- Semantics: Returns a new sequence, containing - the return values of f(e) for each element e - within seq. + Semantics: Returns a new sequence, containing + the return values of
f(e)
for each elemente
+ withinseq
.- + Binary version synopsis
--template< +template< typename Sequence1, 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,7 +175,7 @@ - seq1 +
seq1
@@ -197,7 +194,7 @@ - seq2 +
seq2
@@ -216,16 +213,16 @@ - 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
@@ -238,36 +235,34 @@ - Return type: A model of Return type: A model of Forward Sequence.
- Semantics: Returns a new sequence, containing - the return values of f(e1, e2) for each pair of elements e1 and e2 - within seq1 and seq2 respectively. + Semantics: Returns a new sequence, containing + the return values of
f(e1, e2)
for each pair of elementse1
ande2
+ withinseq1
andseq2
respectively.- + Complexity
Constant. Returns a view which is lazily evaluated.
- + Header
--#include <boost/fusion/algorithm/transformation/transform.hpp> +#include <boost/fusion/algorithm/transformation/transform.hpp> #include <boost/fusion/include/transform.hpp>- + Example
--struct triple +struct triple { typedef int result_type; @@ -277,7 +272,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));
- Car
+ |
@@ -104,7 +102,7 @@ | |
- Cdr
+ |
@@ -114,14 +112,14 @@ |
- nil
+ |
@@ -193,7 +191,7 @@
- nil()
+ nil()
- C()
+ C()
- C(car)
+ C(car)
- 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 and cdr
tail.
- C(s)
+ C(s)
Copy constructs a cons from a Forward
- Sequence, s.
+ Sequence, s
.
- l =
- s
+ l =
+ s
- Assigns to a cons, l,
+ Assigns to a cons, l
,
from a Forward
- Sequence, s.
+ Sequence, s
.
- The Nth element from the beginning of the sequence; see at.
+ The Nth element from the beginning of the sequence; see at
.
-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; +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;
- seq
+ |
@@ -91,34 +90,31 @@ |
-as_list(seq); +as_list(seq);- Return type: result_of::as_list<Sequence>::type + Return type:
result_of::as_list
<Sequence>::type
- Semantics: Convert a fusion sequence, - seq, to a list. + Semantics: Convert a fusion sequence, +
seq
, to alist
.- + Header
--#include <boost/fusion/container/list/convert.hpp> +#include <boost/fusion/container/list/convert.hpp> #include <boost/fusion/include/as_list.hpp>- + Example
--as_list(make_vector('x', 123, "hello")) +as_list(make_vector
('x', 123, "hello"))
- seq
+ |
@@ -91,41 +90,38 @@ |
-as_map(seq); +as_map(seq);- Return type: result_of::as_map<Sequence>::type + Return type:
result_of::as_map
<Sequence>::type
- Semantics: Convert a fusion sequence, - seq, to a map. + Semantics: Convert a fusion sequence, +
seq
, to amap
.- Precondition: The elements of the sequence + Precondition: The elements of the sequence are assumed to be __fusionpair_s. - There may be no duplicate fusion::pair key types. + There may be no duplicate
fusion::pair
key types.- + Header
--#include <boost/fusion/container/map/convert.hpp> +#include <boost/fusion/container/map/convert.hpp> #include <boost/fusion/include/as_map.hpp>- + Example
--as_map(make_vector( - make_pair<int>('X') - , make_pair<double>("Men"))) +as_map(make_vector
( +make_pair
<int>('X') + ,make_pair
<double>("Men")))
- seq
+ |
@@ -91,38 +90,35 @@ |
-as_set(seq); +as_set(seq);- Return type: result_of::as_set<Sequence>::type + Return type:
result_of::as_set
<Sequence>::type
- Semantics: Convert a fusion sequence, - seq, to a set. + Semantics: Convert a fusion sequence, +
seq
, to aset
.- Precondition: There may be no duplicate + Precondition: There may be no duplicate key types.
- + Header
--#include <boost/fusion/container/set/convert.hpp> +#include <boost/fusion/container/set/convert.hpp> #include <boost/fusion/include/as_set.hpp>- + Example
--as_set(make_vector('x', 123, "hello")) +as_set(make_vector
('x', 123, "hello"))
- seq
+ |
@@ -91,34 +90,31 @@ |
-as_vector(seq); +as_vector(seq);- Return type: result_of::as_vector<Sequence>::type + Return type:
result_of::as_vector
<Sequence>::type
- Semantics: Convert a fusion sequence, - seq, to a vector. + Semantics: Convert a fusion sequence, +
seq
, to avector
.- + Header
--#include <boost/fusion/container/vector/convert.hpp> +#include <boost/fusion/container/vector/convert.hpp> #include <boost/fusion/include/as_vector.hpp>- + Example
--as_vector(make_list('x', 123, "hello")) +as_vector(make_list
('x', 123, "hello"))
- Sequence
+ |
@@ -86,35 +85,32 @@ |
-result_of::as_list<Sequence>::type; +result_of::as_list<Sequence>::type;- Return type: A list with same elements as the - input sequence, Sequence. + Return type: A
list
with same elements as the + input sequence,Sequence
.- Semantics: Convert a fusion sequence, - Sequence, to a list. + Semantics: Convert a fusion sequence, +
Sequence
, to alist
.- + Header
--#include <boost/fusion/container/list/convert.hpp> +#include <boost/fusion/container/list/convert.hpp> #include <boost/fusion/include/as_list.hpp>- + Example
--result_of::as_list<vector<char, int> >::type +result_of::as_list<vector
<char, int> >::type
- Sequence
+ |
@@ -86,42 +85,39 @@ |
-result_of::as_map<Sequence>::type; +result_of::as_map<Sequence>::type;- Return type: A map with same elements as the - input sequence, Sequence. + Return type: A
map
with same elements as the + input sequence,Sequence
.- Semantics: Convert a fusion sequence, - Sequence, to a map. + Semantics: Convert a fusion sequence, +
Sequence
, to amap
.- Precondition: The elements of the sequence + Precondition: The elements of the sequence are assumed to be __fusionpair_s. - There may be no duplicate fusion::pair key types. + There may be no duplicate
fusion::pair
key types.- + Header
--#include <boost/fusion/container/map/convert.hpp> +#include <boost/fusion/container/map/convert.hpp> #include <boost/fusion/include/as_map.hpp>- + Example
--result_of::as_map<vector< - fusion::pair<int, char> - , fusion::pair<double, std::string> > >::type +result_of::as_map<vector
< +fusion::pair
<int, char> + ,fusion::pair
<double, std::string> > >::type
- Sequence
+ |
@@ -86,39 +85,36 @@ |
-result_of::as_set<Sequence>::type; +result_of::as_set<Sequence>::type;- Return type: A set with same elements as the - input sequence, Sequence. + Return type: A
set
with same elements as the + input sequence,Sequence
.- Semantics: Convert a fusion sequence, - Sequence, to a set. + Semantics: Convert a fusion sequence, +
Sequence
, to aset
.- Precondition: There may be no duplicate + Precondition: There may be no duplicate key types.
- + Header
--#include <boost/fusion/container/set/convert.hpp> +#include <boost/fusion/container/set/convert.hpp> #include <boost/fusion/include/as_set.hpp>- + Example
--result_of::as_set<vector<char, int> >::type +result_of::as_set<vector
<char, int> >::type
- Sequence
+ |
@@ -86,35 +85,32 @@ |
-result_of::as_vector<Sequence>::type; +result_of::as_vector<Sequence>::type;- Return type: A vector with same elements as - the input sequence, Sequence. + Return type: A
vector
with same elements as + the input sequence,Sequence
.- Semantics: Convert a fusion sequence, - Sequence, to a vector. + Semantics: Convert a fusion sequence, +
Sequence
, to avector
.- + Header
--#include <boost/fusion/container/vector/convert.hpp> +#include <boost/fusion/container/vector/convert.hpp> #include <boost/fusion/include/as_vector.hpp>- + Example
--result_of::as_vector<list<char, int> >::type +result_of::as_vector<list
<char, int> >::type
- x0,
+ |
- Instances of T0, T1,... TN
+ Instances of |
- The arguments to list_tie
+ The arguments to |
-list_tie(x0, x1,... xN); +list_tie(x0, x1,... xN);- Return type: list<T0&, T1&,... + Return type:
list
<T0&, T1&,... TN&>- Semantics: Create a list of references from x0, x1,... xN. + Semantics: Create a
list
of references fromx0, x1,... xN
.- + Header
--#include <boost/fusion/container/generation/list_tie.hpp> +#include <boost/fusion/container/generation/list_tie.hpp> #include <boost/fusion/include/list_tie.hpp>- + Example
--int i = 123; +int i = 123; double d = 123.456; list_tie(i, d)diff --git a/doc/html/fusion/container/generation/functions/make_cons.html b/doc/html/fusion/container/generation/functions/make_cons.html index 2462133c..29b6dc93 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 - + @@ -26,29 +26,28 @@- + 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 +template <typename Car> +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 +77,12 @@
- car +
car
- Instance of Car + Instance of
Car
@@ -95,12 +94,12 @@ - cdr +
cdr
- Instance of Cdr + Instance of
Cdr
@@ -112,43 +111,40 @@ - + Expression Semantics
--make_cons(car, cdr); +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
orresult_of::make_cons
<Car>::type
- Semantics: Create a cons from car - (head) and optional cdr + Semantics: Create a
cons
fromcar
+ (head) and optionalcdr
(tail).- + Header
--#include <boost/fusion/container/generation/make_cons.hpp> +#include <boost/fusion/container/generation/make_cons.hpp> #include <boost/fusion/include/make_cons.hpp>- + Example
--make_cons('x', make_cons(123)) +make_cons('x', make_cons(123))- + See also
- boost::ref +
boost::ref
- x0,
+ |
- Instances of T0, T1,... TN
+ Instances of |
- The arguments to make_list
+ The arguments to |
-make_list(x0, x1,... xN); +make_list(x0, x1,... xN);- Return type: result_of::make_list<T0, T1,... TN>::type + Return type:
result_of::make_list
<T0, T1,... TN>::type
- Semantics: Create a list from x0, x1,... xN. + Semantics: Create a
list
fromx0, x1,... xN
.- + Header
--#include <boost/fusion/container/generation/make_list.hpp> +#include <boost/fusion/container/generation/make_list.hpp> #include <boost/fusion/include/make_list.hpp>- + Example
--make_list(123, "hello", 12.5) +make_list(123, "hello", 12.5)- + See also
- boost::ref +
boost::ref
- K0,
+ |
@@ -99,83 +97,80 @@ |
- 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 |
-make_map<K0, K1,... KN>(x0, x1,... xN); +make_map<K0, K1,... KN>(x0, x1,... xN);- Return type: result_of::make_map<K0, K0,... KN, T0, T1,... TN>::type + Return type:
result_of::make_map
<K0, K0,... KN, T0, T1,... TN>::type
- Semantics: Create a map from K0, K1,... KN - keys and x0, + Semantics: Create a
map
fromK0, K1,... KN
+ keys andx0, x1,... - xN
data. + xN data.- Precondition: There may be no duplicate + Precondition: There may be no duplicate key types.
- + Header
--#include <boost/fusion/container/generation/make_map.hpp> +#include <boost/fusion/container/generation/make_map.hpp> #include <boost/fusion/include/make_map.hpp>- + Example
--make_map( - make_pair<int>('X') - , make_pair<double>("Men")) +make_map( +make_pair
<int>('X') + ,make_pair
<double>("Men"))- + See also
- boost::ref, - fusion::pair +
boost::ref
, +fusion::pair
diff --git a/doc/html/fusion/container/generation/functions/make_set.html b/doc/html/fusion/container/generation/functions/make_set.html index 833359b4..4c1b2a78 100644 --- a/doc/html/fusion/container/generation/functions/make_set.html +++ b/doc/html/fusion/container/generation/functions/make_set.html @@ -3,7 +3,7 @@
-make_set - + @@ -26,36 +26,34 @@- + Description
- Create a set + Create a
set
from one or more values.- + Synopsis
--template <typename T0, typename T1,... typename TN> -typename result_of::make_set<T0, T1,... TN>::type +template <typename T0, typename T1,... typename TN> +typenameresult_of::make_set
<T0, T1,... TN>::type make_set(T0 const& x0, T1 const& x1... TN const& xN);- The variadic function accepts 0 - to FUSION_MAX_VECTOR_SIZE - [9] - elements, where FUSION_MAX_VECTOR_SIZE - is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant - FUSION_MAX_VECTOR_SIZE + The variadic function accepts
-0
+ toFUSION_MAX_VECTOR_SIZE
+ [9] + 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 +#define FUSION_MAX_VECTOR_SIZE 20- + Parameters
@@ -84,69 +82,66 @@
- x0, +
x0, x1,... - xN
+ xN- Instances of T0, T1,... TN + Instances of
T0, T1,... TN
- The arguments to make_set + The arguments to
make_set
- + Expression Semantics
--make_set(x0, x1,... xN); +make_set(x0, x1,... xN);- Return type: result_of::make_set<T0, T1,... TN>::type + Return type:
result_of::make_set
<T0, T1,... TN>::type
- Semantics: Create a set from x0, x1,... xN. + Semantics: Create a
set
fromx0, x1,... xN
.- Precondition: There may be no duplicate + Precondition: There may be no duplicate key types.
- + Header
--#include <boost/fusion/container/generation/make_set.hpp> +#include <boost/fusion/container/generation/make_set.hpp> #include <boost/fusion/include/make_set.hpp>- + Example
--make_set(123, "hello", 12.5) +make_set(123, "hello", 12.5)- + See also
- boost::ref +
boost::ref
diff --git a/doc/html/fusion/container/generation/functions/make_vector.html b/doc/html/fusion/container/generation/functions/make_vector.html index c51e7fa5..c2eccd79 100644 --- a/doc/html/fusion/container/generation/functions/make_vector.html +++ b/doc/html/fusion/container/generation/functions/make_vector.html @@ -3,7 +3,7 @@
-make_vector - + @@ -26,35 +26,33 @@- + Description
- Create a vector + Create a
vector
from one or more values.- + Synopsis
--template <typename T0, typename T1,... typename TN> -typename result_of::make_vector<T0, T1,... TN>::type +template <typename T0, typename T1,... typename TN> +typenameresult_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
+ 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 +#define FUSION_MAX_VECTOR_SIZE 20- + Parameters
@@ -83,59 +81,56 @@
- x0, +
x0, x1,... - xN
+ xN- Instances of T0, T1,... TN + Instances of
T0, T1,... TN
- The arguments to make_vector + The arguments to
make_vector
- + Expression Semantics
--make_vector(x0, x1,... xN); +make_vector(x0, x1,... xN);- Return type: result_of::make_vector<T0, T1,... TN>::type + Return type:
result_of::make_vector
<T0, T1,... TN>::type
- Semantics: Create a vector from x0, x1,... xN. + Semantics: Create a
vector
fromx0, x1,... xN
.- + Header
--#include <boost/fusion/container/generation/make_vector.hpp> +#include <boost/fusion/container/generation/make_vector.hpp> #include <boost/fusion/include/make_vector.hpp>- + Example
--make_vector(123, "hello", 12.5) +make_vector(123, "hello", 12.5)- + See also
- boost::ref +
boost::ref
- K0,
+ |
@@ -95,7 +93,7 @@ |
- The key types associated with each of the x1,x2,...,xN
+ The key types associated with each of the |
@@ -103,54 +101,51 @@
- x0,
+ |
- Instances of T0, T1,... TN
+ Instances of |
- The arguments to map_tie
+ The arguments to |
-map_tie<K0, K1,... KN>(x0, x1,... xN); +map_tie<K0, K1,... KN>(x0, x1,... xN);- Return type: map<pair<K0, D0&>, pair<K1, - D1&>,... pair<KN, + Return type:
map
<pair
<K0, D0&>,pair
<K1, + D1&>,...pair
<KN, DN&> >- Semantics: Create a map of references from x0, x1,... xN with keys K0, K1,... KN + Semantics: Create a
map
of references fromx0, x1,... xN
with keysK0, K1,... KN
- + Header
--#include <boost/fusion/container/generation/map_tie.hpp> +#include <boost/fusion/container/generation/map_tie.hpp> #include <boost/fusion/include/map_tie.hpp>- + Example
--struct int_key; +struct int_key; struct double_key; ... int i = 123; diff --git a/doc/html/fusion/container/generation/functions/tiers.html b/doc/html/fusion/container/generation/functions/tiers.html index 548bb727..e73ecdc4 100644 --- a/doc/html/fusion/container/generation/functions/tiers.html +++ b/doc/html/fusion/container/generation/functions/tiers.html @@ -3,7 +3,7 @@Tiers - + @@ -32,33 +32,31 @@ flavors.Example:
--int i; char c; double d; +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)) - [11] + 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)) + [11] .A tie can be used to 'unpack' another tuple into variables. E.g.:
--int i; char c; double d; -vector_tie(i, c, d) = make_vector(1,'a', 5.5); +int i; char c; double d; +vector_tie
(i, c, d) =make_vector
(1,'a', 5.5); std::cout << i << " " << c << " " << d;@@ -67,7 +65,7 @@ when calling functions which return sequences.
- + Ignore
@@ -76,15 +74,14 @@ may return a sequence, only part of which you are interested in. For example:
--char c; -vector_tie(ignore, c) = make_vector(1, 'a'); +char c; +diff --git a/doc/html/fusion/container/generation/functions/vector_tie.html b/doc/html/fusion/container/generation/functions/vector_tie.html index 0bd4d472..767dac61 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 - + @@ -26,34 +26,32 @@- + 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&> +template <typename T0, typename T1,... typename 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 +#define FUSION_MAX_VECTOR_SIZE 20- + Parameters
@@ -82,52 +80,49 @@
- 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
--vector_tie(x0, x1,... xN); +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 fromx0, x1,... xN
.- + Header
--#include <boost/fusion/container/generation/vector_tie.hpp> +#include <boost/fusion/container/generation/vector_tie.hpp> #include <boost/fusion/include/vector_tie.hpp>- + Example
--int i = 123; +int i = 123; double d = 123.456; vector_tie(i, d)diff --git a/doc/html/fusion/container/generation/metafunctions.html b/doc/html/fusion/container/generation/metafunctions.html index 0d62c1f0..a73c65e1 100644 --- a/doc/html/fusion/container/generation/metafunctions.html +++ b/doc/html/fusion/container/generation/metafunctions.html @@ -3,7 +3,7 @@MetaFunctions - + diff --git a/doc/html/fusion/container/generation/metafunctions/list_tie.html b/doc/html/fusion/container/generation/metafunctions/list_tie.html index 9ee4acfc..b3dfa90a 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 - + @@ -26,33 +26,31 @@- + Description
- Returns the result type of list_tie. + Returns the result type of
list_tie
.- + Synopsis
--template <typename T0, typename T1,... typename TN> +template <typename T0, typename T1,... typename TN> struct list_tie;- The variadic function accepts 0 - to FUSION_MAX_LIST_SIZE - elements, where FUSION_MAX_LIST_SIZE - is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant - FUSION_MAX_LIST_SIZE + The variadic function accepts
-0
+ 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 +#define FUSION_MAX_LIST_SIZE 20- + Parameters
@@ -81,9 +79,9 @@
- T0, +
T0, T1,... - TN
+ TN@@ -93,40 +91,37 @@ - The arguments to list_tie + The arguments to
list_tie
- + Expression Semantics
--result_of::list_tie<T0, T1,... TN>::type; +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 fromT0, T1,... TN
.- + Header
--#include <boost/fusion/container/generation/list_tie.hpp> +#include <boost/fusion/container/generation/list_tie.hpp> #include <boost/fusion/include/list_tie.hpp>- + Example
--result_of::list_tie<int, double>::type +result_of::list_tie<int, double>::type
- Car
+ |
@@ -88,12 +87,12 @@ | |
- Cdr
+ |
- A cons
+ A |
@@ -105,37 +104,34 @@ |
-result_of::make_cons<Car, Cdr>::type +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
fromCar
+ (head) and optionalCdr
(tail).- + Header
--#include <boost/fusion/container/generation/make_cons.hpp> +#include <boost/fusion/container/generation/make_cons.hpp> #include <boost/fusion/include/make_cons.hpp>- + Example
--result_of::make_cons<char, result_of::make_cons<int>::type>::type +result_of::make_cons<char, result_of::make_cons<int>::type>::type
- T0,
+ |
@@ -93,41 +91,38 @@ |
- Template arguments to make_list
+ Template arguments to |
-result_of::make_list<T0, T1,... TN>::type +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
fromT0, T1,... TN
.- + Header
--#include <boost/fusion/container/generation/make_list.hpp> +#include <boost/fusion/container/generation/make_list.hpp> #include <boost/fusion/include/make_list.hpp>- + Example
--result_of::make_list<int, const char(&)[7], double>::type +result_of::make_list<int, const char(&)[7], double>::type
- K0,
+ |
@@ -97,16 +95,16 @@ |
- Keys associated with T0, T1,... TN
+ Keys associated with |
- T0,
+ |
@@ -116,60 +114,57 @@ |
- Data associated with keys K0, K1,... KN
+ Data associated with keys |
-resulf_of::make_map<K0, K1,... KN, T0, T1,... TN>::type; +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
withfusion::pair
elements where thesecond_type
is converted following the rules for element conversion.- Precondition: There may be no duplicate + Precondition: There may be no duplicate key types.
- + Header
--#include <boost/fusion/container/generation/make_map.hpp> +#include <boost/fusion/container/generation/make_map.hpp> #include <boost/fusion/include/make_map.hpp>- + Example
--result_of::make_map<int, double, char, double>::type +result_of::make_map<int, double, char, double>::type- + See also
diff --git a/doc/html/fusion/container/generation/metafunctions/make_set.html b/doc/html/fusion/container/generation/metafunctions/make_set.html index 85ffe4e6..faba3830 100644 --- a/doc/html/fusion/container/generation/metafunctions/make_set.html +++ b/doc/html/fusion/container/generation/metafunctions/make_set.html @@ -3,7 +3,7 @@
-make_set - + @@ -26,34 +26,32 @@- + Description
- Returns the result type of make_set. + Returns the result type of
make_set
.- + Synopsis
--template <typename T0, typename T1,... typename TN> +template <typename T0, typename T1,... typename TN> struct make_set;- The variadic function accepts 0 - to FUSION_MAX_VECTOR_SIZE - [12] - elements, where FUSION_MAX_VECTOR_SIZE - is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant - FUSION_MAX_VECTOR_SIZE + The variadic function accepts
-0
+ 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 +#define FUSION_MAX_VECTOR_SIZE 20- + Parameters
@@ -82,9 +80,9 @@
- T0, +
T0, T1,... - TN
+ TN@@ -94,51 +92,48 @@ - The arguments to make_set + The arguments to
make_set
- + Expression Semantics
--result_of::make_set<T0, T1,... TN>::type +result_of::make_set<T0, T1,... TN>::type- Return type: A set with elements of types converted + Return type: A
set
with elements of types converted following the rules for element conversion.- Semantics: Create a set from T0, T1,... TN. + Semantics: Create a
set
fromT0, T1,... TN
.- Precondition: There may be no duplicate + Precondition: There may be no duplicate key types.
- + Header
--#include <boost/fusion/container/generation/make_set.hpp> +#include <boost/fusion/container/generation/make_set.hpp> #include <boost/fusion/include/make_set.hpp>- + Example
--result_of::make_set<int, char, double>::type +result_of::make_set<int, char, double>::typediff --git a/doc/html/fusion/container/generation/metafunctions/make_vector.html b/doc/html/fusion/container/generation/metafunctions/make_vector.html index a03c568b..de08c769 100644 --- a/doc/html/fusion/container/generation/metafunctions/make_vector.html +++ b/doc/html/fusion/container/generation/metafunctions/make_vector.html @@ -3,7 +3,7 @@
-make_vector - + @@ -26,33 +26,31 @@- + Description
- Returns the result type of make_vector. + Returns the result type of
make_vector
.- + Synopsis
--template <typename T0, typename T1,... typename TN> +template <typename T0, typename T1,... typename TN> struct make_vector;- The variadic function accepts 0 - to FUSION_MAX_VECTOR_SIZE - elements, where FUSION_MAX_VECTOR_SIZE - is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant - FUSION_MAX_VECTOR_SIZE + The variadic function accepts
-0
+ 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 +#define FUSION_MAX_VECTOR_SIZE 20- + Parameters
@@ -81,9 +79,9 @@
- T0, +
T0, T1,... - TN
+ TN@@ -93,41 +91,38 @@ - Template arguments to make_vector + Template arguments to
make_vector
- + Expression Semantics
--result_of::make_vector<T0, T1,... TN>::type +result_of::make_vector<T0, T1,... TN>::type- Return type: A vector with elements of types + Return type: A
vector
with elements of types converted following the rules for element conversion.- Semantics: Create a vector from T0, T1,... TN. + Semantics: Create a
vector
fromT0, T1,... TN
.- + Header
--#include <boost/fusion/container/generation/make_list.hpp> +#include <boost/fusion/container/generation/make_list.hpp> #include <boost/fusion/include/make_list.hpp>- + Example
--result_of::make_vector<int, const char(&)[7], double>::type +result_of::make_vector<int, const char(&)[7], double>::type
- K0,
+ |
@@ -94,16 +92,16 @@ |
- The key types for map_tie
+ The key types for |
- D0,
+ |
@@ -113,42 +111,39 @@ |
- The arguments types for map_tie
+ The arguments types for |
-result_of::map_tie<K0, K1,... KN, D0, D1,... DN>::type; +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 fromD0, D1,... DN
with keysK0, K1,... KN
- + Header
--#include <boost/fusion/container/generation/map_tie.hpp> +#include <boost/fusion/container/generation/map_tie.hpp> #include <boost/fusion/include/map_tie.hpp>- + Example
--struct int_key; +struct int_key; struct double_key; ... result_of::map_tie<int_key, double_key, int, double>::type diff --git a/doc/html/fusion/container/generation/metafunctions/vector_tie.html b/doc/html/fusion/container/generation/metafunctions/vector_tie.html index 01797d8f..8dbfd3bb 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 - + @@ -26,33 +26,31 @@- + Description
- Returns the result type of vector_tie. + Returns the result type of
vector_tie
.- + Synopsis
--template <typename T0, typename T1,... typename TN> +template <typename T0, typename T1,... typename TN> struct vector_tie;- The variadic function accepts 0 - to FUSION_MAX_VECTOR_SIZE - elements, where FUSION_MAX_VECTOR_SIZE - is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant - FUSION_MAX_VECTOR_SIZE + The variadic function accepts
-0
+ 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 +#define FUSION_MAX_VECTOR_SIZE 20- + Parameters
@@ -81,9 +79,9 @@
- T0, +
T0, T1,... - TN
+ TN@@ -93,40 +91,37 @@ - The arguments to vector_tie + The arguments to
vector_tie
- + Expression Semantics
--result_of::vector_tie<T0, T1,... TN>::type; +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 fromT0, T1,... TN
.- + Header
--#include <boost/fusion/container/generation/vector_tie.hpp> +#include <boost/fusion/container/generation/vector_tie.hpp> #include <boost/fusion/include/vector_tie.hpp>- + Example
--result_of::vector_tie<int, double>::type +result_of::vector_tie<int, double>::type
- T0...TN
+ |
@@ -124,7 +120,7 @@ |
@@ -187,7 +183,7 @@
- L()
+ L()
- 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.
+ Sequence, s
.
- l =
- s
+ l =
+ s
- Assigns to a list, l,
+ Assigns to a list, l
,
from a Forward
- Sequence, s.
+ Sequence, s
.
- The Nth element from the beginning of the sequence; see at.
+ The Nth element from the beginning of the sequence; see at
.
-list<int, float> l(12, 5.5f); -std::cout << at_c<0>(l) << std::endl; -std::cout << at_c<1>(l) << std::endl; +list<int, float> l(12, 5.5f); +std::cout <<at_c
<0>(l) << std::endl; +std::cout <<at_c
<1>(l) << std::endl;
- T0...TN
+ |
@@ -126,7 +122,7 @@ |
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 @@ -159,7 +155,7 @@
@@ -191,7 +187,7 @@
- M()
+ M()
- M(e0, e1,...
- en)
+ M(e0, e1,...
+ en)
- Creates a map with element pairs e0...en.
+ Creates a map with element pairs e0
...en
.
- M(s)
+ M(s)
Copy constructs a map from a Forward
- Sequence s.
+ Sequence s
.
- m =
- s
+ m =
+ s
- Assigns to a map, m,
+ Assigns to a map, m
,
from a Forward
- Sequence s.
+ Sequence s
.
-typedef map< - pair<int, char> - , pair<double, std::string> > +typedef map< +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;
- T0...TN
+ |
@@ -125,7 +121,7 @@ |
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 @@ -158,7 +154,7 @@
@@ -190,7 +186,7 @@
- S()
+ S()
- S(e0, e1,...
- en)
+ S(e0, e1,...
+ en)
- Creates a set with elements e0...en.
+ Creates a set with elements e0
...en
.
- S(fs)
+ S(fs)
Copy constructs a set from a Forward
- Sequence fs.
+ Sequence fs
.
- s =
- fs
+ s =
+ fs
- Assigns to a set, s,
+ Assigns to a set, s
,
from a Forward
- Sequence fs.
+ Sequence fs
.
-typedef set<int, float> S; +typedef set<int, float> S; S s(12, 5.5f); -std::cout << at_key<int>(s) << std::endl; -std::cout << at_key<float>(s) << std::endl; -std::cout << result_of::has_key<S, double>::value << std::endl; +std::cout <<at_key
<int>(s) << std::endl; +std::cout <<at_key
<float>(s) << std::endl; +std::cout <<result_of::has_key
<S, double>::value << std::endl;
- T0...TN
+ |
@@ -167,7 +160,7 @@ |
@@ -226,7 +219,7 @@
- V()
+ V()
- V(e0, e1,...
- en)
+ V(e0, e1,...
+ en)
- Creates a vector with elements e0...en.
+ Creates a vector with elements e0
...en
.
- V(s)
+ V(s)
Copy constructs a vector from a Forward
- Sequence, s.
+ Sequence, s
.
- v =
- s
+ v =
+ s
- Assigns to a vector, v,
+ Assigns to a vector, v
,
from a Forward
- Sequence, s.
+ Sequence, s
.
-vector<int, float> v(12, 5.5f); -std::cout << at_c<0>(v) << std::endl; -std::cout << at_c<1>(v) << std::endl; +vector<int, float> v(12, 5.5f); +std::cout <<at_c
<0>(v) << std::endl; +std::cout <<at_c
<1>(v) << std::endl;
![]() |
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<> +template<> struct next_impl<example::example_struct_iterator_tag> { template<typename Iterator> @@ -360,44 +350,43 @@ };- 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 theindex
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 theindex
variables.- We also need to provide a suitable equal_to_impl + 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. + Iterator will also need an implementation ofprior_impl
. For a Random - Access Iterator distance_impl - and advance_impl also need + Access Iteratordistance_impl
+ andadvance_impl
also need to be provided in order to satisfy the necessary complexity guarantees. As our iterator is a Random Access Iterator we will have to implement all of these functions.- Full implementations of prior_impl, - advance_impl, distance_impl and equal_to_impl + Full implementations of
prior_impl
, +advance_impl
,distance_impl
andequal_to_impl
are provided in the example code.- + Implementing the intrinsic functions of the sequence
In order that Fusion can correctly identify our sequence as a Fusion sequence, - we need to enable is_sequence - for our sequence type. As usual we just create an impl + we need to enable
-is_sequence
+ for our sequence type. As usual we just create animpl
type specialized for our sequence tag:-template<> +template<> struct is_sequence_impl<example::example_sequence_tag> { template<typename T> @@ -405,18 +394,17 @@ };- 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, andis_view_impl
so Fusion can correctly identify our sequence as not being a View type. Implementations are provide in the example code.Now we've completed some formalities, on to more interesting features. Lets - get begin working so that we can get + get
-begin
working so that we can get an iterator to start accessing the data in our sequence.-template<> +template<> struct begin_impl<example::example_sequence_tag> { template<typename Sequence> @@ -435,37 +423,36 @@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. + 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:-template<> +template<> struct at_key_impl<example::example_sequence_tag> { template<typename Sequence, typename Key> @@ -504,16 +491,16 @@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
@@ -523,8 +510,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 ce1c74f7..b5870ca0 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 - + @@ -26,24 +26,23 @@- + Description
- The iterator_facade + The
iterator_facade
template provides an intrusive mechanism for producing a conforming Fusion iterator.- + Synopsis
--template<typename Derived, typename TravesalTag> +template<typename Derived, typename TravesalTag> struct iterator_facade;- + Usage
@@ -57,7 +56,7 @@ type.
-Table 1.93. Parameters
+Table 1.93. Parameters
@@ -79,20 +78,20 @@ - iterator, It, It1, - It2 +
iterator
,It
,It1
, +It2
- A type derived from iterator_facade + A type derived from
iterator_facade
- N +
N
@@ -106,7 +105,7 @@ -Table 1.94. Key Expressions
+Table 1.94. Key Expressions
@@ -134,12 +133,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 +150,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 +167,12 @@ - iterator::template deref<It>::call(it) +
iterator::template deref<It>::call(it)
- Dereferences iterator it + Dereferences iterator
it
@@ -185,12 +184,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 +201,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 +218,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 +235,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 +252,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 +309,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,36 +327,36 @@ - 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
@@ -365,19 +364,18 @@ - 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/iterator/iterator_facade.hpp> #include <boost/fusion/include/iterator_facade.hpp>- + Example
- A full working example using iterator_facade is provided in triple.cpp + A full working example using
diff --git a/doc/html/fusion/extension/sequence_facade.html b/doc/html/fusion/extension/sequence_facade.html index 23a08090..5a2f18bf 100644 --- a/doc/html/fusion/extension/sequence_facade.html +++ b/doc/html/fusion/extension/sequence_facade.html @@ -3,7 +3,7 @@iterator_facade
is provided in triple.cpp in the extension examples.Sequence Facade - + @@ -26,32 +26,31 @@- + 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_> +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,7 +58,7 @@ type.
-Table 1.91. Parameters
+Table 1.91. Parameters
@@ -81,19 +80,19 @@ - sequence, Seq +
sequence
,Seq
- A type derived from sequence_facade + A type derived from
sequence_facade
- N +
N
@@ -107,7 +106,7 @@ -Table 1.92. Key Expressions
+Table 1.92. Key Expressions
@@ -129,60 +128,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,51 +190,51 @@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
@@ -243,19 +242,18 @@ - 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/sequence/sequence_facade.hpp> #include <boost/fusion/include/sequence_facade.hpp>- + Example
- A full working example using sequence_facade is provided in triple.cpp + A full working example using
diff --git a/doc/html/fusion/functional.html b/doc/html/fusion/functional.html index d5ad9ee6..89f008a3 100644 --- a/doc/html/fusion/functional.html +++ b/doc/html/fusion/functional.html @@ -3,7 +3,7 @@sequence_facade
is provided in triple.cpp in the extension examples.Functional - + @@ -40,16 +40,16 @@
- /functional.hpp> -
+#include <boost/fusion/functional.hpp> +
What is a function call?
--f (a,b,c) +f (a,b,c)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
-(a,b,c)
with some Fusion Sequence, introducing yet another function provides a solution:-invoke(f,my_sequence) +invoke(f,my_sequence)- Alternatively it is possible to apply a simple transformation to f + Alternatively it is possible to apply a simple transformation to
-f
in order to achieve the same effect:-f tuple <=> f' (tuple) +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
@@ -129,8 +129,11 @@ variant has a corresponding generator function template that returns an adapter instance for the given argument. ++ Constructors can be called applying Boost.Functional/Factory. +
- + Making Fusion code callable through a function object interface
@@ -141,11 +144,14 @@ or function call operators.- The library provides several adapter variants that implement this transformation, - ranging from strictly typed to fully generic. The latter provides a reusable, - approximate solution to The - Forwarding Problem. Every generic variant has a corresponding generator - function template that returns an adapter instance for the given argument. + The library provides both a strictly typed and a generic variant for this transformation. + The latter should be used in combination with Boost.Functional/Forward + to attack The + Forwarding Problem. +
++ Both variants have a corresponding generator function template that returns + an adapter instance for the given argument.
Function object templates to transform a particular target function. @@ -50,7 +48,7 @@