mirror of
https://github.com/boostorg/fusion.git
synced 2025-07-19 15:22:14 +02:00
Fix spelling errors in documentation.
This commit is contained in:
@ -1329,7 +1329,7 @@ Constant. Returns a view which is lazily evaluated.
|
|||||||
[heading Description]
|
[heading Description]
|
||||||
Returns a new sequence with the elements of the original in reverse order.
|
Returns a new sequence with the elements of the original in reverse order.
|
||||||
|
|
||||||
[heading Synposis]
|
[heading Synopsis]
|
||||||
template<
|
template<
|
||||||
typename Sequence
|
typename Sequence
|
||||||
>
|
>
|
||||||
@ -1369,7 +1369,7 @@ Constant. Returns a view which is lazily evaluated.
|
|||||||
[heading Description]
|
[heading Description]
|
||||||
__clear__ returns an empty sequence.
|
__clear__ returns an empty sequence.
|
||||||
|
|
||||||
[heading Synposis]
|
[heading Synopsis]
|
||||||
template<
|
template<
|
||||||
typename Sequence
|
typename Sequence
|
||||||
>
|
>
|
||||||
@ -1406,7 +1406,7 @@ Constant.
|
|||||||
Returns a new sequence, containing all the elements of the original except those at a specified iterator, or
|
Returns a new sequence, containing all the elements of the original except those at a specified iterator, or
|
||||||
between two iterators.
|
between two iterators.
|
||||||
|
|
||||||
[heading Synposis]
|
[heading Synopsis]
|
||||||
template<
|
template<
|
||||||
typename Sequence,
|
typename Sequence,
|
||||||
typename First
|
typename First
|
||||||
@ -1467,11 +1467,11 @@ Constant. Returns a view which is lazily evaluated.
|
|||||||
[section erase_key]
|
[section erase_key]
|
||||||
|
|
||||||
[heading Description]
|
[heading Description]
|
||||||
For an [link fusion.sequence.concepts.associative_sequence associative]] __forward_sequence__ `seq`,
|
For an [link fusion.sequence.concepts.associative_sequence associative] __forward_sequence__ `seq`,
|
||||||
returns a [link fusion.sequence.concepts.associative_sequence associative]] __forward_sequence__ containing
|
returns a [link fusion.sequence.concepts.associative_sequence associative] __forward_sequence__ containing
|
||||||
all the elements of the original except those with a given key.
|
all the elements of the original except those with a given key.
|
||||||
|
|
||||||
[heading Synposis]
|
[heading Synopsis]
|
||||||
template<
|
template<
|
||||||
typename Key,
|
typename Key,
|
||||||
typename Sequence
|
typename Sequence
|
||||||
@ -1510,7 +1510,7 @@ Constant. Returns a view which is lazily evaluated.
|
|||||||
Returns a new sequence with all the elements of the original, an a new element inserted the
|
Returns a new sequence with all the elements of the original, an a new element inserted the
|
||||||
position described by a given iterator.
|
position described by a given iterator.
|
||||||
|
|
||||||
[heading Synposis]
|
[heading Synopsis]
|
||||||
template<
|
template<
|
||||||
typename Sequence,
|
typename Sequence,
|
||||||
typename Pos,
|
typename Pos,
|
||||||
@ -1527,7 +1527,7 @@ position described by a given iterator.
|
|||||||
]
|
]
|
||||||
|
|
||||||
[heading Expression Semantics]
|
[heading Expression Semantics]
|
||||||
__insert__(seq, p, t);
|
__insert__(seq, pos, t);
|
||||||
|
|
||||||
[*Return type]:
|
[*Return type]:
|
||||||
|
|
||||||
@ -1555,7 +1555,7 @@ Constant. Returns a view which is lazily evaluated.
|
|||||||
[heading Description]
|
[heading Description]
|
||||||
Returns a new sequence with another sequence inserted at a specified iterator.
|
Returns a new sequence with another sequence inserted at a specified iterator.
|
||||||
|
|
||||||
[heading Synposis]
|
[heading Synopsis]
|
||||||
template<
|
template<
|
||||||
typename Sequence,
|
typename Sequence,
|
||||||
typename Pos,
|
typename Pos,
|
||||||
@ -1580,7 +1580,7 @@ Returns a new sequence with another sequence inserted at a specified iterator.
|
|||||||
* A model of __associative_sequence__ if `seq` implements the __associative_sequence__ model.
|
* A model of __associative_sequence__ if `seq` implements the __associative_sequence__ model.
|
||||||
|
|
||||||
[*Semantics]: Returns a new sequence, containing all the elements of `seq`, and the elements of
|
[*Semantics]: Returns a new sequence, containing all the elements of `seq`, and the elements of
|
||||||
`range` inserted at iterator `pos`. All elements retaining their ordering from the orignal sequences.
|
`range` inserted at iterator `pos`. All elements retaining their ordering from the original sequences.
|
||||||
|
|
||||||
[heading Complexity]
|
[heading Complexity]
|
||||||
Constant. Returns a view which is lazily evaluated.
|
Constant. Returns a view which is lazily evaluated.
|
||||||
@ -1641,7 +1641,7 @@ Constant. Returns a view which is lazily evaluated.
|
|||||||
[section zip]
|
[section zip]
|
||||||
|
|
||||||
[heading Description]
|
[heading Description]
|
||||||
Zips sequences together to form a single sequence, whos members are tuples of the members of the component sequences.
|
Zips sequences together to form a single sequence, whose members are tuples of the members of the component sequences.
|
||||||
|
|
||||||
[heading Synopsis]
|
[heading Synopsis]
|
||||||
template<
|
template<
|
||||||
@ -2471,7 +2471,7 @@ Returns the result of joining 2 sequences, given the sequence types.
|
|||||||
[*Return type]:
|
[*Return type]:
|
||||||
|
|
||||||
* A model of __forward_sequence__.
|
* A model of __forward_sequence__.
|
||||||
* A model of __associative_sequence__ if `LhSequence` amd `RhSequence` implement the __associative_sequence__ model.
|
* A model of __associative_sequence__ if `LhSequence` and `RhSequence` implement the __associative_sequence__ model.
|
||||||
|
|
||||||
[*Semantics]: Returns a sequence containing the elements of `LhSequence` followed by the elements of `RhSequence`. The order of the elements in the 2 sequences is preserved.
|
[*Semantics]: Returns a sequence containing the elements of `LhSequence` followed by the elements of `RhSequence`. The order of the elements in the 2 sequences is preserved.
|
||||||
|
|
||||||
@ -2488,7 +2488,7 @@ Constant.
|
|||||||
[section zip]
|
[section zip]
|
||||||
|
|
||||||
[heading Description]
|
[heading Description]
|
||||||
Zips sequences together to form a single sequence, whos members are tuples of the members of the component sequences.
|
Zips sequences together to form a single sequence, whose members are tuples of the members of the component sequences.
|
||||||
|
|
||||||
[heading Synopsis]
|
[heading Synopsis]
|
||||||
template<
|
template<
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
[section Container]
|
[section Container]
|
||||||
|
|
||||||
Fusion provides a few predefined sequences out of the box. These
|
Fusion provides a few predefined sequences out of the box. These
|
||||||
/containers/ actually hold heterogenously typed data; unlike
|
/containers/ actually hold heterogeneously typed data; unlike
|
||||||
__views__. These containers are more or less counterparts of those in __stl__.
|
__views__. These containers are more or less counterparts of those in __stl__.
|
||||||
|
|
||||||
[heading Header]
|
[heading Header]
|
||||||
@ -21,7 +21,7 @@ __views__. These containers are more or less counterparts of those in __stl__.
|
|||||||
|
|
||||||
[heading Description]
|
[heading Description]
|
||||||
|
|
||||||
`vector` is a __random_access_sequence__ of heterogenous typed data
|
`vector` is a __random_access_sequence__ of heterogeneous typed data
|
||||||
structured as a simple `struct` where each element is held as a member
|
structured as a simple `struct` where each element is held as a member
|
||||||
variable. `vector` is the simplest of the Fusion sequence container (a
|
variable. `vector` is the simplest of the Fusion sequence container (a
|
||||||
vector with N elements is just a struct with N members), and in many
|
vector with N elements is just a struct with N members), and in many
|
||||||
@ -209,7 +209,7 @@ constant (see __recursive_inline__).]
|
|||||||
|
|
||||||
[heading Description]
|
[heading Description]
|
||||||
|
|
||||||
`list` is a __forward_sequence__ of heterogenous typed data built on top of
|
`list` is a __forward_sequence__ of heterogeneous typed data built on top of
|
||||||
__cons__. It is more efficient than __vector__ when the target sequence is
|
__cons__. It is more efficient than __vector__ when the target sequence is
|
||||||
constructed piecemeal (a data at a time). The runtime cost of access to
|
constructed piecemeal (a data at a time). The runtime cost of access to
|
||||||
each element is peculiarly constant (see __recursive_inline__).
|
each element is peculiarly constant (see __recursive_inline__).
|
||||||
@ -508,7 +508,7 @@ not defined in __bidirectional_sequence__.
|
|||||||
|
|
||||||
[heading Description]
|
[heading Description]
|
||||||
|
|
||||||
set is an __associative_sequence__ of heteregenous typed data elements.
|
set is an __associative_sequence__ of heterogeneous typed data elements.
|
||||||
Type identity is used to impose an equivalence relation on keys. The
|
Type identity is used to impose an equivalence relation on keys. The
|
||||||
element's type is its key. A set may contain at most one element for each
|
element's type is its key. A set may contain at most one element for each
|
||||||
key. Membership testing and element key lookup has constant runtime
|
key. Membership testing and element key lookup has constant runtime
|
||||||
@ -589,7 +589,7 @@ defined in __random_access_sequence__ and __associative_sequence__.
|
|||||||
|
|
||||||
[heading Description]
|
[heading Description]
|
||||||
|
|
||||||
map is an __associative_sequence__ of heteregenous typed data elements.
|
map is an __associative_sequence__ of heterogeneous typed data elements.
|
||||||
Each element is a key/data pair (see __fusion_pair__) where the key has no
|
Each element is a key/data pair (see __fusion_pair__) where the key has no
|
||||||
data (type only). Type identity is used to impose an equivalence relation
|
data (type only). Type identity is used to impose an equivalence relation
|
||||||
on keys. A map may contain at most one element for each key. Membership
|
on keys. A map may contain at most one element for each key. Membership
|
||||||
|
@ -71,7 +71,7 @@ tag type for operations involving our sequence. This is done by specializing
|
|||||||
}}}
|
}}}
|
||||||
|
|
||||||
`traits::tag_of` also has a second template argument,
|
`traits::tag_of` also has a second template argument,
|
||||||
that can be used in conjuction with `boost::enable_if` to provide tag
|
that can be used in conjunction with `boost::enable_if` to provide tag
|
||||||
support for groups of related types. This feature is not necessary
|
support for groups of related types. This feature is not necessary
|
||||||
for our sequence, but for an example see the code in:
|
for our sequence, but for an example see the code in:
|
||||||
|
|
||||||
@ -228,7 +228,7 @@ bit of metaprogramming to return `const` references if the underlying sequence
|
|||||||
is const.
|
is const.
|
||||||
|
|
||||||
[note Although there is a fair amount of left to do to produce a fully fledged
|
[note Although there is a fair amount of left to do to produce a fully fledged
|
||||||
Fusion sequence, __result_of_value_of__ and __deref__ illustrate all the signficant concepts
|
Fusion sequence, __result_of_value_of__ and __deref__ illustrate all the significant concepts
|
||||||
required. The remainder of the process is very repetitive, simply requiring
|
required. The remainder of the process is very repetitive, simply requiring
|
||||||
implementation of a suitable `xxxx_impl` for each feature `xxxx`.
|
implementation of a suitable `xxxx_impl` for each feature `xxxx`.
|
||||||
]
|
]
|
||||||
@ -378,7 +378,7 @@ the example code.
|
|||||||
|
|
||||||
We've now worked through the entire process for adding a new random
|
We've now worked through the entire process for adding a new random
|
||||||
access sequence and we've also enabled our type to serve as an associative
|
access sequence and we've also enabled our type to serve as an associative
|
||||||
sequence. The implementation was slightly longwinded, but followed
|
sequence. The implementation was slightly long-winded, but followed
|
||||||
a simple repeating pattern.
|
a simple repeating pattern.
|
||||||
|
|
||||||
The support for `std::pair`, __mpl__ sequences, and `boost::array` all
|
The support for `std::pair`, __mpl__ sequences, and `boost::array` all
|
||||||
|
@ -364,7 +364,7 @@ implemented).
|
|||||||
|
|
||||||
[heading Header]
|
[heading Header]
|
||||||
|
|
||||||
#include <booost/fusion/functional/invocation/invoke_procedure.hpp>
|
#include <boost/fusion/functional/invocation/invoke_procedure.hpp>
|
||||||
|
|
||||||
[heading Example]
|
[heading Example]
|
||||||
__vector__<int,int> v(1,2);
|
__vector__<int,int> v(1,2);
|
||||||
@ -644,7 +644,7 @@ An unary __poly_func_obj__ adapter template for __callable_obj__ target
|
|||||||
functions. It takes a __forward_sequence__ that contains the arguments for
|
functions. It takes a __forward_sequence__ that contains the arguments for
|
||||||
the target function.
|
the target function.
|
||||||
|
|
||||||
The result is discared and the adapter's return type is `void`.
|
The result is discarded and the adapter's return type is `void`.
|
||||||
|
|
||||||
The type of the target function is allowed to be const qualified or a
|
The type of the target function is allowed to be const qualified or a
|
||||||
reference. Const qualification is preserved and propagated appropriately
|
reference. Const qualification is preserved and propagated appropriately
|
||||||
@ -922,7 +922,7 @@ An n-ary __poly_func_obj__ adapter template for an unary __poly_func_obj__
|
|||||||
target function. When called, its arguments are bundled to a
|
target function. When called, its arguments are bundled to a
|
||||||
__random_access_sequence__ that is passed to the target function object.
|
__random_access_sequence__ that is passed to the target function object.
|
||||||
|
|
||||||
The call operators of esulting function objects are strictly typed
|
The call operators of resulting function objects are strictly typed
|
||||||
(in other words, non-templatized) with the types from a __sequence__.
|
(in other words, non-templatized) with the types from a __sequence__.
|
||||||
|
|
||||||
The type of the target function is allowed to be const qualified or a
|
The type of the target function is allowed to be const qualified or a
|
||||||
|
@ -677,7 +677,7 @@ Returns the type stored at the position of an iterator.
|
|||||||
[heading Description]
|
[heading Description]
|
||||||
Returns the type that will be returned by dereferencing an iterator.
|
Returns the type that will be returned by dereferencing an iterator.
|
||||||
|
|
||||||
[heading Synposis]
|
[heading Synopsis]
|
||||||
template<
|
template<
|
||||||
typename I
|
typename I
|
||||||
>
|
>
|
||||||
@ -721,7 +721,7 @@ Returns the type that will be returned by dereferencing an iterator.
|
|||||||
[heading Description]
|
[heading Description]
|
||||||
Returns the type of the next iterator in a sequence.
|
Returns the type of the next iterator in a sequence.
|
||||||
|
|
||||||
[heading Synposis]
|
[heading Synopsis]
|
||||||
template<
|
template<
|
||||||
typename I
|
typename I
|
||||||
>
|
>
|
||||||
@ -1044,7 +1044,7 @@ Returns the type of the data property associated with the element referenced by
|
|||||||
[heading Description]
|
[heading Description]
|
||||||
Returns the type that will be returned by dereferencing the data property referenced by an associative iterator.
|
Returns the type that will be returned by dereferencing the data property referenced by an associative iterator.
|
||||||
|
|
||||||
[heading Synposis]
|
[heading Synopsis]
|
||||||
template<
|
template<
|
||||||
typename I
|
typename I
|
||||||
>
|
>
|
||||||
@ -1066,7 +1066,7 @@ Returns the type that will be returned by dereferencing the data property refere
|
|||||||
[*Semantics]: Returns the result of dereferencing the data property referenced by an associative iterator of type `I`.
|
[*Semantics]: Returns the result of dereferencing the data property referenced by an associative iterator of type `I`.
|
||||||
|
|
||||||
[heading Header]
|
[heading Header]
|
||||||
#include <boosta/fusion/iterator/deref_data.hpp>
|
#include <boost/fusion/iterator/deref_data.hpp>
|
||||||
#include <boost/fusion/include/deref_data.hpp>
|
#include <boost/fusion/include/deref_data.hpp>
|
||||||
|
|
||||||
[heading Example]
|
[heading Example]
|
||||||
|
@ -58,10 +58,10 @@ In the case:
|
|||||||
|
|
||||||
[heading Extensibility]
|
[heading Extensibility]
|
||||||
|
|
||||||
Unlike __mpl__, there is no extensibe sequence concept in fusion. This does
|
Unlike __mpl__, there is no extensible sequence concept in fusion. This does
|
||||||
not mean that Fusion sequences are not extensible. In fact, all Fusion
|
not mean that Fusion sequences are not extensible. In fact, all Fusion
|
||||||
sequences are inherently extensible. It is just that the manner of sequence
|
sequences are inherently extensible. It is just that the manner of sequence
|
||||||
extension in Fusion is diferent from both __stl__ and __mpl__ on account of
|
extension in Fusion is different from both __stl__ and __mpl__ on account of
|
||||||
the lazy nature of fusion __algorithms__. __stl__ containers extend
|
the lazy nature of fusion __algorithms__. __stl__ containers extend
|
||||||
themselves in place though member functions such as __push_back__ and
|
themselves in place though member functions such as __push_back__ and
|
||||||
__insert__. __mpl__ sequences, on the other hand, are extended through
|
__insert__. __mpl__ sequences, on the other hand, are extended through
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
[heading Description]
|
[heading Description]
|
||||||
|
|
||||||
Fusion is a library for working with heterogenous collections of data,
|
Fusion is a library for working with heterogeneous collections of data,
|
||||||
commonly referred to as tuples. A set of containers (vector, list, set and map)
|
commonly referred to as tuples. A set of containers (vector, list, set and map)
|
||||||
is provided, along with views that provide a transformed presentation
|
is provided, along with views that provide a transformed presentation
|
||||||
of their underlying data. Collectively the containers and views are referred to
|
of their underlying data. Collectively the containers and views are referred to
|
||||||
@ -31,7 +31,7 @@ Tuples are powerful beasts. After having developed two significant projects
|
|||||||
(__spirit__ and __phoenix__) that relied heavily metaprogramming, it
|
(__spirit__ and __phoenix__) that relied heavily metaprogramming, it
|
||||||
became apparent that tuples are a powerful means to simplify otherwise tricky
|
became apparent that tuples are a powerful means to simplify otherwise tricky
|
||||||
tasks; especially those that require a combination of metaprogramming and
|
tasks; especially those that require a combination of metaprogramming and
|
||||||
manipulation of heterogenous data types with values. While __mpl__ is an
|
manipulation of heterogeneous data types with values. While __mpl__ is an
|
||||||
extremely powerful metaprogramming tool, __mpl__ focuses on type
|
extremely powerful metaprogramming tool, __mpl__ focuses on type
|
||||||
manipulation only. Ultimately, you'll have to map these types to real
|
manipulation only. Ultimately, you'll have to map these types to real
|
||||||
values to make them useful in the runtime world where all the real action
|
values to make them useful in the runtime world where all the real action
|
||||||
|
@ -541,7 +541,7 @@ Returns the first element in the sequence.
|
|||||||
|
|
||||||
[*Return type]: Returns a reference to the first element in the sequence
|
[*Return type]: Returns a reference to the first element in the sequence
|
||||||
`seq` if `seq` is mutable and `e = o`, where `e` is the first element in
|
`seq` if `seq` is mutable and `e = o`, where `e` is the first element in
|
||||||
the sequence, is a valid expression. Else, returns a type convertable to
|
the sequence, is a valid expression. Else, returns a type convertible to
|
||||||
the first element in the sequence.
|
the first element in the sequence.
|
||||||
|
|
||||||
[*Precondition]: `__empty__(seq) == false`
|
[*Precondition]: `__empty__(seq) == false`
|
||||||
@ -589,7 +589,7 @@ Returns the last element in the sequence.
|
|||||||
|
|
||||||
[*Return type]: Returns a reference to the last element in the sequence
|
[*Return type]: Returns a reference to the last element in the sequence
|
||||||
`seq` if `seq` is mutable and `e = o`, where `e` is the last element in the
|
`seq` if `seq` is mutable and `e = o`, where `e` is the last element in the
|
||||||
sequence, is a valid expression. Else, returns a type convertable to the
|
sequence, is a valid expression. Else, returns a type convertible to the
|
||||||
last element in the sequence.
|
last element in the sequence.
|
||||||
|
|
||||||
[*Precondition]: `__empty__(seq) == false`
|
[*Precondition]: `__empty__(seq) == false`
|
||||||
@ -680,7 +680,7 @@ Returns the M-th element from the beginning of the sequence.
|
|||||||
[*Return type]: Returns a reference to the M-th element from the beginning
|
[*Return type]: Returns a reference to the M-th element from the beginning
|
||||||
of the sequence `seq` if `seq` is mutable and `e = o`, where `e` is the M-th
|
of the sequence `seq` if `seq` is mutable and `e = o`, where `e` is the M-th
|
||||||
element from the beginning of the sequence, is a valid expression. Else,
|
element from the beginning of the sequence, is a valid expression. Else,
|
||||||
returns a type convertable to the M-th element from the beginning of the
|
returns a type convertible to the M-th element from the beginning of the
|
||||||
sequence.
|
sequence.
|
||||||
|
|
||||||
[*Precondition]: `0 <= M::value < __size__(s)`
|
[*Precondition]: `0 <= M::value < __size__(s)`
|
||||||
@ -733,7 +733,7 @@ Returns the N-th element from the beginning of the sequence.
|
|||||||
[*Return type]: Returns a reference to the N-th element from the beginning
|
[*Return type]: Returns a reference to the N-th element from the beginning
|
||||||
of the sequence `seq` if `seq` is mutable and `e = o`, where `e` is the N-th
|
of the sequence `seq` if `seq` is mutable and `e = o`, where `e` is the N-th
|
||||||
element from the beginning of the sequence, is a valid expression. Else,
|
element from the beginning of the sequence, is a valid expression. Else,
|
||||||
returns a type convertable to the N-th element from the beginning of the
|
returns a type convertible to the N-th element from the beginning of the
|
||||||
sequence.
|
sequence.
|
||||||
|
|
||||||
[*Precondition]: `0 <= N < __size__(s)`
|
[*Precondition]: `0 <= N < __size__(s)`
|
||||||
@ -828,7 +828,7 @@ Returns the element associated with a Key from the sequence.
|
|||||||
[*Return type]: Returns a reference to the element associated with Key from
|
[*Return type]: Returns a reference to the element associated with Key from
|
||||||
the sequence `seq` if `seq` is mutable and `e = o`, where `e` is the
|
the sequence `seq` if `seq` is mutable and `e = o`, where `e` is the
|
||||||
element associated with Key, is a valid expression. Else, returns a type
|
element associated with Key, is a valid expression. Else, returns a type
|
||||||
convertable to the element associated with Key.
|
convertible to the element associated with Key.
|
||||||
|
|
||||||
[*Precondition]: `has_key<Key>(seq) == true`
|
[*Precondition]: `has_key<Key>(seq) == true`
|
||||||
|
|
||||||
@ -860,7 +860,7 @@ Performs an element by element swap of the elements in 2 sequences.
|
|||||||
|
|
||||||
[table
|
[table
|
||||||
[[Parameters] [Requirement] [Description]]
|
[[Parameters] [Requirement] [Description]]
|
||||||
[[`seq1`, `seq2`][Models of __forward_sequence__][The sequences whos elements we wish to swap.]]
|
[[`seq1`, `seq2`][Models of __forward_sequence__][The sequences whose elements we wish to swap.]]
|
||||||
]
|
]
|
||||||
|
|
||||||
[heading Expression Semantics]
|
[heading Expression Semantics]
|
||||||
|
@ -16,7 +16,7 @@ A couple of classes and metafunctions provide basic support for Fusion.
|
|||||||
|
|
||||||
Metafunction that evaluates to `mpl::true_` if a certain type `T` is a
|
Metafunction that evaluates to `mpl::true_` if a certain type `T` is a
|
||||||
conforming Fusion __sequence__, `mpl::false_` otherwise. This may be
|
conforming Fusion __sequence__, `mpl::false_` otherwise. This may be
|
||||||
specialized to accomodate clients which provide Fusion conforming sequences.
|
specialized to accommodate clients which provide Fusion conforming sequences.
|
||||||
|
|
||||||
[heading Synopsis]
|
[heading Synopsis]
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ conforming Fusion __view__, `mpl::false_` otherwise. A view is a
|
|||||||
specialized sequence that does not actually contain data. Views hold
|
specialized sequence that does not actually contain data. Views hold
|
||||||
sequences which may be other views. In general, views are held by other
|
sequences which may be other views. In general, views are held by other
|
||||||
views by value, while non-views are held by other views by reference. `is_view`
|
views by value, while non-views are held by other views by reference. `is_view`
|
||||||
may be specialized to accomodate clients providing Fusion conforming views.
|
may be specialized to accommodate clients providing Fusion conforming views.
|
||||||
|
|
||||||
[heading Synopsis]
|
[heading Synopsis]
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ All conforming Fusion sequences and iterators have an associated tag type. The
|
|||||||
purpose of the tag is to enable __tag_dispatching__ from __intrinsic__
|
purpose of the tag is to enable __tag_dispatching__ from __intrinsic__
|
||||||
functions to implementations appropriate for the type.
|
functions to implementations appropriate for the type.
|
||||||
|
|
||||||
This metafunction may be specialized to accomodate clients providing Fusion
|
This metafunction may be specialized to accommodate clients providing Fusion
|
||||||
conforming sequences.
|
conforming sequences.
|
||||||
|
|
||||||
[heading Synopsis]
|
[heading Synopsis]
|
||||||
|
@ -62,7 +62,7 @@ The __tr1__tuple__ type provides a default constructor, a constructor that takes
|
|||||||
|
|
||||||
tuple();
|
tuple();
|
||||||
|
|
||||||
[*Requirements]: Each `Ti` is default constructable.
|
[*Requirements]: Each `Ti` is default-constructible.
|
||||||
|
|
||||||
[*Semantics]: Default initializes each element of the tuple.
|
[*Semantics]: Default initializes each element of the tuple.
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ The __tr1__tuple__ type provides a default constructor, a constructor that takes
|
|||||||
|
|
||||||
tuple(const tuple& t);
|
tuple(const tuple& t);
|
||||||
|
|
||||||
[*Requirements]: Each `Ti` should be copy constructable.
|
[*Requirements]: Each `Ti` should be copy-constructible.
|
||||||
|
|
||||||
[*Semantics]: Copy constructs each element of `*this` with the corresponding element of `t`.
|
[*Semantics]: Copy constructs each element of `*this` with the corresponding element of `t`.
|
||||||
|
|
||||||
|
14
doc/view.qbk
14
doc/view.qbk
@ -484,7 +484,7 @@ defined in the implemented models.
|
|||||||
[heading Description]
|
[heading Description]
|
||||||
|
|
||||||
`nview` presents a view which iterates over a given __sequence__ in a specified order.
|
`nview` presents a view which iterates over a given __sequence__ in a specified order.
|
||||||
An `nview` is constructed from an arbitrary __sequence__ and a list of indicies specifying
|
An `nview` is constructed from an arbitrary __sequence__ and a list of indices specifying
|
||||||
the elements to iterate over.
|
the elements to iterate over.
|
||||||
|
|
||||||
[heading Header]
|
[heading Header]
|
||||||
@ -494,7 +494,7 @@ the elements to iterate over.
|
|||||||
|
|
||||||
[heading Synopsis]
|
[heading Synopsis]
|
||||||
|
|
||||||
template <typename Sequence, typename Indicies>
|
template <typename Sequence, typename Indices>
|
||||||
struct nview;
|
struct nview;
|
||||||
|
|
||||||
template <typename Sequence, int I1, int I2 = -1, ...>
|
template <typename Sequence, int I1, int I2 = -1, ...>
|
||||||
@ -507,7 +507,7 @@ the elements to iterate over.
|
|||||||
[[Parameter] [Description] [Default]]
|
[[Parameter] [Description] [Default]]
|
||||||
[[`Sequence`] [An arbitrary Fusion __forward_sequence__]
|
[[`Sequence`] [An arbitrary Fusion __forward_sequence__]
|
||||||
[]]
|
[]]
|
||||||
[[`Indicies`] [A `mpl::vector_c<int, ...>` holding the indicies defining
|
[[`Indices`] [A `mpl::vector_c<int, ...>` holding the indices defining
|
||||||
the required iteration order.] []]
|
the required iteration order.] []]
|
||||||
[[`I1`, `I2`, `I3`...] [A list of integers specifying the required
|
[[`I1`, `I2`, `I3`...] [A list of integers specifying the required
|
||||||
iteration order.] [`INT_MAX` for `I2`, `I3`...]]
|
iteration order.] [`INT_MAX` for `I2`, `I3`...]]
|
||||||
@ -530,7 +530,7 @@ defined in __random_access_sequence__.
|
|||||||
|
|
||||||
[table
|
[table
|
||||||
[[Expression] [Semantics]]
|
[[Expression] [Semantics]]
|
||||||
[[`NV(s)`] [Creates an `nview` given a sequence and a list of indicies.]]
|
[[`NV(s)`] [Creates an `nview` given a sequence and a list of indices.]]
|
||||||
[[`NV(nv1)`] [Copy constructs an `nview` from another `nview`, `nv1`.]]
|
[[`NV(nv1)`] [Copy constructs an `nview` from another `nview`, `nv1`.]]
|
||||||
[[`nv1 = nv2`] [Assigns to an `nview`, `nv1`, from another `nview`, `nv2`.]]
|
[[`nv1 = nv2`] [Assigns to an `nview`, `nv1`, from another `nview`, `nv2`.]]
|
||||||
]
|
]
|
||||||
@ -540,11 +540,11 @@ of the original Fusion __sequence__
|
|||||||
|
|
||||||
[heading Example]
|
[heading Example]
|
||||||
typedef __vector__<int, char, double> vec;
|
typedef __vector__<int, char, double> vec;
|
||||||
typedef mpl::vector_c<int, 2, 1, 0, 2, 0> indicies;
|
typedef mpl::vector_c<int, 2, 1, 0, 2, 0> indices;
|
||||||
|
|
||||||
vec v1(1, 'c', 2.0);
|
vec v1(1, 'c', 2.0);
|
||||||
|
|
||||||
std::cout << nview<vec, indicies>(v1) << std::endl; // (2.0 c 1 2.0 1)
|
std::cout << nview<vec, indices>(v1) << std::endl; // (2.0 c 1 2.0 1)
|
||||||
std::cout << as_nview<2, 1, 1, 0>(v1) << std::endl; // (2.0 c c 1)
|
std::cout << as_nview<2, 1, 1, 0>(v1) << std::endl; // (2.0 c c 1)
|
||||||
|
|
||||||
[endsect]
|
[endsect]
|
||||||
@ -592,7 +592,7 @@ printing a `repetitive_view` to `std::cout` is not.
|
|||||||
[[`RV(rv1)`] [] [Copy constructs an `repetitive_view` from another `repetitive_view`, `rv1`.]]
|
[[`RV(rv1)`] [] [Copy constructs an `repetitive_view` from another `repetitive_view`, `rv1`.]]
|
||||||
[[`rv1 = rv2`] [] [Assigns to a `repetitive_view`, `rv1`, from another `repetitive_view`, `rv2`.]]
|
[[`rv1 = rv2`] [] [Assigns to a `repetitive_view`, `rv1`, from another `repetitive_view`, `rv2`.]]
|
||||||
[[`__begin__(rv)`] [__forward_iterator__] []]
|
[[`__begin__(rv)`] [__forward_iterator__] []]
|
||||||
[[`__end__(rv)`] [__forward_iterator__] [Creates an unreachable iterator (since the sequnce is infinite)]]
|
[[`__end__(rv)`] [__forward_iterator__] [Creates an unreachable iterator (since the sequence is infinite)]]
|
||||||
]
|
]
|
||||||
|
|
||||||
[heading Result Type Expressions]
|
[heading Result Type Expressions]
|
||||||
|
Reference in New Issue
Block a user