| 
									
										
										
										
											2001-12-03 03:29:57 +00:00
										 |  |  |  | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> | 
					
						
							| 
									
										
										
										
											2000-07-27 14:04:40 +00:00
										 |  |  |  | <html> | 
					
						
							|  |  |  |  | <head> | 
					
						
							|  |  |  |  | <title>Boost Integer Library</title> | 
					
						
							|  |  |  |  | </head> | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-12-03 03:29:57 +00:00
										 |  |  |  | <body bgcolor="white" text="black"> | 
					
						
							|  |  |  |  | <table border="1" bgcolor="teal" cellpadding="2"> | 
					
						
							|  |  |  |  | 	<tr> | 
					
						
							| 
									
										
										
										
											2004-10-05 15:45:52 +00:00
										 |  |  |  | 		<td bgcolor="white"><img src="../../boost.png" alt="boost.png (6897 bytes)" width="277" height="86"></td> | 
					
						
							| 
									
										
										
										
											2001-12-03 03:29:57 +00:00
										 |  |  |  | 		<td><a href="../../index.htm"><font face="Arial" color="white"><big>Home</big></font></a></td> | 
					
						
							|  |  |  |  | 		<td><a href="../libraries.htm"><font face="Arial" color="white"><big>Libraries</big></font></a></td> | 
					
						
							|  |  |  |  | 		<td><a href="../../people/people.htm"><font face="Arial" color="white"><big>People</big></font></a></td> | 
					
						
							|  |  |  |  | 		<td><a href="../../more/faq.htm"><font face="Arial" color="white"><big>FAQ</big></font></a></td> | 
					
						
							|  |  |  |  | 		<td><a href="../../more/index.htm"><font face="Arial" color="white"><big>More</big></font></a></td> | 
					
						
							|  |  |  |  | 	</tr> | 
					
						
							| 
									
										
										
										
											2000-07-27 14:04:40 +00:00
										 |  |  |  | </table> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | <h1>Boost Integer Library</h1> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | <table border="1" cellpadding="5"> | 
					
						
							| 
									
										
										
										
											2001-12-03 03:29:57 +00:00
										 |  |  |  | 	<tr> | 
					
						
							|  |  |  |  | 		<th>Header / Docs</th> | 
					
						
							|  |  |  |  | 		<th>Contents</th> | 
					
						
							|  |  |  |  | 		<th>Use</th> | 
					
						
							|  |  |  |  | 	</tr> | 
					
						
							|  |  |  |  | 	<tr> | 
					
						
							|  |  |  |  | 		<td align="center"><cite><a href="../../boost/integer_fwd.hpp"><boost/integer_fwd.hpp></a></cite></td> | 
					
						
							|  |  |  |  | 		<td valign="top">Forward declarations of classes and class templates</td> | 
					
						
							|  |  |  |  | 		<td valign="top">When just the name of a class is needed</td> | 
					
						
							|  |  |  |  | 	</tr> | 
					
						
							|  |  |  |  | 	<tr> | 
					
						
							|  |  |  |  | 		<td align="center"><code><a href="../../boost/cstdint.hpp"><boost/cstdint.hpp><br> | 
					
						
							| 
									
										
										
										
											2000-07-27 14:04:40 +00:00
										 |  |  |  |       </a></code><a href="cstdint.htm"><br> | 
					
						
							|  |  |  |  |       documentation</a> | 
					
						
							|  |  |  |  |     </td> | 
					
						
							| 
									
										
										
										
											2001-12-03 03:29:57 +00:00
										 |  |  |  | 		<td valign="top">Typedef's based on the 1999 C Standard header <<code>stdint.h></code>, wrapped in namespace boost. | 
					
						
							| 
									
										
										
										
											2000-11-12 18:37:04 +00:00
										 |  |  |  |       This implementation may #include the compiler | 
					
						
							|  |  |  |  |       supplied <<code>stdint.h></code>, if present.  </td> | 
					
						
							| 
									
										
										
										
											2001-12-03 03:29:57 +00:00
										 |  |  |  | 		<td valign="top">Supplies typedefs for standard integer types such as <code> int32_t</code> or <code>uint_least16_t</code>. | 
					
						
							| 
									
										
										
										
											2000-11-12 18:37:04 +00:00
										 |  |  |  |       Use in preference to <<code>stdint.h></code> | 
					
						
							|  |  |  |  |       for enhanced portability.  Furthermore, all names are safely placed in the boost namespace.</td> | 
					
						
							| 
									
										
										
										
											2001-12-03 03:29:57 +00:00
										 |  |  |  | 	</tr> | 
					
						
							|  |  |  |  | 	<tr> | 
					
						
							|  |  |  |  | 		<td align="center"><code><a href="../../boost/integer_traits.hpp"><boost/integer_traits.hpp></a></code><br> | 
					
						
							| 
									
										
										
										
											2000-07-27 14:04:40 +00:00
										 |  |  |  |     <br> | 
					
						
							|  |  |  |  |     <a href="integer_traits.html">documentation</a> | 
					
						
							|  |  |  |  |     </td> | 
					
						
							| 
									
										
										
										
											2001-12-03 03:29:57 +00:00
										 |  |  |  | 		<td valign="top">Template class <code>boost::integer_traits</code>, derived from <code>std::numeric_limits</code>.  | 
					
						
							| 
									
										
										
										
											2000-07-27 14:04:40 +00:00
										 |  |  |  |       Adds <code>const_min</code> and <code>const_max</code> members.</td> | 
					
						
							| 
									
										
										
										
											2001-12-03 03:29:57 +00:00
										 |  |  |  | 		<td valign="top">Use to obtain the characteristics of a known integer type.</td> | 
					
						
							|  |  |  |  | 	</tr> | 
					
						
							|  |  |  |  | 	<tr> | 
					
						
							|  |  |  |  | 		<td align="center"><code><a href="../../boost/integer.hpp"><boost/integer.hpp></a><br> | 
					
						
							| 
									
										
										
										
											2000-07-27 14:04:40 +00:00
										 |  |  |  |       <br> | 
					
						
							|  |  |  |  |       </code><a href="integer.htm">documentation</a></td> | 
					
						
							| 
									
										
										
										
											2001-12-03 03:29:57 +00:00
										 |  |  |  | 		<td valign="top">Templates for integer type selection based on properties such as | 
					
						
							| 
									
										
										
										
											2000-07-27 14:04:40 +00:00
										 |  |  |  |       maximum value or number of bits.</td> | 
					
						
							| 
									
										
										
										
											2001-12-03 03:29:57 +00:00
										 |  |  |  | 		<td valign="top">Use to select the type an integer when some property such as maximum value or number of bits is known. | 
					
						
							|  |  |  |  |       Useful for generic programming. </td> | 
					
						
							|  |  |  |  | 	</tr> | 
					
						
							|  |  |  |  | 	<tr> | 
					
						
							|  |  |  |  | 		<td align="center"><code><a href="../../boost/integer/integer_mask.hpp"><boost/integer/integer_mask.hpp></a><br> | 
					
						
							|  |  |  |  |       <br> | 
					
						
							|  |  |  |  |       </code><a href="doc/integer_mask.html">documentation</a></td> | 
					
						
							|  |  |  |  | 		<td valign="top">Templates for the selection of integer masks, single or lowest group, based on the number of bits.</td> | 
					
						
							|  |  |  |  | 		<td valign="top">Use to select a particular mask when the bit position(s) are based on a compile-time variable. | 
					
						
							|  |  |  |  |       Useful for generic programming. </td> | 
					
						
							|  |  |  |  | 	</tr> | 
					
						
							|  |  |  |  | 	<tr> | 
					
						
							|  |  |  |  | 		<td align="center"><code><a href="../../boost/integer/static_log2.hpp"><boost/integer/static_log2.hpp></a><br> | 
					
						
							|  |  |  |  |       <br> | 
					
						
							|  |  |  |  |       </code><a href="doc/static_log2.html">documentation</a></td> | 
					
						
							|  |  |  |  | 		<td valign="top">Template for finding the highest power of two in a number.</td> | 
					
						
							|  |  |  |  | 		<td valign="top">Use to find the bit-size/range based on a maximum value. | 
					
						
							| 
									
										
										
										
											2000-07-27 14:04:40 +00:00
										 |  |  |  |       Useful for generic programming. </td> | 
					
						
							| 
									
										
										
										
											2001-12-03 03:29:57 +00:00
										 |  |  |  | 	</tr> | 
					
						
							|  |  |  |  | 	<tr> | 
					
						
							|  |  |  |  | 		<td align="center"><code><a href="../../boost/integer/static_min_max.hpp"><boost/integer/static_min_max.hpp></a><br> | 
					
						
							|  |  |  |  |       <br> | 
					
						
							|  |  |  |  |       </code><a href="doc/static_min_max.html">documentation</a></td> | 
					
						
							|  |  |  |  | 		<td valign="top">Templates for finding the extrema of two numbers.</td> | 
					
						
							|  |  |  |  | 		<td valign="top">Use to find a bound based on a minimum or maximum value. | 
					
						
							|  |  |  |  |       Useful for generic programming. </td> | 
					
						
							|  |  |  |  | 	</tr> | 
					
						
							| 
									
										
										
										
											2000-07-27 14:04:40 +00:00
										 |  |  |  | </table> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | <h2>Rationale</h2> | 
					
						
							| 
									
										
										
										
											2000-11-12 18:37:04 +00:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-12-03 03:29:57 +00:00
										 |  |  |  | <p>The organization of boost integer headers and classes is designed to | 
					
						
							|  |  |  |  | take advantage of <cite><stdint.h></cite> types from the 1999 C | 
					
						
							|  |  |  |  | standard without resorting to undefined behavior in terms of the 1998 | 
					
						
							|  |  |  |  | C++ standard.  The header <cite><boost/cstdint.hpp></cite> makes | 
					
						
							|  |  |  |  | the standard integer types safely available in namespace | 
					
						
							|  |  |  |  | <code>boost</code> without placing any names in namespace | 
					
						
							|  |  |  |  | <code>std</code>.  As always, the intension is to complement rather than | 
					
						
							|  |  |  |  | compete with the C++ Standard Library.  Should some future C++ standard | 
					
						
							|  |  |  |  | include <cite><stdint.h></cite> and <cite><cstdint></cite>, | 
					
						
							|  |  |  |  | then <cite><boost/cstdint.hpp></cite> will continue to function, | 
					
						
							|  |  |  |  | but will become redundant and may be safely deprecated.</p> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | <p>Because these are boost headers, their names conform to boost header | 
					
						
							|  |  |  |  | naming conventions rather than C++ Standard Library header naming | 
					
						
							|  |  |  |  | conventions.</p> | 
					
						
							| 
									
										
										
										
											2000-07-27 14:04:40 +00:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-12-03 03:29:57 +00:00
										 |  |  |  | <h2><i>Caveat emptor</i></h2> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | <p>As an implementation artifact, certain C | 
					
						
							|  |  |  |  | <cite><limits.h></cite> macro names may possibly be visible to | 
					
						
							|  |  |  |  | users of <cite><boost/cstdint.hpp></cite>.  Don't use these | 
					
						
							|  |  |  |  | macros; they are not part of any Boost-specified interface.  Use | 
					
						
							|  |  |  |  | <code>boost::integer_traits<></code> or | 
					
						
							|  |  |  |  | <code>std::numeric_limits<></code> instead.</p> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | <p>As another implementation artifact, certain C | 
					
						
							|  |  |  |  | <cite><stdint.h></cite> typedef names may possibly be visible in | 
					
						
							|  |  |  |  | the global namespace to users of <cite><boost/cstdint.hpp></cite>. | 
					
						
							|  |  |  |  |  Don't use these names, they are not part of any Boost-specified | 
					
						
							| 
									
										
										
										
											2000-11-12 18:37:04 +00:00
										 |  |  |  | interface.  Use the respective names in namespace <code>boost</code> | 
					
						
							| 
									
										
										
										
											2001-12-03 03:29:57 +00:00
										 |  |  |  | instead.</p> | 
					
						
							| 
									
										
										
										
											2000-11-12 18:37:04 +00:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2000-07-27 14:04:40 +00:00
										 |  |  |  | <hr> | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-11-25 18:38:02 +00:00
										 |  |  |  | <p>Revised: <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %b %Y" startspan -->06 Nov 2007<!--webbot bot="Timestamp" endspan i-checksum="15272" --> | 
					
						
							| 
									
										
										
										
											2000-07-27 14:04:40 +00:00
										 |  |  |  | </p> | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-11-25 18:38:02 +00:00
										 |  |  |  | <p><EFBFBD> Copyright Beman Dawes 2003</p> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | <p>Distributed under the Boost Software License, Version 1.0. See | 
					
						
							|  |  |  |  | <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a></p> | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2000-07-27 14:04:40 +00:00
										 |  |  |  | </body> | 
					
						
							| 
									
										
										
										
											2007-11-25 18:38:02 +00:00
										 |  |  |  | </html> |