diff --git a/include/boost/algorithm/string/case_conv.hpp b/include/boost/algorithm/string/case_conv.hpp index c77e047..d027637 100644 --- a/include/boost/algorithm/string/case_conv.hpp +++ b/include/boost/algorithm/string/case_conv.hpp @@ -115,7 +115,7 @@ namespace boost { An output iterator pointing just after the last inserted character or a copy of the input - \note The second variant of this function provides the strong exception-safety guarantee + \note The second variant of this function provides the strong exception-safety guarantee */ template inline OutputIteratorT diff --git a/include/boost/algorithm/string/erase.hpp b/include/boost/algorithm/string/erase.hpp index cffbcc5..32894ca 100644 --- a/include/boost/algorithm/string/erase.hpp +++ b/include/boost/algorithm/string/erase.hpp @@ -38,8 +38,8 @@ namespace boost { \return An output iterator pointing just after the last inserted character or a modified copy of the input - \note The second variant of this function provides the strong exception-safety guarantee - */ + \note The second variant of this function provides the strong exception-safety guarantee + */ template inline OutputIteratorT erase_range_copy( OutputIteratorT Output, @@ -106,8 +106,8 @@ namespace boost { \param Search A substring to be searched for \return An output iterator pointing just after the last inserted character or a modified copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee + + \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, @@ -175,8 +175,8 @@ namespace boost { \return An output iterator pointing just after the last inserted character or a modified copy of the input - \note The second variant of this function provides the strong exception-safety guarantee - */ + \note The second variant of this function provides the strong exception-safety guarantee + */ template< typename OutputIteratorT, typename Collection1T, @@ -245,7 +245,7 @@ namespace boost { \return An output iterator pointing just after the last inserted character or a modified copy of the input - \note The second variant of this function provides the strong exception-safety guarantee + \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, @@ -313,7 +313,7 @@ namespace boost { \return An output iterator pointing just after the last inserted character or a modified copy of the input - \note The second variant of this function provides the strong exception-safety guarantee + \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, @@ -385,7 +385,7 @@ namespace boost { \return An output iterator pointing just after the last inserted character or a modified copy of the input - \note The second variant of this function provides the strong exception-safety guarantee + \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, @@ -458,7 +458,7 @@ namespace boost { \return An output iterator pointing just after the last inserted character or a modified copy of the input - \note The second variant of this function provides the strong exception-safety guarantee + \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, @@ -534,7 +534,7 @@ namespace boost { \return An output iterator pointing just after the last inserted character or a modified copy of the input - \note The second variant of this function provides the strong exception-safety guarantee + \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, @@ -602,7 +602,7 @@ namespace boost { \return An output iterator pointing just after the last inserted character or a modified copy of the input - \note The second variant of this function provides the strong exception-safety guarantee + \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, @@ -674,7 +674,7 @@ namespace boost { \return An output iterator pointing just after the last inserted character or a modified copy of the input - \note The second variant of this function provides the strong exception-safety guarantee + \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, @@ -742,7 +742,7 @@ namespace boost { \return An output iterator pointing just after the last inserted character or a modified copy of the input - \note The second variant of this function provides the strong exception-safety guarantee + \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, diff --git a/include/boost/algorithm/string/find.hpp b/include/boost/algorithm/string/find.hpp index 372e677..4bf92ea 100644 --- a/include/boost/algorithm/string/find.hpp +++ b/include/boost/algorithm/string/find.hpp @@ -64,7 +64,7 @@ namespace boost { \c CollectionT::const_iterator, depending on the constness of the input parameter. - \note This function provides the strong exception-safety guarantee + \note This function provides the strong exception-safety guarantee */ template inline iterator_range< @@ -91,7 +91,7 @@ namespace boost { \c Collection1T::const_iterator, depending on the constness of the input parameter. - \note This function provides the strong exception-safety guarantee + \note This function provides the strong exception-safety guarantee */ template inline iterator_range< @@ -119,7 +119,7 @@ namespace boost { \c Collection1T::const_iterator, depending on the constness of the input parameter. - \note This function provides the strong exception-safety guarantee + \note This function provides the strong exception-safety guarantee */ template inline iterator_range< @@ -145,9 +145,9 @@ namespace boost { Returned iterator is either \c Collection1T::iterator or \c Collection1T::const_iterator, depending on the constness of the input parameter. - - \note This function provides the strong exception-safety guarantee - */ + + \note This function provides the strong exception-safety guarantee + */ template inline iterator_range< BOOST_STRING_TYPENAME result_iterator_of::type> @@ -204,7 +204,7 @@ namespace boost { the input parameter. - \note This function provides the strong exception-safety guarantee + \note This function provides the strong exception-safety guarantee */ template inline iterator_range< @@ -235,7 +235,7 @@ namespace boost { \c Collection1T::const_iterator, depending on the constness of the input parameter. - \note This function provides the strong exception-safety guarantee + \note This function provides the strong exception-safety guarantee */ template inline iterator_range< @@ -265,8 +265,8 @@ namespace boost { the input parameter. - \note This function provides the strong exception-safety guarantee - */ + \note This function provides the strong exception-safety guarantee + */ template inline iterator_range< BOOST_STRING_TYPENAME result_iterator_of::type> @@ -294,9 +294,9 @@ namespace boost { Returned iterator is either \c CollectionT::iterator or \c CollectionT::const_iterator, depending on the constness of the input parameter. - - \note This function provides the strong exception-safety guarantee - */ + + \note This function provides the strong exception-safety guarantee + */ template inline iterator_range< BOOST_STRING_TYPENAME result_iterator_of::type> diff --git a/include/boost/algorithm/string/find_format.hpp b/include/boost/algorithm/string/find_format.hpp index d291d80..7f6c436 100644 --- a/include/boost/algorithm/string/find_format.hpp +++ b/include/boost/algorithm/string/find_format.hpp @@ -43,7 +43,7 @@ namespace boost { \return An output iterator pointing just after the last inserted character or a modified copy of the input - \note The second variant of this function provides the strong exception-safety guarantee + \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, @@ -154,7 +154,7 @@ namespace boost { \return An output iterator pointing just after the last inserted character or a modified copy of the input - \note The second variant of this function provides the strong exception-safety guarantee + \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, diff --git a/include/boost/algorithm/string/predicate.hpp b/include/boost/algorithm/string/predicate.hpp index dd533b7..d74f6a7 100644 --- a/include/boost/algorithm/string/predicate.hpp +++ b/include/boost/algorithm/string/predicate.hpp @@ -44,8 +44,8 @@ namespace boost { \param Comp An element comparison predicate \return The result of the test - \note This function provides the strong exception-safety guarantee - */ + \note This function provides the strong exception-safety guarantee + */ template inline bool starts_with( const Collection1T& Input, @@ -96,7 +96,7 @@ namespace boost { \param Loc A locale used for case insensitive comparison \return The result of the test - \note This function provides the strong exception-safety guarantee + \note This function provides the strong exception-safety guarantee */ template inline bool istarts_with( @@ -123,7 +123,7 @@ namespace boost { \param Comp An element comparison predicate \return The result of the test - \note This function provides the strong exception-safety guarantee + \note This function provides the strong exception-safety guarantee */ template inline bool ends_with( @@ -170,7 +170,7 @@ namespace boost { \param Loc A locale used for case insensitive comparison \return The result of the test - \note This function provides the strong exception-safety guarantee + \note This function provides the strong exception-safety guarantee */ template inline bool iends_with( @@ -194,7 +194,7 @@ namespace boost { \param Comp An element comparison predicate \return The result of the test - \note This function provides the strong exception-safety guarantee + \note This function provides the strong exception-safety guarantee */ template inline bool contains( @@ -233,7 +233,7 @@ namespace boost { \param Loc A locale used for case insensitive comparison \return The result of the test - \note This function provides the strong exception-safety guarantee + \note This function provides the strong exception-safety guarantee */ template inline bool icontains( diff --git a/include/boost/algorithm/string/regex.hpp b/include/boost/algorithm/string/regex.hpp index d38dc9b..ca22da7 100644 --- a/include/boost/algorithm/string/regex.hpp +++ b/include/boost/algorithm/string/regex.hpp @@ -41,7 +41,7 @@ namespace boost { \c InputContainerT::const_iterator, depending on the constness of the input parameter. - \note This function provides the strong exception-safety guarantee + \note This function provides the strong exception-safety guarantee */ template< typename CollectionT, @@ -75,7 +75,7 @@ namespace boost { \return An output iterator pointing just after the last inserted character or a modified copy of the input - \note The second variant of this function provides the strong exception-safety guarantee + \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, @@ -161,7 +161,7 @@ namespace boost { \return An output iterator pointing just after the last inserted character or a modified copy of the input - \note The second variant of this function provides the strong exception-safety guarantee + \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, @@ -246,7 +246,7 @@ namespace boost { \return An output iterator pointing just after the last inserted character or a modified copy of the input - \note The second variant of this function provides the strong exception-safety guarantee + \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, @@ -325,7 +325,7 @@ namespace boost { \return An output iterator pointing just after the last inserted character or a modified copy of the input - \note The second variant of this function provides the strong exception-safety guarantee + \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, @@ -410,8 +410,8 @@ namespace boost { \note Prior content of the result will be overwritten. - \note This function provides the strong exception-safety guarantee - */ + \note This function provides the strong exception-safety guarantee + */ template< typename SequenceSequenceT, typename CollectionT, @@ -451,7 +451,7 @@ namespace boost { \note Prior content of the result will be overwritten. - \note This function provides the strong exception-safety guarantee + \note This function provides the strong exception-safety guarantee */ template< typename SequenceSequenceT, diff --git a/include/boost/algorithm/string/replace.hpp b/include/boost/algorithm/string/replace.hpp index 1d7fbcb..ebd0f08 100644 --- a/include/boost/algorithm/string/replace.hpp +++ b/include/boost/algorithm/string/replace.hpp @@ -41,7 +41,7 @@ namespace boost { \return An output iterator pointing just after the last inserted character or a modified copy of the input - \note The second variant of this function provides the strong exception-safety guarantee + \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, @@ -119,7 +119,7 @@ namespace boost { \return An output iterator pointing just after the last inserted character or a modified copy of the input - \note The second variant of this function provides the strong exception-safety guarantee + \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, @@ -194,7 +194,7 @@ namespace boost { \return An output iterator pointing just after the last inserted character or a modified copy of the input - \note The second variant of this function provides the strong exception-safety guarantee + \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, @@ -272,7 +272,7 @@ namespace boost { \return An output iterator pointing just after the last inserted character or a modified copy of the input - \note The second variant of this function provides the strong exception-safety guarantee + \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, @@ -347,7 +347,7 @@ namespace boost { \return An output iterator pointing just after the last inserted character or a modified copy of the input - \note The second variant of this function provides the strong exception-safety guarantee + \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, @@ -427,7 +427,7 @@ namespace boost { \return An output iterator pointing just after the last inserted character or a modified copy of the input - \note The second variant of this function provides the strong exception-safety guarantee + \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, @@ -507,7 +507,7 @@ namespace boost { \return An output iterator pointing just after the last inserted character or a modified copy of the input - \note The second variant of this function provides the strong exception-safety guarantee + \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, @@ -589,7 +589,7 @@ namespace boost { \return An output iterator pointing just after the last inserted character or a modified copy of the input - \note The second variant of this function provides the strong exception-safety guarantee + \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, @@ -665,7 +665,7 @@ namespace boost { \return An output iterator pointing just after the last inserted character or a modified copy of the input - \note The second variant of this function provides the strong exception-safety guarantee + \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, @@ -745,7 +745,7 @@ namespace boost { \return An output iterator pointing just after the last inserted character or a modified copy of the input - \note The second variant of this function provides the strong exception-safety guarantee + \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, @@ -821,7 +821,7 @@ namespace boost { \return An output iterator pointing just after the last inserted character or a modified copy of the input - \note The second variant of this function provides the strong exception-safety guarantee + \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, diff --git a/include/boost/algorithm/string/split.hpp b/include/boost/algorithm/string/split.hpp index 5873e73..6e15590 100644 --- a/include/boost/algorithm/string/split.hpp +++ b/include/boost/algorithm/string/split.hpp @@ -56,7 +56,7 @@ namespace boost { \note Prior content of the result will be overwritten. - \note This function provides the strong exception-safety guarantee + \note This function provides the strong exception-safety guarantee */ template< typename SequenceSequenceT, typename Collection1T, typename Collection2T > inline SequenceSequenceT& find_all( @@ -91,7 +91,7 @@ namespace boost { \note Prior content of the result will be overwritten. - \note This function provides the strong exception-safety guarantee + \note This function provides the strong exception-safety guarantee */ template< typename SequenceSequenceT, typename Collection1T, typename Collection2T > inline SequenceSequenceT& ifind_all( @@ -134,7 +134,7 @@ namespace boost { \note Prior content of the result will be overwritten. - \note This function provides the strong exception-safety guarantee + \note This function provides the strong exception-safety guarantee */ template< typename SequenceSequenceT, typename CollectionT, typename PredicateT > inline SequenceSequenceT& split( diff --git a/include/boost/algorithm/string/trim.hpp b/include/boost/algorithm/string/trim.hpp index 59da30e..9aa597d 100644 --- a/include/boost/algorithm/string/trim.hpp +++ b/include/boost/algorithm/string/trim.hpp @@ -37,7 +37,7 @@ namespace boost { //! Left trim - parametric /*! Remove all leading spaces from the input. - The supplied predicate is used to determine which characters are considered spaces. + The supplied predicate is used to determine which characters are considered spaces. The result is a trimmed copy of the input. It is returned as a sequence or copied to the output iterator @@ -48,7 +48,7 @@ namespace boost { An output iterator pointing just after the last inserted character or a copy of the input - \note The second variant of this function provides the strong exception-safety guarantee + \note The second variant of this function provides the strong exception-safety guarantee */ template inline OutputIteratorT trim_left_copy_if( @@ -91,7 +91,7 @@ namespace boost { \param Loc a locale used for 'space' classification \return A trimmed copy of the input - \note This function provides the strong exception-safety guarantee + \note This function provides the strong exception-safety guarantee */ template inline SequenceT trim_left_copy(const SequenceT& Input, const std::locale& Loc=std::locale()) @@ -104,8 +104,8 @@ namespace boost { //! Left trim /*! - Remove all leading spaces from the input. The supplied predicate is - used to determine which characters are considered spaces. + Remove all leading spaces from the input. The supplied predicate is + used to determine which characters are considered spaces. The input sequence is modified in-place. \param Input An input sequence @@ -142,8 +142,8 @@ namespace boost { //! Right trim - parametric /*! - Remove all trailing spaces from the input. - The supplied predicate is used to determine which characters are considered spaces. + Remove all trailing spaces from the input. + The supplied predicate is used to determine which characters are considered spaces. The result is a trimmed copy of the input. It is returned as a sequence or copied to the output iterator @@ -154,7 +154,7 @@ namespace boost { An output iterator pointing just after the last inserted character or a copy of the input - \note The second variant of this function provides the strong exception-safety guarantee + \note The second variant of this function provides the strong exception-safety guarantee */ template inline OutputIteratorT trim_right_copy_if( @@ -198,8 +198,8 @@ namespace boost { \param Loc A locale used for 'space' classification \return A trimmed copy of the input - \note This function provides the strong exception-safety guarantee - */ + \note This function provides the strong exception-safety guarantee + */ template inline SequenceT trim_right_copy(const SequenceT& Input, const std::locale& Loc=std::locale()) { @@ -212,8 +212,8 @@ namespace boost { //! Right trim - parametric /*! - Remove all trailing spaces from the input. - The supplied predicate is used to determine which characters are considered spaces. + Remove all trailing spaces from the input. + The supplied predicate is used to determine which characters are considered spaces. The input sequence is modified in-place. \param Input An input sequence @@ -253,7 +253,7 @@ namespace boost { //! Trim - parametric /*! Remove all trailing and leading spaces from the input. - The supplied predicate is used to determine which characters are considered spaces. + The supplied predicate is used to determine which characters are considered spaces. The result is a trimmed copy of the input. It is returned as a sequence or copied to the output iterator @@ -264,7 +264,7 @@ namespace boost { An output iterator pointing just after the last inserted character or a copy of the input - \note The second variant of this function provides the strong exception-safety guarantee + \note The second variant of this function provides the strong exception-safety guarantee */ template inline OutputIteratorT trim_copy_if( @@ -321,7 +321,7 @@ namespace boost { \param Loc A locale used for 'space' classification \return A trimmed copy of the input - \note This function provides the strong exception-safety guarantee + \note This function provides the strong exception-safety guarantee */ template inline SequenceT trim_copy( const SequenceT& Input, const std::locale& Loc=std::locale() ) @@ -335,7 +335,7 @@ namespace boost { //! Trim /*! Remove all leading and trailing spaces from the input. - The supplied predicate is used to determine which characters are considered spaces. + The supplied predicate is used to determine which characters are considered spaces. The input sequence is modified in-place. \param Input An input sequence diff --git a/string/doc/concept.xml b/string/doc/concept.xml index 91e52af..b615ead 100644 --- a/string/doc/concept.xml +++ b/string/doc/concept.xml @@ -75,7 +75,7 @@ - Various algorithms need to perform a search in a container and a Finder is a generalization of such + Various algorithms need to perform a search in a container and a Finder is a generalization of such search operations that allows algorithms to abstract from searching. For instance, generic replace algorithms can replace any part of the input, and the Finder is used to select the desired one. @@ -106,7 +106,7 @@ struct simple_finder - Function Finder. Finder can be any function object. That is, any ordinary function with the + Function Finder. Finder can be any function object. That is, any ordinary function with the required signature can be used as well. However, such a function can be used only for a specific iterator type. @@ -165,8 +165,8 @@ boost::iterator_range<std::string> simple_finder( - Formatter implemented as a class. This Formatter does not perform any formating and - returns the match, repackaged. operator() + Formatter implemented as a class. This Formatter does not perform any formating and + returns the match, repackaged. operator() is templated, so that the Formatter can be used on any Finder type. diff --git a/string/doc/credits.xml b/string/doc/credits.xml index 39f3c3c..bc16d90 100644 --- a/string/doc/credits.xml +++ b/string/doc/credits.xml @@ -6,10 +6,10 @@
Acknowledgments - The author would like to thank everybody who gave suggestions and comments. Especially valuable - were the contributions of Thorsten Ottosen, Jeff Garland and the other boost members who participated - in the review process, namely David Abrahams, Daniel Frey, Beman Dawes, John Maddock, David B.Held, Pavel Vozenilek - and many other. + The author would like to thank everybody who gave suggestions and comments. Especially valuable + were the contributions of Thorsten Ottosen, Jeff Garland and the other boost members who participated + in the review process, namely David Abrahams, Daniel Frey, Beman Dawes, John Maddock, David B.Held, Pavel Vozenilek + and many other.
diff --git a/string/doc/design.xml b/string/doc/design.xml index de34ebc..20598b5 100644 --- a/string/doc/design.xml +++ b/string/doc/design.xml @@ -42,7 +42,7 @@
In the reference and also in the code, requirement on the string type is designated by the name of - template argument. CollectionT means that the basic collection requirements must hold. + template argument. CollectionT means that the basic collection requirements must hold. SequenceT designates extended sequence requirements. @@ -61,13 +61,13 @@ It is possible to encapsulate a range in std::pair<>, but - std::pair<> is an overly generic encapsulation, so it is not best match for a range. - For instance, it does not enforce that begin and end iterators be of the same type. + std::pair<> is an overly generic encapsulation, so it is not best match for a range. + For instance, it does not enforce that begin and end iterators be of the same type. Naturally the range concept is heavily used also in this library. During the development of - the library, it was discovered, that there is a need for a reasonable encapsulation for it, since - core part of the library deals with substring searching algorithms and any such algorithm + the library, it was discovered, that there is a need for a reasonable encapsulation for it, since + core part of the library deals with substring searching algorithms and any such algorithm returns a range delimiting the result of the search. std::pair<> was deemed as unsuitable. Therefore the iterator_range was defined. @@ -76,7 +76,7 @@ a basic interface for common operations. Its interface is similar to that of a collection. In addition to begin() and end() accessors, it has member functions for checking whether the range is empty, - or to determine the size of the range. It also has a set of member typedefs that extract + or to determine the size of the range. It also has a set of member typedefs that extract type information from the encapsulated iterators. As such, the interface is compatible with the collection traits requirements so it is possible to use this class as a parameter to many algorithms in this library. @@ -206,15 +206,15 @@ Sequence Traits - The major difference between std::list and std::vector is not in the interfaces - they provide, but rather in the inner details of the class and the way how it performs + The major difference between std::list and std::vector is not in the interfaces + they provide, but rather in the inner details of the class and the way how it performs various operations. The problem is that it is not possible to infer this difference from the definitions of classes without some special mechanism. However, some algorithms can run significantly faster with the knowledge of the properties of a particular container. - Sequence traits allow one to specify additional properties of a sequence container (see Std.§32.2). + Sequence traits allow one to specify additional properties of a sequence container (see Std.§32.2). These properties are then used by algorithms to select optimized handling for some operations. The sequence traits are declared in the header boost/algorithm/string/sequence_traits.hpp. @@ -311,7 +311,7 @@ As usual, the implementation of the lower layer is designed to work with a generic sequence while - taking advantage of specific features if possible + taking advantage of specific features if possible (by using Sequence traits) @@ -322,7 +322,7 @@ Find iterators are a logical extension of the find facility. Instead of searching for one match, the whole input can be iteratively searched for multiple matches. The result of the search is then used to partition the input. It depends on the algorithms which parts - are returned as the result. They can be the matching parts (find_iterator) of the parts in + are returned as the result. They can be the matching parts (find_iterator) of the parts in between (split_iterator). @@ -334,40 +334,40 @@
Exception Safety - - The library requires that all operations on types used as template - or function arguments provide the basic exception-safety guarantee. - In turn, all functions and algorithms in this library, except where stated - otherwise, will provide the basic exception-safety guarantee. - In other words: - The library maintains its invariants and does not leak resources in - the face of exceptions. Some library operations give stronger - guarantees, which are documented on an individual basis. - - - - Some functions can provide the strong exception-safety guarantee. - That means that following statements are true: - - - If an exception is thrown, there are no effects other than those - of the function - - - If an exception is thrown other than by the function, there are no effects - - - This guarantee can be provided under the condition that the operations - on the types used for arguments for these functions either - provide the strong exception guarantee or do not alter the global state . - - - In the reference, under the term strong exception-safety guarantee, we mean the - guarantee as defined above. - - - For more information about the exception safety topics, follow this - link - -
+ + The library requires that all operations on types used as template + or function arguments provide the basic exception-safety guarantee. + In turn, all functions and algorithms in this library, except where stated + otherwise, will provide the basic exception-safety guarantee. + In other words: + The library maintains its invariants and does not leak resources in + the face of exceptions. Some library operations give stronger + guarantees, which are documented on an individual basis. + + + + Some functions can provide the strong exception-safety guarantee. + That means that following statements are true: + + + If an exception is thrown, there are no effects other than those + of the function + + + If an exception is thrown other than by the function, there are no effects + + + This guarantee can be provided under the condition that the operations + on the types used for arguments for these functions either + provide the strong exception guarantee or do not alter the global state . + + + In the reference, under the term strong exception-safety guarantee, we mean the + guarantee as defined above. + + + For more information about the exception safety topics, follow this + link + + diff --git a/string/doc/quickref.xml b/string/doc/quickref.xml index ad64715..51a0114 100644 --- a/string/doc/quickref.xml +++ b/string/doc/quickref.xml @@ -200,7 +200,7 @@ find_tail - Retrieve the tail of a string + Retrieve the tail of a string find_tail() @@ -340,7 +340,7 @@ replace/erase_tail - Replace/Erase the tail of the input + Replace/Erase the tail of the input replace_tail() @@ -650,7 +650,7 @@ is_lower() - + is_print Recognize printable characters diff --git a/string/doc/rationale.xml b/string/doc/rationale.xml index 4df7246..efbd502 100644 --- a/string/doc/rationale.xml +++ b/string/doc/rationale.xml @@ -19,14 +19,14 @@ C++ allows to work with multiple different instances of locales at once. If an algorithm manipulates some data in a way that requires the usage of locales, there must be a way to specify them. However, one instance of locales is sufficient for most of the applications, - and for a user it could be very tedious to specify which locales to use at every place + and for a user it could be very tedious to specify which locales to use at every place where it is needed.
Fortunately, the C++ standard allows to specify the global locales (using static member function std:locale::global()). When instantiating an std::locale class without explicit information, the instance will - be initialized with the global locale. This implies, that if an algorithm needs a locale, + be initialized with the global locale. This implies, that if an algorithm needs a locale, it should have an std::locale parameter defaulting to std::locale(). If a user needs to specify locales explicitly, she can do so. Otherwise the global locales are used. diff --git a/string/doc/usage.xml b/string/doc/usage.xml index d86e362..47e164e 100644 --- a/string/doc/usage.xml +++ b/string/doc/usage.xml @@ -41,16 +41,16 @@ Unlike in the STL algorithms, parameters are not specified only in the form of iterators. The STL convention allows for great flexibility, but it has several limitations. It is not possible to stack algorithms together, - because a container is passed in two parameters. Therefore it is not possible to use + because a container is passed in two parameters. Therefore it is not possible to use a return value from another algorithm. It is considerably easier to write - to_lower(str1), than to_lower(str1.begin(), str1.end()). + to_lower(str1), than to_lower(str1.begin(), str1.end()). The magic of collection_traits provides a uniform way of handling different string types. If there is a need to pass a pair of iterators, iterator_range - can be used to package iterators into a structure with a compatible interface. + can be used to package iterators into a structure with a compatible interface.
@@ -72,7 +72,7 @@ Naming: Naming follows the conventions from the Standard C++ Library. If there is a - copy and a mutable version of the same algorithm, the mutable version has no suffix + copy and a mutable version of the same algorithm, the mutable version has no suffix and the copy version has the suffix _copy. Some algorithms have the prefix i (e.g. ifind_first()). @@ -135,7 +135,7 @@ << endl; // prints "hello world! is written in the lower case" - The predicates determine whether if a substring is contained in the input string + The predicates determine whether if a substring is contained in the input string under various conditions. The conditions are: a string starts with the substring, ends with the substring, simply contains the substring or if both strings are equal. See the reference for @@ -148,7 +148,7 @@ useful string-related predicates and combinators ready for use. These are located in the boost/algorithm/string/classification.hpp header. Classification predicates can be combined using logical combinators to form - a more complex expressions. For example: is_from_range('a','z') || is_digit() + a more complex expressions. For example: is_from_range('a','z') || is_digit()
@@ -190,13 +190,13 @@ transform( result.begin(), result.end(), result.begin(), bind2nd(plus<char>(), 1) ); // text = "hello dommy!" - to_upper(result); // text == "hello doMMy!" + to_upper(result); // text == "hello doMMy!" - // iterator_range is convertible to bool - if(find_first(text, "dolly")) - { - cout << "Dolly is there" << endl; - } + // iterator_range is convertible to bool + if(find_first(text, "dolly")) + { + cout << "Dolly is there" << endl; + } We have used find_last() to search the text for "ll". @@ -208,10 +208,10 @@ char[] because this type is supported by collection_traits. - The following lines transform the result. Notice that - iterator_range has familiar - begin() and end() methods, so it can be used like any other STL container. - Also it is convertible to bool therefore it is easy to use find algorithms for a simple containment checking. + The following lines transform the result. Notice that + iterator_range has familiar + begin() and end() methods, so it can be used like any other STL container. + Also it is convertible to bool therefore it is easy to use find algorithms for a simple containment checking. Find algorithms are located in boost/algorithm/string/find.hpp. @@ -261,8 +261,8 @@ There are two iterators provided find_iterator and - split_iterator. The former iterates over substrings that are found using the specified - Finder. The latter iterates over the gaps between these substrings. + split_iterator. The former iterates over substrings that are found using the specified + Finder. The latter iterates over the gaps between these substrings. string str1("abc-*-ABC-*-aBc"); @@ -312,8 +312,8 @@ Split algorithms are an extension to the find iterator for one common usage scenario. These algorithms use a find iterator and store all matches into the provided - container. This container must be able to hold copies (e.g. std::string) or - references (e.g. iterator_range) of the extracted substrings. + container. This container must be able to hold copies (e.g. std::string) or + references (e.g. iterator_range) of the extracted substrings. Two algorithms are provided. find_all() finds all copies @@ -328,7 +328,7 @@ find_vector_type FindVec; // #1: Search for separators ifind_all( FindVec, str1, "abc" ); // FindVec == { [abc],[ABC],[aBc] } - typedef vector< string > split_vector_type; + typedef vector< string > split_vector_type; split_vector_type SplitVec; // #2: Search for tokens split( SplitVec, str1, is_any_of<char>("-*") ); // SplitVec == { "hello abc","ABC","aBc goodbye" }