Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/integer/cstdint.htm @ 45

Last change on this file since 45 was 29, checked in by landauf, 16 years ago

updated boost from 1_33_1 to 1_34_1

File size: 3.8 KB
Line 
1<html>
2
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
6<meta name="ProgId" content="FrontPage.Editor.Document">
7<title>Header boost/cstdint.hpp</title>
8</head>
9
10<body bgcolor="#FFFFFF" text="#000000">
11
12<h1><img src="../../boost.png" alt="boost.png (6897 bytes)" align="center" width="277" height="86">Header
13boost/cstdint.hpp&nbsp;</h1>
14<p>The header <code><a href="../../boost/cstdint.hpp">&lt;boost/cstdint.hpp&gt;</a></code>
15provides the typedef's useful for
16writing portable code that requires certain integer widths.  All typedef's are in namespace boost.</p>
17<p>The specifications are based on the ISO/IEC 9899:1999 C Language standard
18header &lt;stdint.h&gt;.&nbsp; The 64-bit types required by the C standard are not
19required in the boost header, and may not be supplied in all implementations,
20because <code>long long</code> is not [yet] included in the C++ standard.</p>
21<p>See <a href="cstdint_test.cpp">cstdint_test.cpp</a> for a test program.</p>
22<h2>Exact-width integer types</h2>
23<p>The typedef <code>int#_t</code>, with # replaced by the width, designates a
24signed integer type of exactly # bits; <code>int8_t</code> denotes an 8-bit
25signed integer type.&nbsp; Similarly, the typedef <code>uint#_t</code>
26designates and unsigned integer type of exactly # bits.</p>
27<p>These types are optional. However, if an implementation provides integer
28types with widths of 8, 16, 32, or 64 bits, it shall define the corresponding
29typedef names.</p>
30<h2>Minimum-width integer types</h2>
31<p>The typedef <code>int_least#_t</code>, with # replaced by the width,&nbsp;
32designates a signed integer type with a width of at least # bits, such that no
33signed integer type with lesser size has at least the specified width. Thus, <code>int_least32_t</code>
34denotes a signed integer type with a width of at least 32 bits. Similarly, the
35typedef name <code>uint_least#_t</code> designates an unsigned integer type with
36a width of at least # bits, such that no unsigned integer type with lesser size
37has at least the specified width.</p>
38<p>Required minimum-width integer types:</p>
39<ul>
40  <li><code>int_least8_t</code></li>
41  <li><code>int_least16_t</code></li>
42  <li><code>int_least32_t</code></li>
43  <li><code>uint_least8_t</code></li>
44  <li><code>uint_least16_t</code></li>
45  <li><code>uint_least32_t</code></li>
46</ul>
47<p>All other minimum-width integer types are optional.</p>
48<h2>Fastest minimum-width integer types</h2>
49<p>The typedef <code>int_fast#_t</code>, with # replaced by the width,
50designates the fastest signed integer type with a width of at least # bits.
51Similarly, the typedef name <code>uint_fast#_t</code> designates the fastest
52unsigned integer type with a width of at least # bits.</p>
53<p>There is no guarantee that these types are fastest for all purposes.&nbsp; In
54any case, however, they satisfy&nbsp; the signedness and width requirements.</p>
55<p>Required fastest minimum-width integer types:</p>
56<ul>
57  <li><code>int_fast8_t</code></li>
58  <li><code>int_fast16_t</code></li>
59  <li><code>int_fast32_t</code></li>
60  <li><code>uint_fast8_t</code></li>
61  <li><code>uint_fast16_t</code></li>
62  <li><code>uint_fast32_t</code></li>
63</ul>
64<p>All other fastest minimum-width integer types are optional.</p>
65<h2>Greatest-width integer types</h2>
66<p>The typedef <code>intmax_t </code>designates a signed integer type capable of
67representing any value of any signed integer type.</p>
68<p>The typedef <code>uintmax_t</code> designates an unsigned integer type
69capable of representing any value of any unsigned integer type.</p>
70<p>These types are required.</p>
71<hr>
72<p>Revised <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan -->19 Aug 2001<!--webbot bot="Timestamp" endspan i-checksum="14767" -->
73</p>
74<p>&nbsp;</p>
75
76</body>
77
78</html>
Note: See TracBrowser for help on using the repository browser.