Compare commits

...

7 Commits

Author SHA1 Message Date
nobody
7fd05427ee This commit was manufactured by cvs2svn to create tag
'Version_1_18_0'.

[SVN r7873]
2000-09-29 11:39:43 +00:00
Beman Dawes
c5915c23e7 Fix broken link
[SVN r7870]
2000-09-28 17:47:29 +00:00
Beman Dawes
1f2a827df3 Integrate Tie with other HTML files
[SVN r7866]
2000-09-28 12:35:46 +00:00
Beman Dawes
f51ee4ef2e Initial Graph and Regex HTML integration
[SVN r7849]
2000-09-26 19:02:50 +00:00
Jeremy Siek
75aadf0509 removed tabs
[SVN r7835]
2000-09-25 21:19:29 +00:00
Jeremy Siek
4f9b0bcb9b disabled warning about operator-> not returning a UDT. If operator->
does not get called, it should not be checked for this error. This
showed up when using an iterator with value_type=int.


[SVN r7813]
2000-09-25 05:36:21 +00:00
Beman Dawes
9628e5adb0 Fix broken links
[SVN r7770]
2000-09-22 18:09:04 +00:00
8 changed files with 29 additions and 26 deletions

View File

@@ -16,7 +16,7 @@
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../c++boost.gif"
ALT="C++ Boost">
ALT="C++ Boost" width="277" height="86">
<!--end header-->
<BR Clear>
<H1>CopyConstructible</H1>

View File

@@ -15,7 +15,7 @@
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../c++boost.gif"
ALT="C++ Boost">
ALT="C++ Boost" width="277" height="86">
<BR Clear>

View File

@@ -69,6 +69,10 @@
#pragma set woff 1234
#endif
#if defined(BOOST_MSVC)
# pragma warning( disable : 4284 ) // complaint about return type of
#endif // operator-> not begin a UDT
namespace boost {
namespace detail {

View File

@@ -78,9 +78,9 @@ namespace boost
inline tied(A& a, B& b) : _a(a), _b(b) { }
template <class U, class V>
inline tied& operator=(const std::pair<U,V>& p) {
_a = p.first;
_b = p.second;
return *this;
_a = p.first;
_b = p.second;
return *this;
}
protected:
A& _a;

View File

@@ -617,7 +617,7 @@ uses the three adaptors.
<hr>
<p>Revised <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan -->17 Jun 2000<!--webbot bot="Timestamp" endspan i-checksum="15055" --></p>
<p>Revised <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan -->27 Sep 2000<!--webbot bot="Timestamp" endspan i-checksum="14936" --></p>
<p><EFBFBD> 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 &quot;as is&quot;

View File

@@ -11,8 +11,8 @@
<h1><img src="../../c++boost.gif" alt="c++boost.gif (8819 bytes)" align="center" width="277" height="86">Header
<a href="../../boost/operators.hpp">boost/operators.hpp</a></h1>
<p>Header <a href="file:///c:/boost/site/boost/operators.hpp">boost/operators.hpp</a>
supplies (in namespace boost) several sets of templates:</p>
<p>Header <a href="../../boost/operators.hpp">boost/operators.hpp</a> supplies
(in namespace boost) several sets of templates:</p>
<ul>
<li><a href="#Arithmetic">Arithmetic operators</a>.
<li><a href="#deref and helpers">Dereference operators and iterator helpers.</a></li>
@@ -43,10 +43,10 @@ additional operators, such as operator&gt;, &lt;=, &gt;=, and +.&nbsp; <a href="
forms</a> of the templates are also provided to allow interaction with other
types.</p>
<p><a href="http://www.boost.org/people/dave_abrahams.htm">Dave Abrahams</a>
started the library and contributed the arithmetic operators in <a href="file:///c:/boost/site/boost/operators.hpp">boost/operators.hpp</a>.<br>
started the library and contributed the arithmetic operators in <a href="../../boost/operators.hpp">boost/operators.hpp</a>.<br>
<a href="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</a>
contributed the <a href="#deref and helpers">dereference operators and iterator
helpers</a> in <a href="file:///c:/boost/site/boost/operators.hpp">boost/operators.hpp</a>.<br>
helpers</a> in <a href="../../boost/operators.hpp">boost/operators.hpp</a>.<br>
<a href="http://www.boost.org/people/aleksey_gurtovoy.htm">Aleksey Gurtovoy</a>
contributed the code to support <a href="#chaining">base class chaining</a>
while remaining backward-compatible with old versions of the library.<br>
@@ -60,7 +60,7 @@ x &gt;= y,</code> and <code>x &lt;= y</code>. Moreover, unless your class has
really surprising behavior, some of these related operators can be defined in
terms of others (e.g. <code>x &gt;= y <b>&lt;=&gt;</b> !(x &lt; y)</code>).
Replicating this boilerplate for multiple classes is both tedious and
error-prone. The <a href="file:///c:/boost/site/boost/operators.hpp">boost/operators.hpp</a>
error-prone. The <a href="../../boost/operators.hpp">boost/operators.hpp</a>
templates help by generating operators for you at namespace scope based on other
operators you've defined in your class.</p>
<a name="two_arg">
@@ -585,8 +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.</p>
<hr>
<p>Revised <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan -->03 Aug 2000<!--webbot bot="Timestamp" endspan i-checksum="14750" -->
</p>
<p>Revised <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan -->27 Sep 2000<!--webbot bot="Timestamp" endspan i-checksum="14936" --></p>
<p><EFBFBD> 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 &quot;as

View File

@@ -15,7 +15,7 @@
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../c++boost.gif"
ALT="C++ Boost">
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -31,11 +31,11 @@ tied&lt;A,B&gt; tie(A&amp; a, B&amp; b);
<P>
This is a utility function that makes it more convenient to work with
a function which returns a pair. The effect of the <TT>tie()</TT>
a function which returns a std::pair&lt;&gt;. The effect of the <TT>tie()</TT>
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&#228;rvi's Binders&nbsp;[<A
HREF="bibliography.html#jaakko_tuple_assign">1</A>].
HREF="../graph/docs/bibliography.html#jaakko_tuple_assign">1</A>].
<P>
@@ -63,8 +63,7 @@ pair of iterators is assigned to the iterator variables <TT>i</TT> and
</PRE>
<P>
Here is another example that uses <TT>tie()</TT> for handling
operaitons with <a
Here is another example that uses <TT>tie()</TT> for handling operations with <a
href="http://www.sgi.com/Technology/STL/set.html"><TT>std::set</TT></a>.
<P>
@@ -92,9 +91,9 @@ main(int, char*[])
for (int k = 0; k &lt; 2; ++k) {
boost::tie(i,inserted) = s.insert(new_vals[k]);
if (!inserted)
std::cout &lt;&lt; *i &lt;&lt; " was already in the set." &lt;&lt; std::endl;
std::cout &lt;&lt; *i &lt;&lt; &quot; was already in the set.&quot; &lt;&lt; std::endl;
else
std::cout &lt;&lt; *i &lt;&lt; " successfully inserted." &lt;&lt; std::endl;
std::cout &lt;&lt; *i &lt;&lt; &quot; successfully inserted.&quot; &lt;&lt; std::endl;
}
}
{
@@ -105,8 +104,8 @@ main(int, char*[])
// Using tie() with a return value of pair&lt;iterator,iterator&gt;
boost::tie(i,end) = std::equal_range(vals, vals + 6, 4);
std::cout &lt;&lt; "There were " &lt;&lt; std::distance(i,end)
&lt;&lt; " occurances of " &lt;&lt; *i &lt;&lt; "." &lt;&lt; std::endl;
std::cout &lt;&lt; &quot;There were &quot; &lt;&lt; std::distance(i,end)
&lt;&lt; &quot; occurrences of &quot; &lt;&lt; *i &lt;&lt; &quot;.&quot; &lt;&lt; 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:
<PRE>
3 successfully inserted.
9 was already in the set.
There were 2 occurances of 4.
There were 2 occurrences of 4.
</PRE>
<br>

View File

@@ -16,10 +16,11 @@
<h2>Contents</h2>
<ul>
<li>Template functions <a href="#functions next">next() and prior()</a></li>
<li>Function templates <a href="#functions next">next() and prior()</a></li>
<li>Class <a href="#Class noncopyable">noncopyable</a></li>
<li>Function template <a href="tie.html">tie()</a> and supporting class tied.</li>
</ul>
<h2>Template <a name="functions next">functions next</a>() and prior()</h2>
<h2> <a name="functions next">Function</a> templates next() and prior()</h2>
<p>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 &quot;Probably this concern is misplaced, becau
noncopyable will be used mostly for classes which own resources and thus have non-trivial destruction semantics.&quot;</p>
<hr>
<p>Revised&nbsp; <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan
-->26 January, 2000<!--webbot bot="Timestamp" endspan i-checksum="38194"
-->28 September, 2000<!--webbot bot="Timestamp" endspan i-checksum="39343"
-->
</p>
<p><EFBFBD> Copyright boost.org 1999. Permission to copy, use, modify, sell and