diff --git a/doc/algorithm.qbk b/doc/algorithm.qbk index a26637ce..33355b62 100644 --- a/doc/algorithm.qbk +++ b/doc/algorithm.qbk @@ -1329,7 +1329,7 @@ Constant. Returns a view which is lazily evaluated. [heading Description] Returns a new sequence with the elements of the original in reverse order. -[heading Synposis] +[heading Synopsis] template< typename Sequence > @@ -1369,7 +1369,7 @@ Constant. Returns a view which is lazily evaluated. [heading Description] __clear__ returns an empty sequence. -[heading Synposis] +[heading Synopsis] template< 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 between two iterators. -[heading Synposis] +[heading Synopsis] template< typename Sequence, typename First @@ -1467,11 +1467,11 @@ Constant. Returns a view which is lazily evaluated. [section erase_key] [heading Description] -For an [link fusion.sequence.concepts.associative_sequence associative]] __forward_sequence__ `seq`, -returns a [link fusion.sequence.concepts.associative_sequence associative]] __forward_sequence__ containing +For an [link fusion.sequence.concepts.associative_sequence associative] __forward_sequence__ `seq`, +returns a [link fusion.sequence.concepts.associative_sequence associative] __forward_sequence__ containing all the elements of the original except those with a given key. -[heading Synposis] +[heading Synopsis] template< typename Key, 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 position described by a given iterator. -[heading Synposis] +[heading Synopsis] template< typename Sequence, typename Pos, @@ -1527,7 +1527,7 @@ position described by a given iterator. ] [heading Expression Semantics] - __insert__(seq, p, t); + __insert__(seq, pos, t); [*Return type]: @@ -1555,7 +1555,7 @@ Constant. Returns a view which is lazily evaluated. [heading Description] Returns a new sequence with another sequence inserted at a specified iterator. -[heading Synposis] +[heading Synopsis] template< typename Sequence, 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. [*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] Constant. Returns a view which is lazily evaluated. @@ -1641,7 +1641,7 @@ Constant. Returns a view which is lazily evaluated. [section zip] [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] template< @@ -2471,7 +2471,7 @@ Returns the result of joining 2 sequences, given the sequence types. [*Return type]: * 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. @@ -2488,7 +2488,7 @@ Constant. [section zip] [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] template< diff --git a/doc/container.qbk b/doc/container.qbk index ad7f5c7e..571c7f0a 100644 --- a/doc/container.qbk +++ b/doc/container.qbk @@ -9,7 +9,7 @@ [section Container] 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__. [heading Header] @@ -21,7 +21,7 @@ __views__. These containers are more or less counterparts of those in __stl__. [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 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 @@ -209,7 +209,7 @@ constant (see __recursive_inline__).] [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 constructed piecemeal (a data at a time). The runtime cost of access to each element is peculiarly constant (see __recursive_inline__). @@ -508,7 +508,7 @@ not defined in __bidirectional_sequence__. [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 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 @@ -589,7 +589,7 @@ defined in __random_access_sequence__ and __associative_sequence__. [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 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 diff --git a/doc/extension.qbk b/doc/extension.qbk index 354bc13e..96e5ef61 100644 --- a/doc/extension.qbk +++ b/doc/extension.qbk @@ -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, -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 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. [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 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 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. The support for `std::pair`, __mpl__ sequences, and `boost::array` all diff --git a/doc/functional.qbk b/doc/functional.qbk index 19205527..9bfdaa63 100644 --- a/doc/functional.qbk +++ b/doc/functional.qbk @@ -364,7 +364,7 @@ implemented). [heading Header] - #include + #include [heading Example] __vector__ 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 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 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 __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__. The type of the target function is allowed to be const qualified or a diff --git a/doc/iterator.qbk b/doc/iterator.qbk index 666bc7ac..c4f2c741 100644 --- a/doc/iterator.qbk +++ b/doc/iterator.qbk @@ -677,7 +677,7 @@ Returns the type stored at the position of an iterator. [heading Description] Returns the type that will be returned by dereferencing an iterator. -[heading Synposis] +[heading Synopsis] template< typename I > @@ -721,7 +721,7 @@ Returns the type that will be returned by dereferencing an iterator. [heading Description] Returns the type of the next iterator in a sequence. -[heading Synposis] +[heading Synopsis] template< typename I > @@ -1044,7 +1044,7 @@ Returns the type of the data property associated with the element referenced by [heading Description] Returns the type that will be returned by dereferencing the data property referenced by an associative iterator. -[heading Synposis] +[heading Synopsis] template< 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`. [heading Header] - #include + #include #include [heading Example] diff --git a/doc/notes.qbk b/doc/notes.qbk index 85ccd98d..26a938fb 100644 --- a/doc/notes.qbk +++ b/doc/notes.qbk @@ -58,10 +58,10 @@ In the case: [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 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 themselves in place though member functions such as __push_back__ and __insert__. __mpl__ sequences, on the other hand, are extended through diff --git a/doc/preface.qbk b/doc/preface.qbk index cdf0114f..635b3bde 100644 --- a/doc/preface.qbk +++ b/doc/preface.qbk @@ -13,7 +13,7 @@ [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) is provided, along with views that provide a transformed presentation 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 became apparent that tuples are a powerful means to simplify otherwise tricky 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 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 diff --git a/doc/sequence.qbk b/doc/sequence.qbk index 658fd6e6..40558cb7 100644 --- a/doc/sequence.qbk +++ b/doc/sequence.qbk @@ -541,7 +541,7 @@ Returns 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 -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. [*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 `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. [*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 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, -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. [*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 of the sequence `seq` if `seq` is mutable and `e = o`, where `e` is the N-th element from the beginning of the sequence, is a valid expression. Else, -returns a type convertable to the N-th element from the beginning of the +returns a type convertible to the N-th element from the beginning of the sequence. [*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 the sequence `seq` if `seq` is mutable and `e = o`, where `e` is the element associated with Key, is a valid expression. Else, returns a type -convertable to the element associated with Key. +convertible to the element associated with Key. [*Precondition]: `has_key(seq) == true` @@ -860,7 +860,7 @@ Performs an element by element swap of the elements in 2 sequences. [table [[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] diff --git a/doc/support.qbk b/doc/support.qbk index 4a040015..8c2ef1de 100644 --- a/doc/support.qbk +++ b/doc/support.qbk @@ -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 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] @@ -70,7 +70,7 @@ conforming Fusion __view__, `mpl::false_` otherwise. A view is a specialized sequence that does not actually contain data. Views hold sequences which may be other views. In general, views are held by other views by value, while non-views are held by other views by reference. `is_view` -may be specialized to accomodate clients providing Fusion conforming views. +may be specialized to accommodate clients providing Fusion conforming views. [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__ 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. [heading Synopsis] diff --git a/doc/tuple.qbk b/doc/tuple.qbk index 6f8e829f..b82a61c0 100644 --- a/doc/tuple.qbk +++ b/doc/tuple.qbk @@ -62,7 +62,7 @@ The __tr1__tuple__ type provides a default constructor, a constructor that takes tuple(); -[*Requirements]: Each `Ti` is default constructable. +[*Requirements]: Each `Ti` is default-constructible. [*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); -[*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`. diff --git a/doc/view.qbk b/doc/view.qbk index 522b2599..f06705bf 100644 --- a/doc/view.qbk +++ b/doc/view.qbk @@ -484,7 +484,7 @@ defined in the implemented models. [heading Description] `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. [heading Header] @@ -494,7 +494,7 @@ the elements to iterate over. [heading Synopsis] - template + template struct nview; template @@ -507,7 +507,7 @@ the elements to iterate over. [[Parameter] [Description] [Default]] [[`Sequence`] [An arbitrary Fusion __forward_sequence__] []] - [[`Indicies`] [A `mpl::vector_c` holding the indicies defining + [[`Indices`] [A `mpl::vector_c` holding the indices defining the required iteration order.] []] [[`I1`, `I2`, `I3`...] [A list of integers specifying the required iteration order.] [`INT_MAX` for `I2`, `I3`...]] @@ -530,7 +530,7 @@ defined in __random_access_sequence__. [table [[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`.]] [[`nv1 = nv2`] [Assigns to an `nview`, `nv1`, from another `nview`, `nv2`.]] ] @@ -540,11 +540,11 @@ of the original Fusion __sequence__ [heading Example] typedef __vector__ vec; - typedef mpl::vector_c indicies; + typedef mpl::vector_c indices; vec v1(1, 'c', 2.0); - std::cout << nview(v1) << std::endl; // (2.0 c 1 2.0 1) + std::cout << nview(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) [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`.]] [[`rv1 = rv2`] [] [Assigns to a `repetitive_view`, `rv1`, from another `repetitive_view`, `rv2`.]] [[`__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]