]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/type_traits/doc/html/boost_typetraits/category/value_traits/primary.html
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / type_traits / doc / html / boost_typetraits / category / value_traits / primary.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Categorizing a Type</title>
5 <link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
7 <link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Boost.TypeTraits">
8 <link rel="up" href="../value_traits.html" title="Type Traits that Describe the Properties of a Type">
9 <link rel="prev" href="../value_traits.html" title="Type Traits that Describe the Properties of a Type">
10 <link rel="next" href="properties.html" title="General Type Properties">
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="../value_traits.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../value_traits.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="properties.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="section">
26 <div class="titlepage"><div><div><h4 class="title">
27 <a name="boost_typetraits.category.value_traits.primary"></a><a class="link" href="primary.html" title="Categorizing a Type">Categorizing
28 a Type</a>
29 </h4></div></div></div>
30 <p>
31 These traits identify what "kind" of type some type <code class="computeroutput"><span class="identifier">T</span></code> is. These are split into two groups:
32 primary traits which are all mutually exclusive, and composite traits that
33 are compositions of one or more primary traits.
34 </p>
35 <p>
36 For any given type, exactly one primary type trait will inherit from <a class="link" href="../../reference/integral_constant.html" title="integral_constant">true_type</a>,
37 and all the others will inherit from <a class="link" href="../../reference/integral_constant.html" title="integral_constant">false_type</a>,
38 in other words these traits are mutually exclusive.
39 </p>
40 <p>
41 This means that <code class="computeroutput"><a class="link" href="../../reference/is_integral.html" title="is_integral">is_integral</a><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">value</span></code>
42 and <code class="computeroutput"><a class="link" href="../../reference/is_floating_point.html" title="is_floating_point">is_floating_point</a><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">value</span></code>
43 will only ever be true for built-in types; if you want to check for a user-defined
44 class type that behaves "as if" it is an integral or floating
45 point type, then use the <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span>
46 <span class="keyword">template</span></code> instead.
47 </p>
48 <p>
49 <span class="bold"><strong>Synopsis:</strong></span>
50 </p>
51 <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
52 <span class="keyword">struct</span> <a class="link" href="../../reference/is_array.html" title="is_array">is_array</a><span class="special">;</span>
53
54 <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
55 <span class="keyword">struct</span> <a class="link" href="../../reference/is_class.html" title="is_class">is_class</a><span class="special">;</span>
56
57 <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
58 <span class="keyword">struct</span> <a class="link" href="../../reference/is_complex.html" title="is_complex">is_complex</a><span class="special">;</span>
59
60 <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
61 <span class="keyword">struct</span> <a class="link" href="../../reference/is_enum.html" title="is_enum">is_enum</a><span class="special">;</span>
62
63 <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
64 <span class="keyword">struct</span> <a class="link" href="../../reference/is_floating_point.html" title="is_floating_point">is_floating_point</a><span class="special">;</span>
65
66 <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
67 <span class="keyword">struct</span> <a class="link" href="../../reference/is_function.html" title="is_function">is_function</a><span class="special">;</span>
68
69 <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
70 <span class="keyword">struct</span> <a class="link" href="../../reference/is_integral.html" title="is_integral">is_integral</a><span class="special">;</span>
71
72 <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
73 <span class="keyword">struct</span> <a class="link" href="../../reference/is_member_function_pointer.html" title="is_member_function_pointer">is_member_function_pointer</a><span class="special">;</span>
74
75 <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
76 <span class="keyword">struct</span> <a class="link" href="../../reference/is_member_object_pointer.html" title="is_member_object_pointer">is_member_object_pointer</a><span class="special">;</span>
77
78 <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
79 <span class="keyword">struct</span> <a class="link" href="../../reference/is_pointer.html" title="is_pointer">is_pointer</a><span class="special">;</span>
80
81 <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
82 <span class="keyword">struct</span> <a class="link" href="../../reference/is_lvalue_reference.html" title="is_lvalue_reference">is_lvalue_reference</a><span class="special">;</span>
83
84 <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
85 <span class="keyword">struct</span> <a class="link" href="../../reference/is_rvalue_reference.html" title="is_rvalue_reference">is_rvalue_reference</a><span class="special">;</span>
86
87 <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
88 <span class="keyword">struct</span> <a class="link" href="../../reference/is_union.html" title="is_union">is_union</a><span class="special">;</span>
89
90 <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
91 <span class="keyword">struct</span> <a class="link" href="../../reference/is_void.html" title="is_void">is_void</a><span class="special">;</span>
92 </pre>
93 <p>
94 The following traits are made up of the union of one or more type categorizations.
95 A type may belong to more than one of these categories, in addition to
96 one of the primary categories.
97 </p>
98 <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
99 <span class="keyword">struct</span> <a class="link" href="../../reference/is_arithmetic.html" title="is_arithmetic">is_arithmetic</a><span class="special">;</span>
100
101 <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
102 <span class="keyword">struct</span> <a class="link" href="../../reference/is_compound.html" title="is_compound">is_compound</a><span class="special">;</span>
103
104 <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
105 <span class="keyword">struct</span> <a class="link" href="../../reference/is_fundamental.html" title="is_fundamental">is_fundamental</a><span class="special">;</span>
106
107 <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
108 <span class="keyword">struct</span> <a class="link" href="../../reference/is_member_pointer.html" title="is_member_pointer">is_member_pointer</a><span class="special">;</span>
109
110 <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
111 <span class="keyword">struct</span> <a class="link" href="../../reference/is_object.html" title="is_object">is_object</a><span class="special">;</span>
112
113 <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
114 <span class="keyword">struct</span> <a class="link" href="../../reference/is_reference.html" title="is_reference">is_reference</a><span class="special">;</span>
115
116 <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
117 <span class="keyword">struct</span> <a class="link" href="../../reference/is_scalar.html" title="is_scalar">is_scalar</a><span class="special">;</span>
118 </pre>
119 </div>
120 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
121 <td align="left"></td>
122 <td align="right"><div class="copyright-footer">Copyright &#169; 2000, 2011 Adobe Systems Inc, David Abrahams,
123 Frederic Bron, Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant,
124 Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten
125 Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert Stewart and Steven
126 Watanabe<p>
127 Distributed under the Boost Software License, Version 1.0. (See accompanying
128 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>)
129 </p>
130 </div></td>
131 </tr></table>
132 <hr>
133 <div class="spirit-nav">
134 <a accesskey="p" href="../value_traits.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../value_traits.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="properties.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
135 </div>
136 </body>
137 </html>