From 1f2a827df3904b17e3891b5e7e9cca7bd40073c1 Mon Sep 17 00:00:00 2001 From: Beman Dawes Date: Thu, 28 Sep 2000 12:35:46 +0000 Subject: [PATCH] Integrate Tie with other HTML files [SVN r7866] --- iterator_adaptors.htm | 2 +- operators.htm | 2 +- tie.html | 15 +++++++-------- utility.htm | 7 ++++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/iterator_adaptors.htm b/iterator_adaptors.htm index 1a6b8b7..e8494e8 100644 --- a/iterator_adaptors.htm +++ b/iterator_adaptors.htm @@ -617,7 +617,7 @@ uses the three adaptors.
-

Revised 18 Sep 2000

+

Revised 27 Sep 2000

© Copyright Jeremy Siek 2000. Permission to copy, use, modify, sell and distribute this document is granted provided this copyright notice appears in all copies. This document is provided "as is" diff --git a/operators.htm b/operators.htm index a57c536..f97498c 100644 --- a/operators.htm +++ b/operators.htm @@ -585,7 +585,7 @@ complicated than the old one, we think it's worth it to make the library more useful in real world. Alexy Gurtovoy contributed the code which supports the new usage idiom while allowing the library remain backward-compatible.


-

Revised 24 Sep 2000

+

Revised 27 Sep 2000

© Copyright David Abrahams and Beman Dawes 1999-2000. Permission to copy, use, modify, sell and distribute this document is granted provided this copyright notice appears in all copies. This document is provided "as diff --git a/tie.html b/tie.html index 2089aba..1ea78c9 100644 --- a/tie.html +++ b/tie.html @@ -31,7 +31,7 @@ tied<A,B> tie(A& a, B& b);

This is a utility function that makes it more convenient to work with -a function which returns a pair. The effect of the tie() +a function which returns a std::pair<>. The effect of the tie() function is to allow the assignment of the two values of the pair to two separate variables. The idea for this comes from Jaakko Järvi's Binders [i and

-Here is another example that uses tie() for handling -operaitons with tie() for handling operations with std::set.

@@ -92,9 +91,9 @@ main(int, char*[]) for (int k = 0; k < 2; ++k) { boost::tie(i,inserted) = s.insert(new_vals[k]); if (!inserted) - std::cout << *i << " was already in the set." << std::endl; + std::cout << *i << " was already in the set." << std::endl; else - std::cout << *i << " successfully inserted." << std::endl; + std::cout << *i << " successfully inserted." << std::endl; } } { @@ -105,8 +104,8 @@ main(int, char*[]) // Using tie() with a return value of pair<iterator,iterator> boost::tie(i,end) = std::equal_range(vals, vals + 6, 4); - std::cout << "There were " << std::distance(i,end) - << " occurances of " << *i << "." << std::endl; + std::cout << "There were " << std::distance(i,end) + << " occurrences of " << *i << "." << std::endl; // Footnote: of course one would normally just use std::count() // to get this information, but that would spoil the example :) } @@ -117,7 +116,7 @@ The output is:

   3 successfully inserted.
   9 was already in the set.
-  There were 2 occurances of 4.
+  There were 2 occurrences of 4.
 

diff --git a/utility.htm b/utility.htm index 2f0272e..e0f090f 100644 --- a/utility.htm +++ b/utility.htm @@ -16,10 +16,11 @@

Contents

-

Template functions next() and prior()

+

Function templates next() and prior()

Certain data types, such as the C++ Standard Library's forward and bidirectional iterators, do not provide addition and subtraction via operator+() @@ -92,7 +93,7 @@ destructor declarations. He says "Probably this concern is misplaced, becau noncopyable will be used mostly for classes which own resources and thus have non-trivial destruction semantics."


Revised  26 January, 200028 September, 2000

© Copyright boost.org 1999. Permission to copy, use, modify, sell and