Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / gil / doc / html / reference / classboost_1_1gil_1_1promote__integral.html
1 <!-- HTML header for doxygen 1.8.13-->
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4   <head>
5     <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
6     <meta http-equiv="X-UA-Compatible" content="IE=9"/>
7     <meta name="generator" content="Doxygen 1.8.15"/>
8     <meta name="viewport" content="width=device-width, initial-scale=1"/>
9     <title>Generic Image Library: promote_integral&lt; T, PromoteUnsignedToUnsigned, UseCheckedInteger, IsIntegral &gt; Class Template Reference</title>
10     <link href="tabs.css" rel="stylesheet" type="text/css"/>
11     <script type="text/javascript" src="jquery.js"></script>
12     <script type="text/javascript" src="dynsections.js"></script>
13     <link href="doxygen.css" rel="stylesheet" type="text/css" />
14     <link href="doxygen-boost.css" rel="stylesheet" type="text/css"/>
15   </head>
16   <body>
17     <div class="boost-header">
18       <table border="0" cellpadding="7" cellspacing="0" width="100%" summary="header">
19         <tr>
20           <td valign="top" width="300">
21             <h3><a href="../index.html"><img alt="Boost GIL" src="../_static/gil.png" border="0"></a></h3>
22           </td>
23           <td ><h1 align="center"><a href="../index.html"></a></h1></td>
24           <td></td>
25         </tr>
26       </table>
27     </div>
28     <hr/>
29     <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
30 <!-- Generated by Doxygen 1.8.15 -->
31 <script type="text/javascript" src="menudata.js"></script>
32 <script type="text/javascript" src="menu.js"></script>
33 <script type="text/javascript">
34 /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
35 $(function() {
36   initMenu('',false,false,'search.php','Search');
37 });
38 /* @license-end */</script>
39 <div id="main-nav"></div>
40 <div id="nav-path" class="navpath">
41   <ul>
42 <li class="navelem"><b>boost</b></li><li class="navelem"><b>gil</b></li><li class="navelem"><a class="el" href="classboost_1_1gil_1_1promote__integral.html">promote_integral</a></li>  </ul>
43 </div>
44 </div><!-- top -->
45 <div class="header">
46   <div class="summary">
47 <a href="#pub-types">Public Types</a> &#124;
48 <a href="classboost_1_1gil_1_1promote__integral-members.html">List of all members</a>  </div>
49   <div class="headertitle">
50 <div class="title">promote_integral&lt; T, PromoteUnsignedToUnsigned, UseCheckedInteger, IsIntegral &gt; Class Template Reference</div>  </div>
51 </div><!--header-->
52 <div class="contents">
53
54 <p>Meta-function to define an integral type with size than is (roughly) twice the bit size of T.  
55  <a href="classboost_1_1gil_1_1promote__integral.html#details">More...</a></p>
56
57 <p><code>#include &lt;<a class="el" href="promote__integral_8hpp_source.html">promote_integral.hpp</a>&gt;</code></p>
58 <table class="memberdecls">
59 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
60 Public Types</h2></td></tr>
61 <tr class="memitem:af27ec54d2c78bcc01f45e591d2e4a211"><td class="memItemLeft" align="right" valign="top"><a id="af27ec54d2c78bcc01f45e591d2e4a211"></a>
62 using&#160;</td><td class="memItemRight" valign="bottom"><b>type</b> = typename detail::promote_integral::promote_to_larger&lt; T, typename boost::mpl::begin&lt; integral_types &gt;::type, typename boost::mpl::end&lt; integral_types &gt;::type, min_bit_size_type::value &gt;::type</td></tr>
63 <tr class="separator:af27ec54d2c78bcc01f45e591d2e4a211"><td class="memSeparator" colspan="2">&#160;</td></tr>
64 </table>
65 <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
66 <div class="textblock"><h3>template&lt;typename T, bool PromoteUnsignedToUnsigned = false, bool UseCheckedInteger = false, bool IsIntegral = std::is_integral&lt;T&gt;::value&gt;<br />
67 class boost::gil::promote_integral&lt; T, PromoteUnsignedToUnsigned, UseCheckedInteger, IsIntegral &gt;</h3>
68
69 <p>Meta-function to define an integral type with size than is (roughly) twice the bit size of T. </p>
70 <p>This meta-function tries to promote the fundamental integral type T to a another integral type with size (roughly) twice the bit size of T.</p>
71 <p>To do this, two times the bit size of T is tested against the bit sizes of: short, int, long, boost::long_long_type, boost::int128_t and the one that first matches is chosen.</p>
72 <p>For unsigned types the bit size of T is tested against the bit sizes of the types above, if T is promoted to a signed type, or the bit sizes of unsigned short, unsigned int, unsigned long, std::size_t, boost::ulong_long_type, boost::uint128_t if T is promoted to an unsigned type.</p>
73 <p>By default an unsigned type is promoted to a signed type. This behavior is controlled by the PromoteUnsignedToUnsigned boolean template parameter, whose default value is "false". To promote an unsigned type to an unsigned type set the value of this template parameter to "true".</p>
74 <p>Finally, if the passed type is either a floating-point type or a user-defined type it is returned as is.</p>
75 <dl class="section note"><dt>Note</dt><dd>boost::long_long_type and boost::ulong_long_type are considered only if the macro BOOST_HAS_LONG_LONG is defined </dd></dl>
76 </div><hr/>The documentation for this class was generated from the following file:<ul>
77 <li><a class="el" href="promote__integral_8hpp_source.html">promote_integral.hpp</a></li>
78 </ul>
79 </div><!-- contents -->
80      <!-- HTML footer for doxygen 1.8.13-->
81      <!-- start footer part -->
82      <hr class="footer"/>
83      <address class="footer">
84       <small>
85         Generated by &#160;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.8.15
86       </small>
87     </address>
88   </body>
89 </html>