[DEV] add v1.76.0

This commit is contained in:
2021-10-05 21:37:46 +02:00
parent a97e9ae7d4
commit d0115b733d
45133 changed files with 4744437 additions and 1026325 deletions

View File

@@ -0,0 +1,90 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Reference</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../any.html" title="Chapter 4. Boost.Any">
<link rel="prev" href="s02.html" title="Examples">
<link rel="next" href="../boost/bad_any_cast.html" title="Class bad_any_cast">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="s02.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../any.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../boost/bad_any_cast.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="any.reference"></a>Reference</h2></div></div></div>
<div class="toc"><dl class="toc">
<dt><span class="section"><a href="reference.html#any.ValueType"><span class="emphasis"><em>ValueType</em></span> requirements</a></span></dt>
<dt><span class="section"><a href="reference.html#header.boost.any_hpp">Header &lt;boost/any.hpp&gt;</a></span></dt>
</dl></div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="any.ValueType"></a><span class="emphasis"><em>ValueType</em></span> requirements</h3></div></div></div>
<p>Values are strongly informational objects for which
identity is not significant, i.e. the focus is principally on
their state content and any behavior organized around
that. Another distinguishing feature of values is their
granularity: normally fine-grained objects representing simple
concepts in the system such as quantities.</p>
<p>As the emphasis of a value lies in its state not its
identity, values can be copied and typically assigned one to
another, requiring the explicit or implicit definition of a
public copy constructor and public assignment operator. Values
typically live within other scopes, i.e. within objects or
blocks, rather than on the heap. Values are therefore normally
passed around and manipulated directly as variables or through
references, but not as pointers that emphasize identity and
indirection.</p>
<p>The specific requirements on value types to be used in an
<code class="computeroutput"><a class="link" href="../boost/any.html" title="Class any">any</a></code>
are:</p>
<div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: disc; ">
<li class="listitem">A <span class="emphasis"><em>ValueType</em></span> is
<span class="emphasis"><em>CopyConstructible</em></span> [20.1.3].</li>
<li class="listitem">The destructor for a
<span class="emphasis"><em>ValueType</em></span> upholds the no-throw
exception-safety guarantee.</li>
</ul></div>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="header.boost.any_hpp"></a>Header &lt;<a href="../../../boost/any.hpp" target="_top">boost/any.hpp</a>&gt;</h3></div></div></div>
<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
<span class="keyword">class</span> <a class="link" href="../boost/bad_any_cast.html" title="Class bad_any_cast">bad_any_cast</a><span class="special">;</span>
<span class="keyword">class</span> <a class="link" href="../boost/any.html" title="Class any">any</a><span class="special">;</span>
<span class="keyword">void</span> <a class="link" href="../boost/swap_1_3_5_5_2_1_3.html" title="Function swap"><span class="identifier">swap</span></a><span class="special">(</span><a class="link" href="../boost/any.html" title="Class any">any</a> <span class="special">&amp;</span><span class="special">,</span> <a class="link" href="../boost/any.html" title="Class any">any</a> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> <span class="identifier">T</span> <a class="link" href="../boost/any_cast.html" title="Function any_cast"><span class="identifier">any_cast</span></a><span class="special">(</span><a class="link" href="../boost/any.html" title="Class any">any</a> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> <span class="identifier">T</span> <a class="link" href="../boost/any_cast.html" title="Function any_cast"><span class="identifier">any_cast</span></a><span class="special">(</span><a class="link" href="../boost/any.html" title="Class any">any</a> <span class="special">&amp;&amp;</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> <span class="identifier">T</span> <a class="link" href="../boost/any_cast.html" title="Function any_cast"><span class="identifier">any_cast</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="../boost/any.html" title="Class any">any</a> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> ValueType<span class="special">&gt;</span> <span class="keyword">const</span> <span class="identifier">ValueType</span> <span class="special">*</span> <a class="link" href="../boost/any_cast.html" title="Function any_cast"><span class="identifier">any_cast</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="../boost/any.html" title="Class any">any</a> <span class="special">*</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> ValueType<span class="special">&gt;</span> <span class="identifier">ValueType</span> <span class="special">*</span> <a class="link" href="../boost/any_cast.html" title="Function any_cast"><span class="identifier">any_cast</span></a><span class="special">(</span><a class="link" href="../boost/any.html" title="Class any">any</a> <span class="special">*</span><span class="special">)</span><span class="special">;</span>
<span class="special">}</span></pre>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2001 Kevlin Henney<br>Copyright © 2013-2021 Antony Polukhin<p>Distributed under the Boost Software License, Version 1.0.
(See accompanying file <code class="filename">LICENSE_1_0.txt</code> or copy at
<a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="s02.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../any.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../boost/bad_any_cast.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

149
doc/html/any/s02.html Normal file
View File

@@ -0,0 +1,149 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Examples</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../any.html" title="Chapter 4. Boost.Any">
<link rel="prev" href="../any.html" title="Chapter 4. Boost.Any">
<link rel="next" href="reference.html" title="Reference">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../any.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../any.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="reference.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="id-1.3.5.4"></a>Examples</h2></div></div></div>
<p>The following code demonstrates the syntax for using
implicit conversions to and copying of any objects:</p>
<pre class="programlisting">
#include &lt;list&gt;
#include &lt;boost/any.hpp&gt;
using <code class="computeroutput"><a class="link" href="../boost/any_cast.html" title="Function any_cast">boost::any_cast</a></code>;
typedef std::list&lt;<code class="computeroutput"><a class="link" href="../boost/any.html" title="Class any">boost::any</a></code>&gt; many;
void append_int(many &amp; values, int value)
{
<code class="computeroutput"><a class="link" href="../boost/any.html" title="Class any">boost::any</a></code> to_append = value;
values.push_back(to_append);
}
void append_string(many &amp; values, const std::string &amp; value)
{
values.push_back(value);
}
void append_char_ptr(many &amp; values, const char * value)
{
values.push_back(value);
}
void append_any(many &amp; values, const <code class="computeroutput"><a class="link" href="../boost/any.html" title="Class any">boost::any</a></code> &amp; value)
{
values.push_back(value);
}
void append_nothing(many &amp; values)
{
values.push_back(<code class="computeroutput"><a class="link" href="../boost/any.html" title="Class any">boost::any</a></code>());
}
</pre>
<p>The following predicates follow on from the previous
definitions and demonstrate the use of queries on any
objects:</p>
<pre class="programlisting">
bool is_empty(const <code class="computeroutput"><a class="link" href="../boost/any.html" title="Class any">boost::any</a></code> &amp; operand)
{
return operand.<code class="computeroutput"><a class="link" href="../boost/any.html#id-1_3_5_5_2_1_2_13_1-bb">empty</a></code>();
}
bool is_int(const <code class="computeroutput"><a class="link" href="../boost/any.html" title="Class any">boost::any</a></code> &amp; operand)
{
return operand.<code class="computeroutput"><a class="link" href="../boost/any.html#id-1_3_5_5_2_1_2_13_2-bb">type</a></code>() == typeid(int);
}
bool is_char_ptr(const <code class="computeroutput"><a class="link" href="../boost/any.html" title="Class any">boost::any</a></code> &amp; operand)
{
try
{
<code class="computeroutput"><a class="link" href="../boost/any_cast.html" title="Function any_cast">any_cast</a></code>&lt;const char *&gt;(operand);
return true;
}
catch(const <code class="computeroutput"><a class="link" href="../boost/bad_any_cast.html" title="Class bad_any_cast">boost::bad_any_cast</a></code> &amp;)
{
return false;
}
}
bool is_string(const <code class="computeroutput"><a class="link" href="../boost/any.html" title="Class any">boost::any</a></code> &amp; operand)
{
return <code class="computeroutput"><a class="link" href="../boost/any_cast.html" title="Function any_cast">any_cast</a></code>&lt;std::string&gt;(&amp;operand);
}
void count_all(many &amp; values, std::ostream &amp; out)
{
out &lt;&lt; "#empty == "
&lt;&lt; std::count_if(values.begin(), values.end(), is_empty) &lt;&lt; std::endl;
out &lt;&lt; "#int == "
&lt;&lt; std::count_if(values.begin(), values.end(), is_int) &lt;&lt; std::endl;
out &lt;&lt; "#const char * == "
&lt;&lt; std::count_if(values.begin(), values.end(), is_char_ptr) &lt;&lt; std::endl;
out &lt;&lt; "#string == "
&lt;&lt; std::count_if(values.begin(), values.end(), is_string) &lt;&lt; std::endl;
}
</pre>
<p>The following type, patterned after the OMG's Property Service, defines name-value pairs for arbitrary value types:</p>
<pre class="programlisting">
struct property
{
property();
property(const std::string &amp;, const <code class="computeroutput"><a class="link" href="../boost/any.html" title="Class any">boost::any</a></code> &amp;);
std::string name;
<code class="computeroutput"><a class="link" href="../boost/any.html" title="Class any">boost::any</a></code> value;
};
typedef std::list&lt;property&gt; properties;
</pre>
<p>The following base class demonstrates one approach to
runtime polymorphism based callbacks that also require arbitrary
argument types. The absence of virtual member templates requires
that different solutions have different trade-offs in terms of
efficiency, safety, and generality. Using a checked variant type
offers one approach:</p>
<pre class="programlisting">
class consumer
{
public:
virtual void notify(const <code class="computeroutput"><a class="link" href="../boost/any.html" title="Class any">any</a></code> &amp;) = 0;
...
};
</pre>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2001 Kevlin Henney<br>Copyright © 2013-2021 Antony Polukhin<p>Distributed under the Boost Software License, Version 1.0.
(See accompanying file <code class="filename">LICENSE_1_0.txt</code> or copy at
<a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../any.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../any.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="reference.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

44
doc/html/any/s04.html Normal file
View File

@@ -0,0 +1,44 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Acknowledgements</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../any.html" title="Chapter 4. Boost.Any">
<link rel="prev" href="../boost/any_cast.html" title="Function any_cast">
<link rel="next" href="../array.html" title="Chapter 5. Boost.Array">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../boost/any_cast.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../any.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../array.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="id-1.3.5.6"></a>Acknowledgements</h2></div></div></div>
<p>Doug Gregor ported the documentation to the BoostBook format.</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2001 Kevlin Henney<br>Copyright © 2013-2021 Antony Polukhin<p>Distributed under the Boost Software License, Version 1.0.
(See accompanying file <code class="filename">LICENSE_1_0.txt</code> or copy at
<a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../boost/any_cast.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../any.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../array.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>