]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/function_types/doc/html/boost_functiontypes/introduction.html
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / function_types / doc / html / boost_functiontypes / introduction.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Introduction</title>
5 <link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Boost.FunctionTypes 2.5">
8 <link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Boost.FunctionTypes 2.5">
9 <link rel="prev" href="../index.html" title="Chapter&#160;1.&#160;Boost.FunctionTypes 2.5">
10 <link rel="next" href="use_cases.html" title="Use Cases">
11 </head>
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
15 <td align="center"><a href="../../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../../more/index.htm">More</a></td>
20 </tr></table>
21 <hr>
22 <div class="spirit-nav">
23 <a accesskey="p" href="../index.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.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="use_cases.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="section">
26 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
27 <a name="boost_functiontypes.introduction"></a><a class="link" href="introduction.html" title="Introduction">Introduction</a>
28 </h2></div></div></div>
29 <p>
30 Boost.FunctionTypes provides functionality to classify, decompose and synthesize
31 function, function pointer, function reference and pointer to member types.
32 </p>
33 <p>
34 We collectively refer to these types as <span class="emphasis"><em>callable builtin</em></span>
35 types.
36 </p>
37 <p>
38 In particular, the library can be used to:
39 </p>
40 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
41 <li class="listitem">
42 test whether a type is a specific callable, builtin type,
43 </li>
44 <li class="listitem">
45 extract all component properties from callable, builtin types, and
46 </li>
47 <li class="listitem">
48 create callable, builtin types from specified properties.
49 </li>
50 </ul></div>
51 <p>
52 The library is designed to work well with other Boost libraries and uses well-accepted
53 concepts introduced by Boost and TR1.
54 </p>
55 <p>
56 Templates that encapsulate boolean or numeric properties define a static member
57 constant called <code class="literal">value</code>.
58 </p>
59 <pre class="programlisting"><a class="link" href="reference/classification.html#boost_functiontypes.reference.classification.is_function_pointer" title="is_function_pointer">is_function_pointer</a><span class="special">&lt;</span> <span class="keyword">bool</span><span class="special">(*)(</span><span class="keyword">int</span><span class="special">)</span> <span class="special">&gt;::</span><span class="identifier">value</span> <span class="comment">// == true
60 </span>
61 <a class="link" href="reference/decomposition.html#boost_functiontypes.reference.decomposition.function_arity" title="function_arity">function_arity</a><span class="special">&lt;</span> <span class="keyword">bool</span><span class="special">(*)(</span><span class="keyword">int</span><span class="special">)</span> <span class="special">&gt;::</span><span class="identifier">value</span> <span class="comment">// == 1
62 </span></pre>
63 <p>
64 Templates that encapsulate properties that are single types contain a type
65 member called <code class="literal">type</code>.
66 </p>
67 <pre class="programlisting"><a class="link" href="reference/synthesis.html#boost_functiontypes.reference.synthesis.function_type" title="function_type">function_type</a><span class="special">&lt;</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">bool</span><span class="special">,</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="special">&gt;::</span><span class="identifier">type</span> <span class="comment">// is bool(int)
68 </span>
69 <a class="link" href="reference/decomposition.html#boost_functiontypes.reference.decomposition.result_type" title="result_type">result_type</a><span class="special">&lt;</span> <span class="keyword">bool</span><span class="special">(&amp;)(</span><span class="keyword">int</span><span class="special">)</span> <span class="special">&gt;::</span><span class="identifier">type</span> <span class="comment">// is bool
70 </span></pre>
71 <p>
72 Templates that encapsulate properties that are type lists model an MPL-compatible
73 type sequence.
74 </p>
75 <pre class="programlisting"><a class="link" href="reference/decomposition.html#boost_functiontypes.reference.decomposition.parameter_types" title="parameter_types">parameter_types</a><span class="special">&lt;</span> <span class="keyword">bool</span><span class="special">(</span><span class="keyword">int</span><span class="special">)</span> <span class="special">&gt;</span> <span class="comment">// models an MPL sequence
76 </span></pre>
77 </div>
78 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
79 <td align="left"></td>
80 <td align="right"><div class="copyright-footer">Copyright &#169; 2004-2007 Tobias
81 Schwinger<p>
82 Distributed under the Boost Software License, Version 1.0. (See accompanying
83 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
84 </p>
85 </div></td>
86 </tr></table>
87 <hr>
88 <div class="spirit-nav">
89 <a accesskey="p" href="../index.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.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="use_cases.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
90 </div>
91 </body>
92 </html>