| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> | 
|---|
| 2 | <html> | 
|---|
| 3 | <head> | 
|---|
| 4 | <title>Boost Integer Library</title> | 
|---|
| 5 | </head> | 
|---|
| 6 |  | 
|---|
| 7 | <body bgcolor="white" text="black"> | 
|---|
| 8 | <table border="1" bgcolor="teal" cellpadding="2"> | 
|---|
| 9 |         <tr> | 
|---|
| 10 |                 <td bgcolor="white"><img src="../../boost.png" alt="boost.png (6897 bytes)" width="277" height="86"></td> | 
|---|
| 11 |                 <td><a href="../../index.htm"><font face="Arial" color="white"><big>Home</big></font></a></td> | 
|---|
| 12 |                 <td><a href="../libraries.htm"><font face="Arial" color="white"><big>Libraries</big></font></a></td> | 
|---|
| 13 |                 <td><a href="../../people/people.htm"><font face="Arial" color="white"><big>People</big></font></a></td> | 
|---|
| 14 |                 <td><a href="../../more/faq.htm"><font face="Arial" color="white"><big>FAQ</big></font></a></td> | 
|---|
| 15 |                 <td><a href="../../more/index.htm"><font face="Arial" color="white"><big>More</big></font></a></td> | 
|---|
| 16 |         </tr> | 
|---|
| 17 | </table> | 
|---|
| 18 |  | 
|---|
| 19 | <h1>Boost Integer Library</h1> | 
|---|
| 20 |  | 
|---|
| 21 | <table border="1" cellpadding="5"> | 
|---|
| 22 |         <tr> | 
|---|
| 23 |                 <th>Header / Docs</th> | 
|---|
| 24 |                 <th>Contents</th> | 
|---|
| 25 |                 <th>Use</th> | 
|---|
| 26 |         </tr> | 
|---|
| 27 |         <tr> | 
|---|
| 28 |                 <td align="center"><cite><a href="../../boost/integer_fwd.hpp"><boost/integer_fwd.hpp></a></cite></td> | 
|---|
| 29 |                 <td valign="top">Forward declarations of classes and class templates</td> | 
|---|
| 30 |                 <td valign="top">When just the name of a class is needed</td> | 
|---|
| 31 |         </tr> | 
|---|
| 32 |         <tr> | 
|---|
| 33 |                 <td align="center"><code><a href="../../boost/cstdint.hpp"><boost/cstdint.hpp><br> | 
|---|
| 34 |       </a></code><a href="cstdint.htm"><br> | 
|---|
| 35 |       documentation</a> | 
|---|
| 36 |     </td> | 
|---|
| 37 |                 <td valign="top">Typedef's based on the 1999 C Standard header <<code>stdint.h></code>, wrapped in namespace boost. | 
|---|
| 38 |       This implementation may #include the compiler | 
|---|
| 39 |       supplied <<code>stdint.h></code>, if present.  </td> | 
|---|
| 40 |                 <td valign="top">Supplies typedefs for standard integer types such as <code> int32_t</code> or <code>uint_least16_t</code>. | 
|---|
| 41 |       Use in preference to <<code>stdint.h></code> | 
|---|
| 42 |       for enhanced portability.  Furthermore, all names are safely placed in the boost namespace.</td> | 
|---|
| 43 |         </tr> | 
|---|
| 44 |         <tr> | 
|---|
| 45 |                 <td align="center"><code><a href="../../boost/integer_traits.hpp"><boost/integer_traits.hpp></a></code><br> | 
|---|
| 46 |     <br> | 
|---|
| 47 |     <a href="integer_traits.html">documentation</a> | 
|---|
| 48 |     </td> | 
|---|
| 49 |                 <td valign="top">Template class <code>boost::integer_traits</code>, derived from <code>std::numeric_limits</code>.  | 
|---|
| 50 |       Adds <code>const_min</code> and <code>const_max</code> members.</td> | 
|---|
| 51 |                 <td valign="top">Use to obtain the characteristics of a known integer type.</td> | 
|---|
| 52 |         </tr> | 
|---|
| 53 |         <tr> | 
|---|
| 54 |                 <td align="center"><code><a href="../../boost/integer.hpp"><boost/integer.hpp></a><br> | 
|---|
| 55 |       <br> | 
|---|
| 56 |       </code><a href="integer.htm">documentation</a></td> | 
|---|
| 57 |                 <td valign="top">Templates for integer type selection based on properties such as | 
|---|
| 58 |       maximum value or number of bits.</td> | 
|---|
| 59 |                 <td valign="top">Use to select the type an integer when some property such as maximum value or number of bits is known. | 
|---|
| 60 |       Useful for generic programming. </td> | 
|---|
| 61 |         </tr> | 
|---|
| 62 |         <tr> | 
|---|
| 63 |                 <td align="center"><code><a href="../../boost/integer/integer_mask.hpp"><boost/integer/integer_mask.hpp></a><br> | 
|---|
| 64 |       <br> | 
|---|
| 65 |       </code><a href="doc/integer_mask.html">documentation</a></td> | 
|---|
| 66 |                 <td valign="top">Templates for the selection of integer masks, single or lowest group, based on the number of bits.</td> | 
|---|
| 67 |                 <td valign="top">Use to select a particular mask when the bit position(s) are based on a compile-time variable. | 
|---|
| 68 |       Useful for generic programming. </td> | 
|---|
| 69 |         </tr> | 
|---|
| 70 |         <tr> | 
|---|
| 71 |                 <td align="center"><code><a href="../../boost/integer/static_log2.hpp"><boost/integer/static_log2.hpp></a><br> | 
|---|
| 72 |       <br> | 
|---|
| 73 |       </code><a href="doc/static_log2.html">documentation</a></td> | 
|---|
| 74 |                 <td valign="top">Template for finding the highest power of two in a number.</td> | 
|---|
| 75 |                 <td valign="top">Use to find the bit-size/range based on a maximum value. | 
|---|
| 76 |       Useful for generic programming. </td> | 
|---|
| 77 |         </tr> | 
|---|
| 78 |         <tr> | 
|---|
| 79 |                 <td align="center"><code><a href="../../boost/integer/static_min_max.hpp"><boost/integer/static_min_max.hpp></a><br> | 
|---|
| 80 |       <br> | 
|---|
| 81 |       </code><a href="doc/static_min_max.html">documentation</a></td> | 
|---|
| 82 |                 <td valign="top">Templates for finding the extrema of two numbers.</td> | 
|---|
| 83 |                 <td valign="top">Use to find a bound based on a minimum or maximum value. | 
|---|
| 84 |       Useful for generic programming. </td> | 
|---|
| 85 |         </tr> | 
|---|
| 86 | </table> | 
|---|
| 87 |  | 
|---|
| 88 | <h2>Rationale</h2> | 
|---|
| 89 |  | 
|---|
| 90 | <p>The organization of boost integer headers and classes is designed to | 
|---|
| 91 | take advantage of <cite><stdint.h></cite> types from the 1999 C | 
|---|
| 92 | standard without resorting to undefined behavior in terms of the 1998 | 
|---|
| 93 | C++ standard.  The header <cite><boost/cstdint.hpp></cite> makes | 
|---|
| 94 | the standard integer types safely available in namespace | 
|---|
| 95 | <code>boost</code> without placing any names in namespace | 
|---|
| 96 | <code>std</code>.  As always, the intension is to complement rather than | 
|---|
| 97 | compete with the C++ Standard Library.  Should some future C++ standard | 
|---|
| 98 | include <cite><stdint.h></cite> and <cite><cstdint></cite>, | 
|---|
| 99 | then <cite><boost/cstdint.hpp></cite> will continue to function, | 
|---|
| 100 | but will become redundant and may be safely deprecated.</p> | 
|---|
| 101 |  | 
|---|
| 102 | <p>Because these are boost headers, their names conform to boost header | 
|---|
| 103 | naming conventions rather than C++ Standard Library header naming | 
|---|
| 104 | conventions.</p> | 
|---|
| 105 |  | 
|---|
| 106 | <h2><i>Caveat emptor</i></h2> | 
|---|
| 107 |  | 
|---|
| 108 | <p>As an implementation artifact, certain C | 
|---|
| 109 | <cite><limits.h></cite> macro names may possibly be visible to | 
|---|
| 110 | users of <cite><boost/cstdint.hpp></cite>.  Don't use these | 
|---|
| 111 | macros; they are not part of any Boost-specified interface.  Use | 
|---|
| 112 | <code>boost::integer_traits<></code> or | 
|---|
| 113 | <code>std::numeric_limits<></code> instead.</p> | 
|---|
| 114 |  | 
|---|
| 115 | <p>As another implementation artifact, certain C | 
|---|
| 116 | <cite><stdint.h></cite> typedef names may possibly be visible in | 
|---|
| 117 | the global namespace to users of <cite><boost/cstdint.hpp></cite>. | 
|---|
| 118 |  Don't use these names, they are not part of any Boost-specified | 
|---|
| 119 | interface.  Use the respective names in namespace <code>boost</code> | 
|---|
| 120 | instead.</p> | 
|---|
| 121 |  | 
|---|
| 122 | <hr> | 
|---|
| 123 |  | 
|---|
| 124 | <p>Revised: <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %b %Y" startspan -->03 Oct 2001<!--webbot bot="Timestamp" endspan i-checksum="14373" --> | 
|---|
| 125 | </p> | 
|---|
| 126 |  | 
|---|
| 127 | </body> | 
|---|
| 128 | </html> | 
|---|