]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/type_traits/doc/html/boost_typetraits/reference/promote.html
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / type_traits / doc / html / boost_typetraits / reference / promote.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>promote</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="../reference.html" title="Alphabetical Reference">
9 <link rel="prev" href="make_unsigned.html" title="make_unsigned">
10 <link rel="next" href="rank.html" title="rank">
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="make_unsigned.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="rank.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="section">
26 <div class="titlepage"><div><div><h3 class="title">
27 <a name="boost_typetraits.reference.promote"></a><a class="link" href="promote.html" title="promote">promote</a>
28 </h3></div></div></div>
29 <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>
30 <span class="keyword">struct</span> <span class="identifier">promote</span>
31 <span class="special">{</span>
32 <span class="keyword">typedef</span> <em class="replaceable"><code>see-below</code></em> <span class="identifier">type</span><span class="special">;</span>
33 <span class="special">};</span>
34 </pre>
35 <p>
36 <span class="bold"><strong>type:</strong></span> If integral or floating point promotion
37 can be applied to an rvalue of type <code class="computeroutput"><span class="identifier">T</span></code>,
38 then applies integral and floating point promotions to <code class="computeroutput"><span class="identifier">T</span></code>
39 and keeps cv-qualifiers of <code class="computeroutput"><span class="identifier">T</span></code>,
40 otherwise leaves <code class="computeroutput"><span class="identifier">T</span></code> unchanged.
41 See also <a class="link" href="integral_promotion.html" title="integral_promotion">integral_promotion</a>
42 and <a class="link" href="floating_point_promotion.html" title="floating_point_promotion">floating_point_promotion</a>.
43 </p>
44 <p>
45 <span class="bold"><strong>C++ Standard Reference:</strong></span> 4.5 except 4.5/3
46 (integral bit-field) and 4.6.
47 </p>
48 <p>
49 <span class="bold"><strong>Compiler Compatibility:</strong></span> All current compilers
50 are supported by this trait.
51 </p>
52 <p>
53 <span class="bold"><strong>Header:</strong></span> <code class="computeroutput"> <span class="preprocessor">#include</span>
54 <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">promote</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
55 or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
56 </p>
57 <div class="table">
58 <a name="boost_typetraits.reference.promote.examples"></a><p class="title"><b>Table&#160;1.25.&#160;Examples</b></p>
59 <div class="table-contents"><table class="table" summary="Examples">
60 <colgroup>
61 <col>
62 <col>
63 </colgroup>
64 <thead><tr>
65 <th>
66 <p>
67 Expression
68 </p>
69 </th>
70 <th>
71 <p>
72 Result Type
73 </p>
74 </th>
75 </tr></thead>
76 <tbody>
77 <tr>
78 <td>
79 <p>
80 <code class="computeroutput"><span class="identifier">promote</span><span class="special">&lt;</span><span class="keyword">short</span> <span class="keyword">volatile</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
81 </p>
82 </td>
83 <td>
84 <p>
85 <code class="computeroutput"><span class="keyword">int</span> <span class="keyword">volatile</span></code>
86 </p>
87 </td>
88 </tr>
89 <tr>
90 <td>
91 <p>
92 <code class="computeroutput"><span class="identifier">promote</span><span class="special">&lt;</span><span class="keyword">float</span> <span class="keyword">const</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
93 </p>
94 </td>
95 <td>
96 <p>
97 <code class="computeroutput"><span class="keyword">double</span> <span class="keyword">const</span></code>
98 </p>
99 </td>
100 </tr>
101 <tr>
102 <td>
103 <p>
104 <code class="computeroutput"><span class="identifier">promote</span><span class="special">&lt;</span><span class="keyword">short</span><span class="special">&amp;&gt;::</span><span class="identifier">type</span></code>
105 </p>
106 </td>
107 <td>
108 <p>
109 <code class="computeroutput"><span class="keyword">short</span><span class="special">&amp;</span></code>
110 </p>
111 </td>
112 </tr>
113 </tbody>
114 </table></div>
115 </div>
116 <br class="table-break">
117 </div>
118 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
119 <td align="left"></td>
120 <td align="right"><div class="copyright-footer">Copyright &#169; 2000, 2011 Adobe Systems Inc, David Abrahams,
121 Frederic Bron, Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant,
122 Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten
123 Ottosen, Roman Perepelitsa, Robert Ramey, Jeremy Siek, Robert Stewart and Steven
124 Watanabe<p>
125 Distributed under the Boost Software License, Version 1.0. (See accompanying
126 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>)
127 </p>
128 </div></td>
129 </tr></table>
130 <hr>
131 <div class="spirit-nav">
132 <a accesskey="p" href="make_unsigned.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="rank.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
133 </div>
134 </body>
135 </html>