[29] | 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 |
---|
| 13 | boost/cstdint.hpp </h1> |
---|
| 14 | <p>The header <code><a href="../../boost/cstdint.hpp"><boost/cstdint.hpp></a></code> |
---|
| 15 | provides the typedef's useful for |
---|
| 16 | writing 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 |
---|
| 18 | header <stdint.h>. The 64-bit types required by the C standard are not |
---|
| 19 | required in the boost header, and may not be supplied in all implementations, |
---|
| 20 | because <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 |
---|
| 24 | signed integer type of exactly # bits; <code>int8_t</code> denotes an 8-bit |
---|
| 25 | signed integer type. Similarly, the typedef <code>uint#_t</code> |
---|
| 26 | designates and unsigned integer type of exactly # bits.</p> |
---|
| 27 | <p>These types are optional. However, if an implementation provides integer |
---|
| 28 | types with widths of 8, 16, 32, or 64 bits, it shall define the corresponding |
---|
| 29 | typedef names.</p> |
---|
| 30 | <h2>Minimum-width integer types</h2> |
---|
| 31 | <p>The typedef <code>int_least#_t</code>, with # replaced by the width, |
---|
| 32 | designates a signed integer type with a width of at least # bits, such that no |
---|
| 33 | signed integer type with lesser size has at least the specified width. Thus, <code>int_least32_t</code> |
---|
| 34 | denotes a signed integer type with a width of at least 32 bits. Similarly, the |
---|
| 35 | typedef name <code>uint_least#_t</code> designates an unsigned integer type with |
---|
| 36 | a width of at least # bits, such that no unsigned integer type with lesser size |
---|
| 37 | has 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, |
---|
| 50 | designates the fastest signed integer type with a width of at least # bits. |
---|
| 51 | Similarly, the typedef name <code>uint_fast#_t</code> designates the fastest |
---|
| 52 | unsigned integer type with a width of at least # bits.</p> |
---|
| 53 | <p>There is no guarantee that these types are fastest for all purposes. In |
---|
| 54 | any case, however, they satisfy 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 |
---|
| 67 | representing any value of any signed integer type.</p> |
---|
| 68 | <p>The typedef <code>uintmax_t</code> designates an unsigned integer type |
---|
| 69 | capable 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> </p> |
---|
| 75 | |
---|
| 76 | </body> |
---|
| 77 | |
---|
| 78 | </html> |
---|