• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1[article Boost.Integer
2    [quickbook 1.6]
3    [compatibility-mode 1.5]
4    [copyright 2001-2009 Beman Dawes, Daryle Walker, Gennaro Prota, John Maddock]
5    [license
6        Distributed under the Boost Software License, Version 1.0.
7        (See accompanying file LICENSE_1_0.txt or copy at
8        [@http://www.boost.org/LICENSE_1_0.txt])
9    ]
10    [authors [Dawes, Beman], [Walker, Daryle], [Prota, Gennaro], [Maddock, John]]
11    [/last-revision $Date: 2008-02-21 12:58:15 +0000 (Thu, 21 Feb 2008) $]
12]
13
14[template super[x]'''<superscript>'''[x]'''</superscript>''']
15
16[section:overview Overview]
17
18Boost.Integer provides integer type support, particularly helpful in generic programming.
19It provides the means to select an integer type based upon its properties, like the number of bits or
20the maximum supported value, as well as compile-time bit mask selection.  There is a derivative of
21std::numeric_limits that provides integral constant expressions for `min` and `max`.
22Finally, it provides two compile-time algorithms: determining the highest power of two in a
23compile-time value; and computing min and max of constant expressions.
24
25[table
26   [[Component][Header][Purpose]]
27   [
28      [Forward Declarations.]
29      [[^[@../../../../boost/integer_fwd.hpp <boost/integer_fwd.hpp>]]]
30      [Forward declarations of classes and class templates - for use when just the name of a class is needed.]
31   ]
32   [
33      [[link boost_integer.traits Integer Traits].]
34      [[^[@../../../../boost/integer_traits.hpp <boost/integer_traits.hpp>]]]
35      [Class template [^boost::integer_traits], derives from [^std::numeric_limits] and adds [^const_min] and [^const_max] members.]
36   ]
37   [
38      [[link boost_integer.integer Integer Type Selection].]
39      [[^[@../../../../boost/integer.hpp <boost/integer.hpp>]]]
40      [Templates for integer type selection based on properties such as maximum value or number of bits:
41      Use to select the type of an integer when some property such as maximum value or number of bits is known.
42      Useful for generic programming. ]
43   ]
44   [
45      [[link boost_integer.gcd_lcm Greatest Common Divisor and Least Common Multiple].]
46      [[^[@../../../../boost/integer/common_factor_rt.hpp <boost/integer/common_factor_rt.hpp>]] and [^[@../../../../boost/integer/common_factor_ct.hpp <boost/integer/common_factor_ct.hpp>]]]
47      [Functions `gcd` and `lcm` plus function objects and compile time versions.]
48   ]
49   [
50      [[link boost_integer.mask Integer Masks].]
51      [[^[@../../../../boost/integer/integer_mask.hpp <boost/integer/integer_mask.hpp>]]]
52      [Templates for the selection of integer masks, single or lowest group, based on the number of bits:
53      Use to select a particular mask when the bit position(s) are based on a compile-time variable. Useful for generic programming. ]
54   ]
55   [
56      [[link boost_integer.log2 Compile time log2 Calculation].]
57      [[^[@../../../../boost/integer/static_log2.hpp <boost/integer/static_log2.hpp>]]]
58      [Template for finding the highest power of two in a number:
59      Use to find the bit-size/range based on a maximum value. Useful for generic programming. ]
60   ]
61   [
62      [[link boost_integer.minmax Compile time min/max calculation].]
63      [[^[@../../../../boost/integer/static_min_max.hpp <boost/integer/static_min_max.hpp>]]]
64      [Templates for finding the extrema of two numbers:
65      Use to find a bound based on a minimum or maximum value. Useful for generic programming. ]
66   ]
67   [
68      [[link boost_integer.extended_euclidean Extended Euclidean algorithm].]
69      [[^[@../../../../boost/integer/extended_euclidean.hpp <boost/integer/extended_euclidean.hpp>]]]
70      [Solves /mx + ny = gcd(x,y)/ for /x/ and /y/.]
71   ]
72   [
73      [[link boost_integer.mod_inverse Modular multiplicative inverse].]
74      [[^[@../../../../boost/integer/mod_inverse.hpp <boost/integer/mod_inverse.hpp>]]]
75      [Given /a/ and /m/, solves /ax/ = 1 mod /m/ for /x/.]
76   ]
77
78
79]
80
81[endsect]
82
83[section:traits Integer Traits]
84
85[section Motivation]
86
87The C++ Standard Library <limits> header supplies a class template `numeric_limits<>` with specializations for each fundamental type.
88
89For integer types, the interesting members of `std::numeric_limits<>` are:
90
91   static const bool is_specialized;      // Will be true for integer types.
92   static T min() throw();                // Smallest representable value.
93   static T max() throw();                // Largest representable value.
94   static const int digits;               // For integers, the number of value bits.
95   static const int digits10;             // The number of base 10 digits that can be represented.
96   static const bool is_signed;           // True if the type is signed.
97   static const bool is_integer;          // Will be true for all integer types.
98
99For many uses, these are sufficient.
100But min() and max() are problematical because they are not constant expressions (std::5.19),
101yet some usages require constant expressions.
102
103The template class [^integer_traits] addresses this problem.
104
105[endsect]
106
107[section Synopsis]
108
109   namespace boost {
110     template<class T>
111     class integer_traits : public std::numeric_limits<T>
112     {
113     public:
114        static const bool is_integral = false;
115        //
116        // These members are defined only if T is a built-in
117        // integal type:
118        //
119        static const T const_min = ``['implementation-defined]``;
120        static const T const_max = ``['implementation-defined]``;
121     };
122   }
123
124[endsect]
125
126[section Description]
127
128Template class [^integer_traits] is derived from [^std::numeric_limits]. The primary specialization adds the single
129[^bool] member [^is_integral] with the compile-time constant value [^false].
130However, for all integral types [^T] (std::3.9.1/7 [basic.fundamental]), there are specializations
131provided with the following compile-time constants defined:
132
133[table
134   [[member][type][value]]
135   [[[^is_integral]][bool][[^true]]]
136   [[[^const_min]][[^T]][equivalent to [^std::numeric_limits<T>::min()]]]
137   [[[^const_max]][[^T]][equivalent to [^std::numeric_limits<T>::max()]]]
138]
139
140Note: The /is_integral/ flag is provided, because a user-defined integer class should specialize
141[^std::numeric_limits<>::is_integer = true], while compile-time constants
142[^const_min] and [^const_max] are not provided for that user-defined class, unless boost::integer_traits is also specialized.
143
144[endsect]
145
146[section Test Program]
147
148The program [^[@../../test/integer_traits_test.cpp integer_traits_test.cpp]] exercises the [^integer_traits] class.
149
150[endsect]
151
152[section Acknowledgements]
153
154Beman Dawes, Ed Brey, Steve Cleary, and Nathan Myers discussed the integer traits idea on the boost mailing list in August 1999.
155
156[endsect]
157[endsect]
158
159[section:integer Integer Type Selection]
160
161The [@../../../../boost/integer.hpp <boost/integer.hpp>] type selection templates allow
162integer types to be selected based on desired characteristics such as number of bits or maximum value.
163This facility is particularly useful for solving generic programming problems.
164
165[section:synopsis Synopsis]
166
167   namespace boost
168   {
169     //  fast integers from least integers
170     template<typename LeastInt>
171     struct int_fast_t
172     {
173         typedef ``['implementation-defined-type]``  type;
174     };
175
176     //  signed
177     template<int Bits>
178     struct int_t
179     {
180         /* Member exact may or may not be defined depending upon Bits */
181         typedef ``['implementation-defined-type]``  exact;
182         typedef ``['implementation-defined-type]``  least;
183         typedef int_fast_t<least>::fast      fast;
184     };
185
186     //  unsigned
187     template<int Bits>
188     struct uint_t
189     {
190         /* Member exact may or may not be defined depending upon Bits */
191         typedef ``['implementation-defined-type]``  exact;
192         typedef ``['implementation-defined-type]``  least;
193         typedef int_fast_t<least>::fast      fast;
194     };
195
196     //  signed
197     template<long long MaxValue>
198     struct int_max_value_t
199     {
200         typedef ``['implementation-defined-type]``  least;
201         typedef int_fast_t<least>::fast      fast;
202     };
203
204     template<long long MinValue>
205     struct int_min_value_t
206     {
207         typedef ``['implementation-defined-type]``  least;
208         typedef int_fast_t<least>::fast      fast;
209     };
210
211     //  unsigned
212     template<unsigned long long Value>
213     struct uint_value_t
214     {
215         typedef ``['implementation-defined-type]``  least;
216         typedef int_fast_t<least>::fast      fast;
217     };
218   } // namespace boost
219
220[endsect]
221
222[section:easiest Easiest-to-Manipulate Types]
223
224The [^int_fast_t] class template maps its input type to the next-largest type that the processor
225can manipulate the easiest, or to itself if the input type is already an easy-to-manipulate type.
226For instance, processing a bunch of [^char] objects may go faster if they were converted to [^int] objects before processing.
227The input type, passed as the only template parameter, must be a built-in integral type, except [^bool].
228Unsigned integral types can be used, as well as signed integral types.
229The output type is given as the nested type [^fast].
230
231[*Implementation Notes:]
232By default, the output type is identical to the input type. Eventually, this code's implementation should
233be customized for each platform to give accurate mappings between the built-in types and the easiest-to-manipulate
234built-in types. Also, there is no guarantee that the output type actually is easier to manipulate than the input type.
235
236[endsect]
237
238[section:sized Sized Types]
239
240The [^int_t], [^uint_t], [^int_max_value_t], [^int_min_value_t], and [^uint_value_t] class templates find
241the most appropiate built-in integral type for the given template parameter. This type is given by the
242nested type [^least]. The easiest-to-manipulate version of that type is given by the nested type [^fast].
243The following table describes each template's criteria.
244
245[table Criteria for the Sized Type Class Templates
246   [
247      [Class Template][Template Parameter Mapping]
248   ]
249   [
250      [[^boost::int_t<N>::least]]
251      [The smallest, built-in, signed integral type with at least /N/ bits, including the sign bit.
252      The parameter should be a positive number. A compile-time error results if the parameter is
253      larger than the number of bits in the largest integer type.]
254   ]
255   [
256      [[^boost::int_t<N>::fast]]
257      [The easiest-to-manipulate, built-in, signed integral type with at least /N/ bits, including the sign bit.
258      The parameter should be a positive number. A compile-time error results if the parameter is
259      larger than the number of bits in the largest integer type.]
260   ]
261   [
262      [[^boost::int_t<N>::exact]]
263      [A built-in, signed integral type with exactly /N/ bits, including the sign bit.
264      The parameter should be a positive number.  Note that the member /exact/ is defined
265      [*only] if there exists a type with exactly /N/ bits.]
266   ]
267   [
268      [[^boost::uint_t<N>::least]]
269      [The smallest, built-in, unsigned integral type with at least /N/ bits.
270      The parameter should be a positive number. A compile-time error results if the
271      parameter is larger than the number of bits in the largest integer type.]
272   ]
273   [
274      [[^boost::uint_t<N>::fast]]
275      [The easiest-to-manipulate, built-in, unsigned integral type with at least /N/ bits.
276      The parameter should be a positive number. A compile-time error results if the
277      parameter is larger than the number of bits in the largest integer type.]
278   ]
279   [
280      [[^boost::uint_t<N>::exact]]
281      [A built-in, unsigned integral type with exactly /N/ bits.
282      The parameter should be a positive number. A compile-time error results if the
283      parameter is larger than the number of bits in the largest integer type.
284      Note that the member /exact/ is defined
285      [*only] if there exists a type with exactly N bits.]
286   ]
287   [
288      [[^boost::int_max_value_t<V>::last]]
289      [The smallest, built-in, signed integral type that can hold all the values in the inclusive range ['0 - V].
290      The parameter should be a positive number.]
291   ]
292   [
293      [[^boost::int_max_value_t<V>::fast]]
294      [The easiest-to-manipulate, built-in, signed integral type that can hold all the values in the inclusive range ['0 - V].
295      The parameter should be a positive number.]
296   ]
297   [
298      [[^boost::int_min_value_t<V>::least]]
299      [The smallest, built-in, signed integral type that can hold all the values in the inclusive range ['V - 0].
300      The parameter should be a negative number.]
301   ]
302   [
303      [[^boost::int_min_value_t<V>::fast]]
304      [The easiest-to-manipulate, built-in, signed integral type that can hold all the values in the inclusive range ['V - 0].
305      The parameter should be a negative number.]
306   ]
307   [
308      [[^boost::uint_value_t<V>::least]]
309      [The smallest, built-in, unsigned integral type that can hold all positive values
310      up to and including /V/. The parameter should be a positive number.]
311   ]
312   [
313      [[^boost::uint_value_t<V>::fast]]
314      [The easiest-to-manipulate, built-in, unsigned integral type that can hold all positive values
315      up to and including /V/. The parameter should be a positive number.]
316   ]
317]
318
319[endsect]
320
321[section Example]
322
323   #include <boost/integer.hpp>
324
325   //...
326
327   int main()
328   {
329       boost::int_t<24>::least my_var;  // my_var has at least 24-bits
330       //...
331       // This one is guaranteed not to be truncated:
332       boost::int_max_value_t<1000>::least my1000 = 1000;
333       //...
334       // This one is guaranteed not to be truncated, and as fast
335       // to manipulate as possible, its size may be greater than
336       // that of my1000:
337       boost::int_max_value_t<1000>::fast my_fast1000 = 1000;
338   }
339
340[endsect]
341
342[section Demonstration Program]
343
344The program [@../../test/integer_test.cpp integer_test.cpp] is a simplistic demonstration of the results from instantiating
345various examples of the sized type class templates.
346
347[endsect]
348
349[section Rationale]
350
351The rationale for the design of the templates in this header includes:
352
353* Avoid recursion because of concern about C++'s limited guaranteed recursion depth (17).
354* Avoid macros on general principles.
355* Try to keep the design as simple as possible.
356
357[endsect]
358
359[section Alternative]
360
361If the number of bits required is known beforehand, it may be more appropriate to use the types supplied
362in [@../../../../boost/cstdint.hpp <boost/cstdint.hpp>].
363
364[endsect]
365
366[section Credits]
367
368The author of most of the Boost integer type choosing templates is
369[@http://www.boost.org/people/beman_dawes.html Beman Dawes].
370He gives thanks to Valentin Bonnard and [@http://www.boost.org/people/kevlin_henney.htm Kevlin Henney]
371for sharing their designs for similar templates.
372[@http://www.boost.org/people/daryle_walker.html Daryle Walker] designed the value-based sized templates.
373
374[endsect]
375[endsect]
376
377[include gcd/math-gcd.qbk]
378[include modular_arithmetic/extended_euclidean.qbk]
379[include modular_arithmetic/mod_inverse.qbk]
380
381[section:mask Integer Masks]
382
383[section Overview]
384
385The class templates in [@../../../../boost/integer/integer_mask.hpp <boost/integer/integer_mask.hpp>]
386provide bit masks for a certain bit position or a contiguous-bit pack of a certain size.
387The types of the masking constants come from the [link boost_integer.integer integer type selection templates] header.
388
389[endsect]
390
391[section Synopsis]
392
393   #include <cstddef>  // for std::size_t
394
395   namespace boost
396   {
397
398   template <std::size_t Bit>
399   struct high_bit_mask_t
400   {
401       typedef ``['implementation-defined-type]``  least;
402       typedef ``['implementation-defined-type]``  fast;
403
404       static const least       high_bit       = ``['implementation-defined]``;
405       static const fast        high_bit_fast  = ``['implementation-defined]``;
406
407       static const std::size_t bit_position   = Bit;
408   };
409
410   template <std::size_t Bits>
411   struct low_bits_mask_t
412   {
413       typedef ``['implementation-defined-type]``  least;
414       typedef ``['implementation-defined-type]``  fast;
415
416       static const least       sig_bits       = ``['implementation-defined]``;
417       static const fast        sig_bits_fast  = ``['implementation-defined]``;
418
419       static const std::size_t bit_count      = Bits;
420   };
421
422   // Specializations for low_bits_mask_t exist for certain bit counts.
423
424   }  // namespace boost
425
426[endsect]
427
428[section Single Bit-Mask Class Template]
429
430The [^boost::high_bit_mask_t] class template provides constants for bit masks representing the bit at a
431certain position. The masks are equivalent to the value 2[super Bit], where [^Bit] is the template parameter.
432The bit position must be a nonnegative number from zero to ['Max], where Max is one less than the
433number of bits supported by the largest unsigned built-in integral type. The following table describes
434the members of an instantiation of [^high_bit_mask_t].
435
436[table Members of the `boost::high_bit_mask_t` Class Template
437   [[Member][Meaning]]
438   [[[^least]][The smallest, unsigned, built-in type that supports the given bit position.]]
439   [[[^fast]][The easiest-to-manipulate analog of [^least].]]
440   [[[^high_bit]][A [^least] constant of the value 2[super Bit].]]
441   [[[^high_bit_fast]][A [^fast] analog of [^high_bit].]]
442   [[[^bit_position]][The value of the template parameter, in case its needed from a renamed instantiation of the class template.]]
443]
444
445[endsect]
446
447[section Group Bit-Mask Class Template]
448
449The [^boost::low_bits_mask_t] class template provides constants for bit masks
450equivalent to the value (2[super Bits] - 1), where [^Bits] is the template parameter.
451The parameter [^Bits] must be a non-negative integer from
452zero to ['Max], where Max is the number of bits supported by the largest, unsigned, built-in integral type.
453The following table describes the members of [^low_bits_mask_t].
454
455[table Members of the [^boost::low_bits_mask_t] Class Template
456[[Member][Meaning]]
457[[[^least]][The smallest, unsigned built-in type that supports the given bit count.]]
458[[[^fast]][The easiest-to-manipulate analog of [^least].]]
459[[[^sig_bits]][A [^least] constant of the desired bit-masking value.]]
460[[[^sig_bits_fast]][A [^fast] analog of [^sig_bits].]]
461[[[^bit_count]][The value of the template parameter, in case its needed from a renamed instantiation of the class template.]]
462]
463
464[endsect]
465
466[section Implementation Notes]
467
468When [^Bits] is the exact size of a built-in unsigned type, the implementation has to change to
469prevent undefined behavior. Therefore, there are specializations of [^low_bits_mask_t] at those bit counts.
470
471[endsect]
472
473[section Example]
474
475   #include <boost/integer/integer_mask.hpp>
476
477   //...
478
479   int main()
480   {
481       typedef boost::high_bit_mask_t<29>  mask1_type;
482       typedef boost::low_bits_mask_t<15>  mask2_type;
483
484       mask1_type::least  my_var1;
485       mask2_type::fast   my_var2;
486       //...
487
488       my_var1 |= mask1_type::high_bit;
489       my_var2 &= mask2_type::sig_bits_fast;
490
491       //...
492   }
493
494[endsect]
495
496[section Demonstration Program]
497
498The program [@../../test/integer_mask_test.cpp integer_mask_test.cpp] is a simplistic demonstration of the
499results from instantiating various examples of the bit mask class templates.
500
501[endsect]
502
503[section Rationale]
504
505The class templates in this header are an extension of the [link boost_integer.integer integer type selection class templates].
506The new class templates provide the same sized types, but also convenient masks to use when extracting the
507highest or all the significant bits when the containing built-in type contains more bits.
508This prevents contamination of values by the higher, unused bits.
509
510[endsect]
511
512[section Credits]
513
514The author of the Boost bit mask class templates is [@http://www.boost.org/people/daryle_walker.html Daryle Walker].
515
516[endsect]
517[endsect]
518
519[section:log2 Compile Time log2 Calculation]
520
521The class template in [@../../../../boost/integer/static_log2.hpp <boost/integer/static_log2.hpp>]
522determines the position of the highest bit in a given value. This facility is useful for solving generic programming problems.
523
524[section Synopsis]
525
526   namespace boost
527   {
528
529     typedef ``['implementation-defined]`` static_log2_argument_type;
530     typedef ``['implementation-defined]`` static_log2_result_type;
531
532     template <static_log2_argument_type arg>
533     struct static_log2
534     {
535       static const static_log2_result_type value = ``['implementation-defined]``;
536     };
537
538
539     template < >
540     struct static_log2< 0 >
541     {
542       // The logarithm of zero is undefined.
543     };
544
545
546   }  // namespace boost
547
548[endsect]
549
550[section Usage]
551
552The [^boost::static_log2] class template takes one template parameter, a value of type
553[^static_log2_argument_type]. The template only defines one member, [^value], which gives the
554truncated, base-two logarithm of the template argument.
555
556Since the logarithm of zero, for any base, is undefined, there is a specialization of [^static_log2]
557for a template argument of zero. This specialization has no members, so an attempt to use the base-two
558logarithm of zero results in a compile-time error.
559
560Note:
561
562* [^static_log2_argument_type] is an ['unsigned integer type] (C++ standard, 3.9.1p3).
563* [^static_log2_result_type] is an ['integer type] (C++ standard, 3.9.1p7).
564
565[endsect]
566
567[section Demonstration Program]
568
569The program [@../../test/static_log2_test.cpp static_log2_test.cpp] is a simplistic
570demonstration of the results from instantiating various examples of the binary logarithm class template.
571
572[endsect]
573
574[section Rationale]
575
576The base-two (binary) logarithm, abbreviated lb, function is occasionally used to give order-estimates
577of computer algorithms. The truncated logarithm can be considered the highest power-of-two in a value,
578which corresponds to the value's highest set bit (for binary integers). Sometimes the highest-bit position
579could be used in generic programming, which requires the position to be available statically (['i.e.] at compile-time).
580
581[endsect]
582
583[section Credits]
584
585The original version of the Boost binary logarithm class template was
586written by [@http://www.boost.org/people/daryle_walker.html Daryle Walker] and then
587enhanced by Giovanni Bajo with support for compilers without partial template specialization.
588The current version was suggested, together with a reference implementation, by Vesa Karvonen.
589Gennaro Prota wrote the actual source file.
590
591[endsect]
592[endsect]
593
594[section:minmax Compile time min/max calculation]
595
596The class templates in [@../../../../boost/integer/static_min_max.hpp <boost/integer/static_min_max.hpp>]
597provide a compile-time evaluation of the minimum or maximum of two integers. These facilities are useful
598for generic programming problems.
599
600[section Synopsis]
601
602   namespace boost
603   {
604
605   typedef ``['implementation-defined]`` static_min_max_signed_type;
606   typedef ``['implementation-defined]`` static_min_max_unsigned_type;
607
608   template <static_min_max_signed_type Value1, static_min_max_signed_type Value2 >
609       struct static_signed_min;
610
611   template <static_min_max_signed_type Value1, static_min_max_signed_type Value2>
612       struct static_signed_max;
613
614   template <static_min_max_unsigned_type Value1, static_min_max_unsigned_type Value2>
615       struct static_unsigned_min;
616
617   template <static_min_max_unsigned_type Value1, static_min_max_unsigned_type Value2>
618       struct static_unsigned_max;
619
620   }
621
622[endsect]
623
624[section Usage]
625
626The four class templates provide the combinations for finding the minimum or maximum of two [^signed] or
627[^unsigned] ([^long]) parameters, /Value1/ and /Value2/, at compile-time. Each template has a single static data member,
628[^value], which is set to the respective minimum or maximum of the template's parameters.
629
630[endsect]
631
632[section Example]
633
634   #include <boost/integer/static_min_max.hpp>
635
636   template < unsigned long AddendSize1, unsigned long AddendSize2 >
637   class adder
638   {
639   public:
640       static  unsigned long  const  addend1_size = AddendSize1;
641       static  unsigned long  const  addend2_size = AddendSize2;
642       static  unsigned long  const  sum_size = boost::static_unsigned_max<AddendSize1, AddendSize2>::value + 1;
643
644       typedef int  addend1_type[ addend1_size ];
645       typedef int  addend2_type[ addend2_size ];
646       typedef int  sum_type[ sum_size ];
647
648       void  operator ()( addend1_type const &a1, addend2_type const &a2, sum_type &s ) const;
649   };
650
651   //...
652
653   int main()
654   {
655       int const   a1[] = { 0, 4, 3 };  // 340
656       int const   a2[] = { 9, 8 };     //  89
657       int         s[ 4 ];
658       adder<3,2>  obj;
659
660       obj( a1, a2, s );  // 's' should be 429 or { 9, 2, 4, 0 }
661       //...
662   }
663
664[endsect]
665
666[section Demonstration Program]
667
668The program [@../../test/static_min_max_test.cpp static_min_max_test.cpp] is a simplistic demonstration of
669various comparisons using the compile-time extrema class templates.
670
671[endsect]
672
673[section Rationale]
674
675Sometimes the minimum or maximum of several values needs to be found for later compile-time processing,
676['e.g.] for a bound for another class template.
677
678[endsect]
679
680[section Credits]
681
682The author of the Boost compile-time extrema class templates is [@http://www.boost.org/people/daryle_walker.html Daryle Walker].
683
684[endsect]
685[endsect]
686
687[section:history History]
688
689[h4 1.56.0]
690
691* Moved `<boost/cstdint.hpp>` into [@boost:/libs/config/index.html
692  Boost.Config].
693
694[h4 1.42.0]
695
696* Reverted Trunk to release branch state (i.e. a "known good state").
697* Fixed issues: [@https://svn.boost.org/trac/boost/ticket/653 653],
698[@https://svn.boost.org/trac/boost/ticket/3084 3084],
699[@https://svn.boost.org/trac/boost/ticket/3177 3177],
700[@https://svn.boost.org/trac/boost/ticket/3180 3180],
701[@https://svn.boost.org/trac/boost/ticket/3548 3568],
702[@https://svn.boost.org/trac/boost/ticket/3657 3657],
703[@https://svn.boost.org/trac/boost/ticket/2134 2134].
704* Added long long support to [^boost::static_log2], [^boost::static_signed_min], [^boost::static_signed_max],
705[^boost::static_unsigned_min][^boost::static_unsigned_max], when available.
706* The argument type and the result type of [^boost::static_signed_min] etc are now typedef'd.
707Formerly, they were hardcoded as [^unsigned long] and [^int] respectively. Please, use the
708provided typedefs in new code (and update old code as soon as possible).
709
710[h4 1.32.0]
711
712* The argument type and the result type of [^boost::static_log2] are now typedef'd.
713Formerly, they were hardcoded as [^unsigned long] and [^int] respectively. Please, use the
714provided typedefs in new code (and update old code as soon as possible).
715
716[endsect]
717
718[section:cstdint Removed from library: Standard Integer Types]
719
720The [@boost:/libs/config/doc/html/boost_config/cstdint.html Boost.Config] module provides
721the typedefs useful for writing portable code that requires certain
722integer widths.
723
724[endsect]
725