Changeset 63881


Ignore:
Timestamp:
Jul 11, 2010, 5:26:34 PM (8 years ago)
Author:
murilov
Message:

Improving documentation
Added pragma to avoid a warning in MSVC compilers
Some cosmetic changes

Location:
sandbox/SOC/2010/bits_and_ints
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • sandbox/SOC/2010/bits_and_ints/boost/integer/round_power_2.hpp

    r63833 r63881  
    1313
    1414/*
    15  *      The functions declared in this file an integra rounds up or down to
    16  *              the next power of 2.
     15 *      The functions declared in this file rounds up or down an integral to the next power of 2.
    1716 *
    18  *      The functions `ceil_to_power_2()' rounds up and the functions
    19  *              `floor_to_power_2()' rounds down.
     17 *      The functions `ceil_pow2()' rounds up and the functions
     18 *              `floor_pow2()' rounds down.
    2019 *
    2120 *      Usage:
    2221 *     
    23  *      T x = ceil_to_power_2(y);  // rounds down
    24  *  T z = floor_to_power_2(w); // rounds up
     22 *      T x = ceil_pow2(y);  // rounds down
     23 *  T z = floor_pow2(w); // rounds up
    2524 */
    2625
    2726namespace boost {
    2827       
    29 uint8_t ceil_to_power_2(uint8_t value)
     28uint8_t ceil_pow2(uint8_t value)
    3029{
    3130        value = value - 1;
     
    3736}
    3837
    39 uint16_t ceil_to_power_2(uint16_t value)
     38uint16_t ceil_pow2(uint16_t value)
    4039{
    4140        value = value - 1;
     
    4847}
    4948       
    50 uint32_t ceil_to_power_2(uint32_t value)
     49uint32_t ceil_pow2(uint32_t value)
    5150{
    5251        value = value - 1;
     
    6160
    6261#ifndef BOOST_HAS_INT64_T
    63 uint64_t ceil_to_power_2(uint64_t value)
     62uint64_t ceil_pow2(uint64_t value)
    6463{
    6564        value = value - 1;
     
    7574#endif
    7675       
    77 uint8_t floor_to_power_2(uint8_t value)
     76uint8_t floor_pow2(uint8_t value)
    7877{
    7978        value = value | (value >> 1);
     
    8483}
    8584       
    86 uint16_t floor_to_power_2(uint16_t value)
     85uint16_t floor_pow2(uint16_t value)
    8786{
    8887        value = value | (value >> 1);
     
    9493}
    9594       
    96 uint32_t floor_to_power_2(uint32_t value)
     95uint32_t floor_pow2(uint32_t value)
    9796{
    9897        value = value | (value >> 1);
     
    106105
    107106#ifndef BOOST_HAS_INT64_T
    108 uint64_t floor_to_power_2(uint64_t value)
     107uint64_t floor_pow2(uint64_t value)
    109108{
    110109        value = value | (value >> 1);
  • sandbox/SOC/2010/bits_and_ints/boost/integer/static_abs.hpp

    r63833 r63881  
    2323/*
    2424 *      This header defines mpl::abs<> and static_abs<> metafunctions.
    25  *      The mpl::abs<> version returns the absolute value of an mpl::integral_c<>
    26  *              and the static_abs version returns the absolute value from an integral value.
     25 *      The mpl::abs<> version returns the absolute value of a mpl::integral_c<>
     26 *              and the static_abs<> version returns the absolute value from an integral value.
    2727 */
    2828
     
    3737}
    3838
    39 template <typename T, T data, class Enable = typename enable_if< is_integral<T> >::type >
    40 struct static_abs : mpl::abs< mpl::integral_c<T, data> >
     39template <typename T, T Value, class Enable = typename enable_if< is_integral<T> >::type >
     40struct static_abs : mpl::abs< mpl::integral_c<T, Value> >
    4141{};
    4242
  • sandbox/SOC/2010/bits_and_ints/boost/integer/static_clear_least_bit_set.hpp

    r63783 r63881  
    4747 *      Requires T to be an integral type
    4848 */
    49 template <typename T, T value>
    50 struct static_clear_least_bit_set : mpl::clear_least_bit_set< mpl::integral_c<T, value> >
     49template <typename T, T Value>
     50struct static_clear_least_bit_set : mpl::clear_least_bit_set< mpl::integral_c<T, Value> >
    5151{};
    5252
  • sandbox/SOC/2010/bits_and_ints/boost/integer/static_lcm.hpp

    r63833 r63881  
    2222/*
    2323 *      This header defines mpl::lcm<> metafunction wich calculates the
    24  *              least common multiplier from two given mpl::integral_c<> ICT1 and ICT2.
     24 *              least common multiple from two given mpl::integral_c<> ICT1 and ICT2.
    2525 */
    2626       
  • sandbox/SOC/2010/bits_and_ints/boost/integer/static_sign.hpp

    r63833 r63881  
    4343}
    4444
    45 template <typename T, T data
     45template <typename T, T Value
    4646    , class Enable = typename enable_if<
    4747        is_integral<T>
    4848    >::type
    4949>
    50 struct static_sign : mpl::sign<mpl::integral_c< T, data> >
     50struct static_sign : mpl::sign<mpl::integral_c<T, Value> >
    5151{};
    5252
  • sandbox/SOC/2010/bits_and_ints/boost/integer/static_sign_extend.hpp

    r63833 r63881  
    3131 */
    3232
     33#ifdef BOOST_MSVC
     34#pragma warning ( disable : 4307 )
     35#endif
     36
    3337namespace boost {
    3438       
  • sandbox/SOC/2010/bits_and_ints/libs/integer/doc/bits_and_ints.qbk

    r63203 r63881  
    285285[endsect]
    286286
     287[section Static Functions `mpl::sign` and `static_sign`]
     288The compile-time versions can be included via [@../../../../boost/integer/static_sign.hpp <boost/integer/static_sign.hpp>].
     289
     290        template <typename IC>
     291        struct mpl::sign { static const int value = ``['implementation-defined]``; };
     292       
     293        template <template T, T Value>
     294        struct static_same_sign { static const int value = ``['implementation-defined]``; };
     295       
     296[table
     297        [[Parameter][Description]]
     298        [[`IC`][ A `mpl::integral_c<>` type. ]]
     299        [[`T`][ The value type. Must be an integral type. ]]
     300        [[`Value`][ The value to be checked. ]]
     301]
     302
     303*[*Requires: ] `T` to be an integral type and `IC` to be an `mpl::integral_c<>` type.
     304
     305[endsect]
     306
    287307[section Examples]
    288308*[*Run-time version:]
     
    369389
    370390        int pop_count(uintmax_t value);
    371 
    372 [endsect]
    373 
    374 [*Returns: ] The number of bits set in `value`.
     391       
     392        template <uintmax_t Value>
     393        struct static_pop_count { static const int value = ``['implementation-defined]``; };
     394       
     395        template <typename IC>
     396        struct pop_count { static const int value = ``['implementation-defined]``; };
     397
     398[endsect]
     399
     400*[*Requires: ] `IC` must be an `mpl::integral_c<>` type.
     401*[*Returns: ] The number of bits set in `value`. For the compile-time versions, the result will be on member `value`.
    375402
    376403[endsect]
     
    381408[section Synopsis]
    382409
     410        template <typename T>
    383411        T clear_least_bit_set(T value);
    384 
    385 [endsect]
    386 
    387 *[*Remarks: ] `T` must be an integral type.
     412       
     413        template <typename IC>
     414        struct mpl::clear_least_bit_set { static const typename IC::value_type value = ``['implementation-defined]``; };
     415       
     416        template <typename T, T Value>
     417        struct static_clear_least_bit_set { static const T value = ``['implementation-defined]``; };
     418
     419[endsect]
     420
     421*[*Requires: ] `T` must be an integral type. `IC` must be an `mpl::integral_c<>` type.
    388422
    389423*[*Returns: ] `value` with it's least significant active bit disactivated.
     
    392426
    393427[section Count Trailing Zeros]
    394 The `count_trailing_zeros()` function counts the number of consecutive 0's from the least significant bit of an integral value.
    395 This function is defined on [@../../../../boost/integer/count_trailing_zeros.hpp <boost/integer/count_trailing_zeros.hpp>]
     428The `count_trailing_zeros` function and metafunctions counts the number of consecutive 0's from the least significant bit of an integral value.
     429The runtime function is defined on [@../../../../boost/integer/count_trailing_zeros.hpp <boost/integer/count_trailing_zeros.hpp>] and
     430the compile-time metafunctions are defined on [@../../../../boost/integer/static_count_trailing_zeros.hpp <boost/integer/static_count_trailing_zeros.hpp>]
    396431
    397432[section Synopsis]
     
    399434        int count_trailing_zeros(uintmax_t value);
    400435       
    401 [endsect]
    402 
    403 *[*Returns: ] The number of consecutive zeros from the least significant bit.
     436        template <typename IC>
     437        struct mpl::count_trailing_zeros { static const int value = ``['implementation-defined]``; };
     438       
     439        template <uintmax_t Value>
     440        struct static_count_trailing_zeros { static const int value = ``['implementation-defined]``; };
     441       
     442[endsect]
     443
     444*[*Requires: ] For the `mpl::count_trailing_zeros<>` version, `IC` must be an mpl::integral_c<> type.
     445*[*Returns: ] For the runtime version, the number of consecutive zeros from the least significant bit.
     446In the compile-time versions, the number of consecutive zeros in the `value` static member.
     447
     448[endsect]
     449
     450[section Safe Average]
     451Given two integer values x and y, the (floor of the) average normally would be computed by `(x+y)/2` unfortunately,
     452this can yield incorrect results due to overflow. Safe average ensures that no overflow will happen even if `(x+y)`
     453overflows the range of T.
     454The runtime version is defined on [@../../../../boost/integer/safe_avg.hpp <boost/integer/safe_avg.hpp>] and
     455the compile-time metafunctions are defined on [@../../../../boost/integer/static_safe_avg.hpp <boost/integer/static_safe_avg.hpp>]
     456
     457[section Synopsis]
     458       
     459        template <typename T>
     460        T safe_avg(T x, T y);
     461       
     462        template <typename ICT1, typename ICT2>
     463        struct mpl::safe_avg { static const int value = ``['implementation-defined]``; };
     464       
     465        template <typename T, T Value1, T Value2>
     466        struct static_safe_avg { static const int value = ``['implementation-defined]``; };
     467       
     468[endsect]
     469
     470*[*Requires: ] For the `mpl::safe_avg<>` version, both `ICT1` and `ICT2` must be mpl::integral_c<> types.
     471For the `static_safe_avg<>` and the runtime version, `T` must be an integral type.
     472
     473*[*Returns: ] The average of the sum between two integrals rounded down. Overflow is ensured to not happen.
     474
     475[endsect]
     476
     477[section Round to Power of 2 functions]
     478This function rounds up and down integral values to the next power of 2.
     479The `ceil_pow2` function rounds up and `floor_pow2` function rounds down.
     480These functions are defined on [@../../../../boost/integer/round_power_2.hpp <boost/integer/round_power_2.hpp>]
     481
     482[section Synopsis]
     483
     484        T ceil_pow2(T value);
     485        T floor_pow2(T value);
     486       
     487[endsect]
     488
     489*[*Requires: ] `T` must be convertible to `uint8_t` or  `uint16_t` or `uint32_t` or `uint64_t`.
     490
     491*[*Returns: ]
     492        * `ceil_pow2()` returns `value` rounded [*up] to the lesser power of two greater than or equal to `value.
     493       
     494        * `floor_pow2()` returns `value` rounded [*down] to the greater power of two lesser or equal `value`.
     495
     496[endsect]
     497
     498[section Transfer of Sign (isign) functions ]
     499isign or transfer of sign function is defined by:
     500``
     501        isign(x, y) =
     502                abs(x), if y is greater than or equal 0,
     503                -abs(x), if y is less than 0
     504``
     505
     506The runtime functions are defined on [@../../../../boost/integer/isign.hpp <boost/integer/isign.hpp>] and the
     507static metafunctions are defined on [@../../../../boost/integer/static_isign.hpp <boost/integer/static_isign.hpp>]
     508
     509[section Synopsis]
     510
     511        template <typename T>
     512        T isign(T x, T y);
     513       
     514        template <typename T, T Value1, T Value2>
     515        struct static_isign { static const T value = ``['implementation-defined]``; };
     516       
     517        template <typename IC1, typename IC2>
     518        struct mpl::isign { static const typename IC1::value_type value = ``['implementation-defined]``; };
     519       
     520[endsect]
     521
     522*[*Requires: ] `T` must be an integral type. Both `IC1` and `IC2` must be `mpl::integral_c<>` types.
     523*[*Returns: ]
     524        * Runtime version: returns `abs(x)` if `y` is greater than or equal 0 and `-abs(x)` if `y` is negative.
     525       
     526        * MPL version: the member `value` will be `abs(IC1::value)` if `IC2` holds an value greater than or
     527        equal 0, or `-abs(IC1::value)` if `IC2` holds a negative value.
     528
     529        * `static_isign<T, Value1, Value2>::value` will be `abs(Value1)` if Value2 is greater than or equal 0, or
     530        `-abs(Value1)` if Value2 is negative.
     531
     532[endsect]
     533
     534[section Absolute Value in Compile-Time ]
     535The static metafunctions defined on [@../../../../boost/integer/static_abs.hpp <boost/integer/static_abs.hpp>]
     536calculates the absolute value of integral constants.
     537
     538`mpl::abs<>` version returns the absolute value of a `mpl::integral_c<>`
     539and the `static_abs<>` version returns the absolute value from an integral value.
     540
     541[section Synopsis]
     542
     543        template <typename IC>
     544        struct mpl::abs { static const typename IC::value_type value = ``['implementation-defined]``; };
     545       
     546        template <typename T, T Value>
     547        struct static_abs { static const T value = ``['implementation-defined]``; };
     548       
     549[endsect]
     550
     551*[*Requires: ] `T` must be an integral type. `IC` a `mpl::integral_c<>` type.
     552
     553*[*Results: ] The member `value ` in `mpl::abs<>` will be the absolute value of `IC::value`.
     554In `static_abs<>`, `value` will be the absolute value of `Value`.
     555
     556[endsect]
     557
     558[section MPL Least Common Multiple ]
     559This header defines mpl::lcm<> metafunction wich calculates the
     560 least common multiple from two given `mpl::integral_c<>`.
     561 
     562This static metafunction is defined on [@../../../../boost/integer/static_lcm.hpp <boost/integer/static_lcm.hpp>].
     563
     564[section Synopsis]
     565
     566        template <typename ICT1, typename ICT2>
     567        struct mpl::lcm { static const uintmax_t value = ``['implementation-defined]``; };
     568       
     569[endsect]
     570
     571*[*Requires: ] `ICT1` and `ICT2` must be `mpl::integral_c<>` types.
     572
     573*[*Results: ] The member `value ` will be the least common multiple from `IC1` and `IC2`.
     574
     575[endsect]
     576
     577[section MPL Greatest Common Divisor ]
     578The header file [@../../../../boost/integer/static_gcd.hpp <boost/integer/static_gcd.hpp>] defines `mpl::gcd<>`
     579metafunction wich calculates the greatest common divisor of two given `mpl::integral_c<>`.
     580
     581[section Synopsis]
     582
     583        template <typename ICT1, typename ICT2>
     584        struct mpl::gcd { static const uintmax_t value = ``['implementation-defined]``; };
     585       
     586[endsect]
     587
     588*[*Requires: ] `ICT1` and `ICT2` must be `mpl::integral_c<>` types.
     589
     590*[*Results: ] The member `value ` will be the greatest commom divisor from `IC1` and `IC2`.
    404591
    405592[endsect]
     
    416603        // Sets the bit `pos' in data
    417604        template <typename T, T data, unsigned char pos>
    418         struct set_bit
    419         {
    420                 static const T value = ``['implementation-defined]``;
    421         }; // set_bit
     605        struct static_set_bit { static const T value = ``['implementation-defined]``; };
    422606               
    423 
    424607        // Clear the bit `pos' in data
    425608        template <typename T, T data, unsigned char pos>
    426         struct clear_bit
    427         {
    428                 static const T value = ``['implementation-defined]``;
    429         }; // clear_bit
     609        struct static_clear_bit { static const T value = ``['implementation-defined]``; };
    430610
    431611        // If the bit `pos' is 1 then it will be 0 if not the bit will be 1
    432612        template <typename T, T data, unsigned char pos>
    433         struct flip_bit
    434         {
    435                 static const T value = ``['implementation-defined]``;
    436         }; // flip_bit
     613        struct static_flip_bit{ static const T value = ``['implementation-defined]``; };
    437614
    438615        // Test if the bit in `pos' positon is set or not
    439616        template <typename T, T data, unsigned char pos>
    440         struct test_bit
    441         {
    442                 static const bool value = ``['implementation-defined]``;
    443         }; // test_bit 
     617        struct static_test_bit { static const bool value = ``['implementation-defined]``; };
     618       
     619        namespace mpl {
     620
     621        template <typename IC, unsigned char pos>
     622        struct set_bit { static const typename IC::value_type value = ``['implementation-defined]``; };
     623
     624        template <typename IC, unsigned char pos>
     625        struct clear_bit { static const typename IC::value_type value = ``['implementation-defined]``; };
     626
     627        template <typename IC, unsigned char pos>
     628        struct flip_bit{ static const typename IC::value_type value = ``['implementation-defined]``; };
     629
     630        template <typename IC, unsigned char pos>
     631        struct test_bit { static const bool value = ``['implementation-defined]``; };
     632       
     633        } // mpl
    444634               
    445635        } // boost
     
    447637[endsect]
    448638
    449 [section Template Class `set_bit<>`]
    450 Sets the bit `pos` active in `data`.
    451 
    452 *[*Requires: ] `pos` must be smaller than the size (in bits) of `Type`.
    453        
    454 *[*Remarks: ] `T` must be an integral type. If this constraint is not met, this metafunction do not participate in overload resolution.
     639[section Template Class `static_set_bit<>` and `mpl::set_bit`]
     640Sets the bit `pos` active in `value`.
     641
     642*[*Requires: ] `pos` must be smaller than the size (in bits) of `Type` for `static_set_bit<>` and smaller than IC::value_type
     643        for `mpl::static_set_bit<>`.
     644       
     645*[*Remarks: ]
     646        * `T` must be an integral type. If this constraint is not met, `static_set_bit<>` do not participate in overload resolution.
     647       
     648        * `IC` must be a `mpl::integral_c<>` type. If this constraint is not met, `mpl::set_bit<>` metafunction do not participate in overload resolution.
    455649
    456650*[*Example:]
     
    461655[endsect]
    462656       
    463 [section Template Class `clear_bit<>`]
     657[section Template Class `mpl::clear_bit<>` and `static_clear_bit<>`]
    464658Sets the bit `pos` inactive in `data`.
    465659
    466660
    467 *[*Requires: ] `pos` must be smaller than the size (in bits) of `Type`.
    468        
    469 *[*Remarks: ] `T` must be an integral type. If this constraint is not met, this metafunction do not participate in overload resolution.
     661*[*Requires: ] `pos` must be smaller than the size (in bits) of `Type` for `static_clear_bit<>` and smaller than IC::value_type
     662        for `mpl::static_clear_bit<>`.
     663       
     664*[*Remarks: ]
     665        * `T` must be an integral type. If this constraint is not met, `static_clear_bit<>` do not participate in overload resolution.
     666       
     667        * `IC` must be a `mpl::integral_c<>` type. If this constraint is not met, `mpl::clear_bit<>` metafunction do not participate in overload resolution.
    470668
    471669*[*Example:]
     
    476674[endsect]
    477675
    478 [section Template Class `test_bit<>`]
     676[section Template Class `mpl::test_bit` and `static_test_bit<>`]
    479677Test if the bit `pos` in `data` is active or not.
    480678
    481679
    482 *[*Requires: ] `pos` must be smaller than the size (in bits) of `Type`.
    483        
    484 *[*Remarks: ] `T` must be an integral type. If this constraint is not met, this metafunction do not participate in overload resolution.
     680*[*Requires: ] `pos` must be smaller than the size (in bits) of `Type` for `static_test_bit<>` and smaller than IC::value_type
     681        for `mpl::static_test_bit<>`.
     682       
     683*[*Remarks: ]
     684        * `T` must be an integral type. If this constraint is not met, `static_test_bit<>` do not participate in overload resolution.
     685       
     686        * `IC` must be a `mpl::integral_c<>` type. If this constraint is not met, `mpl::test_bit<>` metafunction do not participate in overload resolution.
    485687
    486688*[*Example:]
     
    491693[endsect]
    492694
    493 [section Template Class `flip_bit<>`]
     695[section Template Class `mpl::flip_bit<>` and `static_flip_bit<>`]
    494696Invert the value of the bit `pos` in `data`
    495697
    496 *[*Requires: ] `pos` must be smaller than the size (in bits) of `Type`.
    497        
    498 *[*Remarks: ] `T` must be an integral type. If this constraint is not met, this metafunction do not participate in overload resolution.
     698*[*Requires: ] `pos` must be smaller than the size (in bits) of `Type` for `static_flip_bit<>` and smaller than IC::value_type
     699        for `mpl::static_flip_bit<>`.
     700       
     701*[*Remarks: ]
     702        * `T` must be an integral type. If this constraint is not met, `static_flip_bit<>` do not participate in overload resolution.
     703       
     704        * `IC` must be a `mpl::integral_c<>` type. If this constraint is not met, `mpl::flip_bit<>` metafunction do not participate in overload resolution.
    499705
    500706*[*Example:]
  • sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/bits_and_ints.html

    r63202 r63881  
    4040<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.count_trailing_zeros">Count
    4141      Trailing Zeros</a></span></dt>
     42<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.safe_average">Safe Average</a></span></dt>
     43<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.round_to_power_of_2_functions">Round
     44      to Power of 2 functions</a></span></dt>
     45<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.transfer_of_sign__isign__functions_">Transfer
     46      of Sign (isign) functions </a></span></dt>
     47<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.absolute_value_in_compile_time_">Absolute
     48      Value in Compile-Time </a></span></dt>
     49<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.mpl_least_common_multiple_">MPL
     50      Least Common Multiple </a></span></dt>
     51<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.mpl_greatest_common_divisor_">MPL
     52      Greatest Common Divisor </a></span></dt>
    4253<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils"> Binary Utilities</a></span></dt>
    4354</dl></div>
     
    634645<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.sign.non_member_function__sign_">Non-Member
    635646        Function <code class="computeroutput"><span class="identifier">sign</span></code></a></span></dt>
     647<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.sign.static_functions__mpl__sign__and__static_sign_">Static
     648        Functions <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">sign</span></code> and <code class="computeroutput"><span class="identifier">static_sign</span></code></a></span></dt>
    636649<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.sign.examples">Examples</a></span></dt>
    637650</dl></div>
     
    745758            must be an integral type. If this constraint is not met, this function
    746759            do not participate in overload resolution.
     760          </li></ul></div>
     761</div>
     762<div class="section" title="Static Functions mpl::sign and static_sign">
     763<div class="titlepage"><div><div><h4 class="title">
     764<a name="boost_integer.bits_and_ints.sign.static_functions__mpl__sign__and__static_sign_"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.sign.static_functions__mpl__sign__and__static_sign_" title="Static Functions mpl::sign and static_sign">Static
     765        Functions <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">sign</span></code> and <code class="computeroutput"><span class="identifier">static_sign</span></code></a>
     766</h4></div></div></div>
     767<p>
     768          The compile-time versions can be included via <a href="../../../../../boost/integer/static_sign.hpp" target="_top">&lt;boost/integer/static_sign.hpp&gt;</a>.
     769        </p>
     770<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">&gt;</span>
     771<span class="keyword">struct</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">sign</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
     772
     773<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">template</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">Value</span><span class="special">&gt;</span>
     774<span class="keyword">struct</span> <span class="identifier">static_same_sign</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
     775</pre>
     776<div class="informaltable"><table class="table">
     777<colgroup>
     778<col>
     779<col>
     780</colgroup>
     781<thead><tr>
     782<th>
     783                <p>
     784                  Parameter
     785                </p>
     786                </th>
     787<th>
     788                <p>
     789                  Description
     790                </p>
     791                </th>
     792</tr></thead>
     793<tbody>
     794<tr>
     795<td>
     796                <p>
     797                  <code class="computeroutput"><span class="identifier">IC</span></code>
     798                </p>
     799                </td>
     800<td>
     801                <p>
     802                  A <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code>
     803                  type.
     804                </p>
     805                </td>
     806</tr>
     807<tr>
     808<td>
     809                <p>
     810                  <code class="computeroutput"><span class="identifier">T</span></code>
     811                </p>
     812                </td>
     813<td>
     814                <p>
     815                  The value type. Must be an integral type.
     816                </p>
     817                </td>
     818</tr>
     819<tr>
     820<td>
     821                <p>
     822                  <code class="computeroutput"><span class="identifier">Value</span></code>
     823                </p>
     824                </td>
     825<td>
     826                <p>
     827                  The value to be checked.
     828                </p>
     829                </td>
     830</tr>
     831</tbody>
     832</table></div>
     833<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
     834<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">T</span></code>
     835            to be an integral type and <code class="computeroutput"><span class="identifier">IC</span></code>
     836            to be an <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code>
     837            type.
    747838          </li></ul></div>
    748839</div>
     
    877968</h4></div></div></div>
    878969<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">pop_count</span><span class="special">(</span><span class="identifier">uintmax_t</span> <span class="identifier">value</span><span class="special">);</span>
    879 </pre>
    880 </div>
    881 <p>
    882         <span class="bold"><strong>Returns: </strong></span> The number of bits set in <code class="computeroutput"><span class="identifier">value</span></code>.
    883       </p>
     970
     971<span class="keyword">template</span> <span class="special">&lt;</span><span class="identifier">uintmax_t</span> <span class="identifier">Value</span><span class="special">&gt;</span>
     972<span class="keyword">struct</span> <span class="identifier">static_pop_count</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
     973
     974<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">&gt;</span>
     975<span class="keyword">struct</span> <span class="identifier">pop_count</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
     976</pre>
     977</div>
     978<div class="itemizedlist"><ul class="itemizedlist" type="disc">
     979<li class="listitem">
     980<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">IC</span></code>
     981          must be an <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code>
     982          type.
     983        </li>
     984<li class="listitem">
     985<span class="bold"><strong>Returns: </strong></span> The number of bits set in <code class="computeroutput"><span class="identifier">value</span></code>. For the compile-time versions,
     986          the result will be on member <code class="computeroutput"><span class="identifier">value</span></code>.
     987        </li>
     988</ul></div>
    884989</div>
    885990<div class="section" title="Clear Least Bit Set">
     
    8961001<a name="boost_integer.bits_and_ints.clear_least_bit_set.synopsis"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.clear_least_bit_set.synopsis" title="Synopsis">Synopsis</a>
    8971002</h4></div></div></div>
    898 <pre class="programlisting"><span class="identifier">T</span> <span class="identifier">clear_least_bit_set</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">value</span><span class="special">);</span>
    899 </pre>
    900 </div>
    901 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
    902 <li class="listitem">
    903 <span class="bold"><strong>Remarks: </strong></span><code class="computeroutput"><span class="identifier">T</span></code>
    904           must be an integral type.
     1003<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
     1004<span class="identifier">T</span> <span class="identifier">clear_least_bit_set</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">value</span><span class="special">);</span>
     1005
     1006<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">&gt;</span>
     1007<span class="keyword">struct</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">clear_least_bit_set</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">::</span><span class="identifier">value_type</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
     1008
     1009<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">Value</span><span class="special">&gt;</span>
     1010<span class="keyword">struct</span> <span class="identifier">static_clear_least_bit_set</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
     1011</pre>
     1012</div>
     1013<div class="itemizedlist"><ul class="itemizedlist" type="disc">
     1014<li class="listitem">
     1015<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">T</span></code>
     1016          must be an integral type. <code class="computeroutput"><span class="identifier">IC</span></code>
     1017          must be an <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code>
     1018          type.
    9051019        </li>
    9061020<li class="listitem">
     
    9171031<div class="toc"><dl><dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.count_trailing_zeros.synopsis">Synopsis</a></span></dt></dl></div>
    9181032<p>
    919         The <code class="computeroutput"><span class="identifier">count_trailing_zeros</span><span class="special">()</span></code> function counts the number of consecutive
    920         0's from the least significant bit of an integral value. This function is
    921         defined on <a href="../../../../../boost/integer/count_trailing_zeros.hpp" target="_top">&lt;boost/integer/count_trailing_zeros.hpp&gt;</a>
     1033        The <code class="computeroutput"><span class="identifier">count_trailing_zeros</span></code>
     1034        function and metafunctions counts the number of consecutive 0's from the
     1035        least significant bit of an integral value. The runtime function is defined
     1036        on <a href="../../../../../boost/integer/count_trailing_zeros.hpp" target="_top">&lt;boost/integer/count_trailing_zeros.hpp&gt;</a>
     1037        and the compile-time metafunctions are defined on <a href="../../../../../boost/integer/static_count_trailing_zeros.hpp" target="_top">&lt;boost/integer/static_count_trailing_zeros.hpp&gt;</a>
    9221038      </p>
    9231039<div class="section" title="Synopsis">
     
    9261042</h4></div></div></div>
    9271043<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">count_trailing_zeros</span><span class="special">(</span><span class="identifier">uintmax_t</span> <span class="identifier">value</span><span class="special">);</span>
    928 </pre>
    929 </div>
    930 <div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
    931 <span class="bold"><strong>Returns: </strong></span> The number of consecutive zeros
    932           from the least significant bit.
    933         </li></ul></div>
     1044
     1045<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">&gt;</span>
     1046<span class="keyword">struct</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">count_trailing_zeros</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
     1047
     1048<span class="keyword">template</span> <span class="special">&lt;</span><span class="identifier">uintmax_t</span> <span class="identifier">Value</span><span class="special">&gt;</span>
     1049<span class="keyword">struct</span> <span class="identifier">static_count_trailing_zeros</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
     1050</pre>
     1051</div>
     1052<div class="itemizedlist"><ul class="itemizedlist" type="disc">
     1053<li class="listitem">
     1054<span class="bold"><strong>Requires: </strong></span> For the <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">count_trailing_zeros</span><span class="special">&lt;&gt;</span></code> version, <code class="computeroutput"><span class="identifier">IC</span></code>
     1055          must be an mpl::integral_c&lt;&gt; type.
     1056        </li>
     1057<li class="listitem">
     1058<span class="bold"><strong>Returns: </strong></span> For the runtime version, the
     1059          number of consecutive zeros from the least significant bit. In the compile-time
     1060          versions, the number of consecutive zeros in the <code class="computeroutput"><span class="identifier">value</span></code>
     1061          static member.
     1062        </li>
     1063</ul></div>
     1064</div>
     1065<div class="section" title="Safe Average">
     1066<div class="titlepage"><div><div><h3 class="title">
     1067<a name="boost_integer.bits_and_ints.safe_average"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.safe_average" title="Safe Average">Safe Average</a>
     1068</h3></div></div></div>
     1069<div class="toc"><dl><dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.safe_average.synopsis">Synopsis</a></span></dt></dl></div>
     1070<p>
     1071        Given two integer values x and y, the (floor of the) average normally would
     1072        be computed by <code class="computeroutput"><span class="special">(</span><span class="identifier">x</span><span class="special">+</span><span class="identifier">y</span><span class="special">)/</span><span class="number">2</span></code> unfortunately, this can yield incorrect results
     1073        due to overflow. Safe average ensures that no overflow will happen even if
     1074        <code class="computeroutput"><span class="special">(</span><span class="identifier">x</span><span class="special">+</span><span class="identifier">y</span><span class="special">)</span></code>
     1075        overflows the range of T. The runtime version is defined on <a href="../../../../../boost/integer/safe_avg.hpp" target="_top">&lt;boost/integer/safe_avg.hpp&gt;</a>
     1076        and the compile-time metafunctions are defined on <a href="../../../../../boost/integer/static_safe_avg.hpp" target="_top">&lt;boost/integer/static_safe_avg.hpp&gt;</a>
     1077      </p>
     1078<div class="section" title="Synopsis">
     1079<div class="titlepage"><div><div><h4 class="title">
     1080<a name="boost_integer.bits_and_ints.safe_average.synopsis"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.safe_average.synopsis" title="Synopsis">Synopsis</a>
     1081</h4></div></div></div>
     1082<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
     1083<span class="identifier">T</span> <span class="identifier">safe_avg</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">y</span><span class="special">);</span>
     1084
     1085<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">ICT1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">ICT2</span><span class="special">&gt;</span>
     1086<span class="keyword">struct</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">safe_avg</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
     1087
     1088<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">Value1</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">Value2</span><span class="special">&gt;</span>
     1089<span class="keyword">struct</span> <span class="identifier">static_safe_avg</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
     1090</pre>
     1091</div>
     1092<div class="itemizedlist"><ul class="itemizedlist" type="disc">
     1093<li class="listitem">
     1094<span class="bold"><strong>Requires: </strong></span> For the <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">safe_avg</span><span class="special">&lt;&gt;</span></code> version, both <code class="computeroutput"><span class="identifier">ICT1</span></code>
     1095          and <code class="computeroutput"><span class="identifier">ICT2</span></code> must be mpl::integral_c&lt;&gt;
     1096          types. For the <code class="computeroutput"><span class="identifier">static_safe_avg</span><span class="special">&lt;&gt;</span></code> and the runtime version, <code class="computeroutput"><span class="identifier">T</span></code> must be an integral type.
     1097        </li>
     1098<li class="listitem">
     1099<span class="bold"><strong>Returns: </strong></span> The average of the sum between
     1100          two integrals rounded down. Overflow is ensured to not happen.
     1101        </li>
     1102</ul></div>
     1103</div>
     1104<div class="section" title="Round to Power of 2 functions">
     1105<div class="titlepage"><div><div><h3 class="title">
     1106<a name="boost_integer.bits_and_ints.round_to_power_of_2_functions"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.round_to_power_of_2_functions" title="Round to Power of 2 functions">Round
     1107      to Power of 2 functions</a>
     1108</h3></div></div></div>
     1109<div class="toc"><dl><dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.round_to_power_of_2_functions.synopsis">Synopsis</a></span></dt></dl></div>
     1110<p>
     1111        This function rounds up and down integral values to the next power of 2.
     1112        The <code class="computeroutput"><span class="identifier">ceil_pow2</span></code> function rounds
     1113        up and <code class="computeroutput"><span class="identifier">floor_pow2</span></code> function
     1114        rounds down. These functions are defined on <a href="../../../../../boost/integer/round_power_2.hpp" target="_top">&lt;boost/integer/round_power_2.hpp&gt;</a>
     1115      </p>
     1116<div class="section" title="Synopsis">
     1117<div class="titlepage"><div><div><h4 class="title">
     1118<a name="boost_integer.bits_and_ints.round_to_power_of_2_functions.synopsis"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.round_to_power_of_2_functions.synopsis" title="Synopsis">Synopsis</a>
     1119</h4></div></div></div>
     1120<pre class="programlisting"><span class="identifier">T</span> <span class="identifier">ceil_pow2</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">value</span><span class="special">);</span>
     1121<span class="identifier">T</span> <span class="identifier">floor_pow2</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">value</span><span class="special">);</span>
     1122</pre>
     1123</div>
     1124<div class="itemizedlist"><ul class="itemizedlist" type="disc">
     1125<li class="listitem">
     1126<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">T</span></code>
     1127          must be convertible to <code class="computeroutput"><span class="identifier">uint8_t</span></code>
     1128          or <code class="computeroutput"><span class="identifier">uint16_t</span></code> or <code class="computeroutput"><span class="identifier">uint32_t</span></code> or <code class="computeroutput"><span class="identifier">uint64_t</span></code>.
     1129        </li>
     1130<li class="listitem">
     1131<span class="bold"><strong>Returns: </strong></span><div class="itemizedlist"><ul class="itemizedlist" type="circle">
     1132<li class="listitem">
     1133<code class="computeroutput"><span class="identifier">ceil_pow2</span><span class="special">()</span></code>
     1134              returns <code class="computeroutput"><span class="identifier">value</span></code> rounded
     1135              <span class="bold"><strong>up</strong></span> to the lesser power of two greater
     1136              than or equal to `value.
     1137            </li>
     1138<li class="listitem">
     1139<code class="computeroutput"><span class="identifier">floor_pow2</span><span class="special">()</span></code>
     1140              returns <code class="computeroutput"><span class="identifier">value</span></code> rounded
     1141              <span class="bold"><strong>down</strong></span> to the greater power of two lesser
     1142              or equal <code class="computeroutput"><span class="identifier">value</span></code>.
     1143            </li>
     1144</ul></div>
     1145</li>
     1146</ul></div>
     1147</div>
     1148<div class="section" title="Transfer of Sign (isign) functions">
     1149<div class="titlepage"><div><div><h3 class="title">
     1150<a name="boost_integer.bits_and_ints.transfer_of_sign__isign__functions_"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.transfer_of_sign__isign__functions_" title="Transfer of Sign (isign) functions">Transfer
     1151      of Sign (isign) functions </a>
     1152</h3></div></div></div>
     1153<div class="toc"><dl><dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.transfer_of_sign__isign__functions_.synopsis">Synopsis</a></span></dt></dl></div>
     1154<p>
     1155        isign or transfer of sign function is defined by:
     1156</p>
     1157<pre class="programlisting"><span class="identifier">isign</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span> <span class="identifier">y</span><span class="special">)</span> <span class="special">=</span>
     1158        <span class="identifier">abs</span><span class="special">(</span><span class="identifier">x</span><span class="special">),</span> <span class="keyword">if</span> <span class="identifier">y</span> <span class="identifier">is</span> <span class="identifier">greater</span> <span class="identifier">than</span> <span class="keyword">or</span> <span class="identifier">equal</span> <span class="number">0</span><span class="special">,</span>
     1159<span class="special">-</span><span class="identifier">abs</span><span class="special">(</span><span class="identifier">x</span><span class="special">),</span> <span class="keyword">if</span> <span class="identifier">y</span> <span class="identifier">is</span> <span class="identifier">less</span> <span class="identifier">than</span> <span class="number">0</span>
     1160</pre>
     1161<p>
     1162      </p>
     1163<p>
     1164        The runtime functions are defined on <a href="../../../../../boost/integer/isign.hpp" target="_top">&lt;boost/integer/isign.hpp&gt;</a>
     1165        and the static metafunctions are defined on <a href="../../../../../boost/integer/static_isign.hpp" target="_top">&lt;boost/integer/static_isign.hpp&gt;</a>
     1166      </p>
     1167<div class="section" title="Synopsis">
     1168<div class="titlepage"><div><div><h4 class="title">
     1169<a name="boost_integer.bits_and_ints.transfer_of_sign__isign__functions_.synopsis"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.transfer_of_sign__isign__functions_.synopsis" title="Synopsis">Synopsis</a>
     1170</h4></div></div></div>
     1171<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
     1172<span class="identifier">T</span> <span class="identifier">isign</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">y</span><span class="special">);</span>
     1173
     1174<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">Value1</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">Value2</span><span class="special">&gt;</span>
     1175<span class="keyword">struct</span> <span class="identifier">static_isign</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
     1176
     1177<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IC1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IC2</span><span class="special">&gt;</span>
     1178<span class="keyword">struct</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">isign</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">typename</span> <span class="identifier">IC1</span><span class="special">::</span><span class="identifier">value_type</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
     1179</pre>
     1180</div>
     1181<div class="itemizedlist"><ul class="itemizedlist" type="disc">
     1182<li class="listitem">
     1183<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">T</span></code>
     1184          must be an integral type. Both <code class="computeroutput"><span class="identifier">IC1</span></code>
     1185          and <code class="computeroutput"><span class="identifier">IC2</span></code> must be <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code>
     1186          types.
     1187        </li>
     1188<li class="listitem">
     1189<span class="bold"><strong>Returns: </strong></span><div class="itemizedlist"><ul class="itemizedlist" type="circle">
     1190<li class="listitem">
     1191              Runtime version: returns <code class="computeroutput"><span class="identifier">abs</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code> if <code class="computeroutput"><span class="identifier">y</span></code>
     1192              is greater than or equal 0 and <code class="computeroutput"><span class="special">-</span><span class="identifier">abs</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>
     1193              if <code class="computeroutput"><span class="identifier">y</span></code> is negative.
     1194            </li>
     1195<li class="listitem">
     1196              MPL version: the member <code class="computeroutput"><span class="identifier">value</span></code>
     1197              will be <code class="computeroutput"><span class="identifier">abs</span><span class="special">(</span><span class="identifier">IC1</span><span class="special">::</span><span class="identifier">value</span><span class="special">)</span></code>
     1198              if <code class="computeroutput"><span class="identifier">IC2</span></code> holds an value
     1199              greater than or equal 0, or <code class="computeroutput"><span class="special">-</span><span class="identifier">abs</span><span class="special">(</span><span class="identifier">IC1</span><span class="special">::</span><span class="identifier">value</span><span class="special">)</span></code>
     1200              if <code class="computeroutput"><span class="identifier">IC2</span></code> holds a negative
     1201              value.
     1202            </li>
     1203<li class="listitem">
     1204<code class="computeroutput"><span class="identifier">static_isign</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">,</span> <span class="identifier">Value1</span><span class="special">,</span>
     1205              <span class="identifier">Value2</span><span class="special">&gt;::</span><span class="identifier">value</span></code> will be <code class="computeroutput"><span class="identifier">abs</span><span class="special">(</span><span class="identifier">Value1</span><span class="special">)</span></code> if Value2 is greater than or equal
     1206              0, or <code class="computeroutput"><span class="special">-</span><span class="identifier">abs</span><span class="special">(</span><span class="identifier">Value1</span><span class="special">)</span></code> if Value2 is negative.
     1207            </li>
     1208</ul></div>
     1209</li>
     1210</ul></div>
     1211</div>
     1212<div class="section" title="Absolute Value in Compile-Time">
     1213<div class="titlepage"><div><div><h3 class="title">
     1214<a name="boost_integer.bits_and_ints.absolute_value_in_compile_time_"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.absolute_value_in_compile_time_" title="Absolute Value in Compile-Time">Absolute
     1215      Value in Compile-Time </a>
     1216</h3></div></div></div>
     1217<div class="toc"><dl><dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.absolute_value_in_compile_time_.synopsis">Synopsis</a></span></dt></dl></div>
     1218<p>
     1219        The static metafunctions defined on <a href="../../../../../boost/integer/static_abs.hpp" target="_top">&lt;boost/integer/static_abs.hpp&gt;</a>
     1220        calculates the absolute value of integral constants.
     1221      </p>
     1222<p>
     1223        <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">abs</span><span class="special">&lt;&gt;</span></code>
     1224        version returns the absolute value of a <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code> and the <code class="computeroutput"><span class="identifier">static_abs</span><span class="special">&lt;&gt;</span></code> version returns the absolute value
     1225        from an integral value.
     1226      </p>
     1227<div class="section" title="Synopsis">
     1228<div class="titlepage"><div><div><h4 class="title">
     1229<a name="boost_integer.bits_and_ints.absolute_value_in_compile_time_.synopsis"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.absolute_value_in_compile_time_.synopsis" title="Synopsis">Synopsis</a>
     1230</h4></div></div></div>
     1231<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">&gt;</span>
     1232<span class="keyword">struct</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">abs</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">::</span><span class="identifier">value_type</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
     1233
     1234<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">Value</span><span class="special">&gt;</span>
     1235<span class="keyword">struct</span> <span class="identifier">static_abs</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
     1236</pre>
     1237</div>
     1238<div class="itemizedlist"><ul class="itemizedlist" type="disc">
     1239<li class="listitem">
     1240<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">T</span></code>
     1241          must be an integral type. <code class="computeroutput"><span class="identifier">IC</span></code>
     1242          a <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code>
     1243          type.
     1244        </li>
     1245<li class="listitem">
     1246<span class="bold"><strong>Results: </strong></span> The member <code class="computeroutput"><span class="identifier">value</span>
     1247          </code> in <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">abs</span><span class="special">&lt;&gt;</span></code>
     1248          will be the absolute value of <code class="computeroutput"><span class="identifier">IC</span><span class="special">::</span><span class="identifier">value</span></code>.
     1249          In <code class="computeroutput"><span class="identifier">static_abs</span><span class="special">&lt;&gt;</span></code>,
     1250          <code class="computeroutput"><span class="identifier">value</span></code> will be the absolute
     1251          value of <code class="computeroutput"><span class="identifier">Value</span></code>.
     1252        </li>
     1253</ul></div>
     1254</div>
     1255<div class="section" title="MPL Least Common Multiple">
     1256<div class="titlepage"><div><div><h3 class="title">
     1257<a name="boost_integer.bits_and_ints.mpl_least_common_multiple_"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.mpl_least_common_multiple_" title="MPL Least Common Multiple">MPL
     1258      Least Common Multiple </a>
     1259</h3></div></div></div>
     1260<div class="toc"><dl><dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.mpl_least_common_multiple_.synopsis">Synopsis</a></span></dt></dl></div>
     1261<p>
     1262        This header defines mpl::lcm&lt;&gt; metafunction wich calculates the least
     1263        common multiple from two given <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code>.
     1264      </p>
     1265<p>
     1266        This static metafunction is defined on <a href="../../../../../boost/integer/static_lcm.hpp" target="_top">&lt;boost/integer/static_lcm.hpp&gt;</a>.
     1267      </p>
     1268<div class="section" title="Synopsis">
     1269<div class="titlepage"><div><div><h4 class="title">
     1270<a name="boost_integer.bits_and_ints.mpl_least_common_multiple_.synopsis"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.mpl_least_common_multiple_.synopsis" title="Synopsis">Synopsis</a>
     1271</h4></div></div></div>
     1272<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">ICT1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">ICT2</span><span class="special">&gt;</span>
     1273<span class="keyword">struct</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">lcm</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">uintmax_t</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
     1274</pre>
     1275</div>
     1276<div class="itemizedlist"><ul class="itemizedlist" type="disc">
     1277<li class="listitem">
     1278<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">ICT1</span></code>
     1279          and <code class="computeroutput"><span class="identifier">ICT2</span></code> must be <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code>
     1280          types.
     1281        </li>
     1282<li class="listitem">
     1283<span class="bold"><strong>Results: </strong></span> The member <code class="computeroutput"><span class="identifier">value</span>
     1284          </code> will be the least common multiple from <code class="computeroutput"><span class="identifier">IC1</span></code>
     1285          and <code class="computeroutput"><span class="identifier">IC2</span></code>.
     1286        </li>
     1287</ul></div>
     1288</div>
     1289<div class="section" title="MPL Greatest Common Divisor">
     1290<div class="titlepage"><div><div><h3 class="title">
     1291<a name="boost_integer.bits_and_ints.mpl_greatest_common_divisor_"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.mpl_greatest_common_divisor_" title="MPL Greatest Common Divisor">MPL
     1292      Greatest Common Divisor </a>
     1293</h3></div></div></div>
     1294<div class="toc"><dl><dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.mpl_greatest_common_divisor_.synopsis">Synopsis</a></span></dt></dl></div>
     1295<p>
     1296        The header file <a href="../../../../../boost/integer/static_gcd.hpp" target="_top">&lt;boost/integer/static_gcd.hpp&gt;</a>
     1297        defines <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">gcd</span><span class="special">&lt;&gt;</span></code>
     1298        metafunction wich calculates the greatest common divisor of two given <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code>.
     1299      </p>
     1300<div class="section" title="Synopsis">
     1301<div class="titlepage"><div><div><h4 class="title">
     1302<a name="boost_integer.bits_and_ints.mpl_greatest_common_divisor_.synopsis"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.mpl_greatest_common_divisor_.synopsis" title="Synopsis">Synopsis</a>
     1303</h4></div></div></div>
     1304<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">ICT1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">ICT2</span><span class="special">&gt;</span>
     1305<span class="keyword">struct</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">gcd</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">uintmax_t</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
     1306</pre>
     1307</div>
     1308<div class="itemizedlist"><ul class="itemizedlist" type="disc">
     1309<li class="listitem">
     1310<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">ICT1</span></code>
     1311          and <code class="computeroutput"><span class="identifier">ICT2</span></code> must be <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code>
     1312          types.
     1313        </li>
     1314<li class="listitem">
     1315<span class="bold"><strong>Results: </strong></span> The member <code class="computeroutput"><span class="identifier">value</span>
     1316          </code> will be the greatest commom divisor from <code class="computeroutput"><span class="identifier">IC1</span></code>
     1317          and <code class="computeroutput"><span class="identifier">IC2</span></code>.
     1318        </li>
     1319</ul></div>
    9341320</div>
    9351321<div class="section" title="Binary Utilities">
     
    9391325<div class="toc"><dl>
    9401326<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.synopsis">Synopsis</a></span></dt>
    941 <dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__set_bit___">Template
    942         Class <code class="computeroutput"><span class="identifier">set_bit</span><span class="special">&lt;&gt;</span></code></a></span></dt>
    943 <dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__clear_bit___">Template
    944         Class <code class="computeroutput"><span class="identifier">clear_bit</span><span class="special">&lt;&gt;</span></code></a></span></dt>
    945 <dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__test_bit___">Template
    946         Class <code class="computeroutput"><span class="identifier">test_bit</span><span class="special">&lt;&gt;</span></code></a></span></dt>
    947 <dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__flip_bit___">Template
    948         Class <code class="computeroutput"><span class="identifier">flip_bit</span><span class="special">&lt;&gt;</span></code></a></span></dt>
     1327<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__static_set_bit____and__mpl__set_bit_">Template
     1328        Class <code class="computeroutput"><span class="identifier">static_set_bit</span><span class="special">&lt;&gt;</span></code>
     1329        and <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">set_bit</span></code></a></span></dt>
     1330<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__mpl__clear_bit____and__static_clear_bit___">Template
     1331        Class <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">clear_bit</span><span class="special">&lt;&gt;</span></code>
     1332        and <code class="computeroutput"><span class="identifier">static_clear_bit</span><span class="special">&lt;&gt;</span></code></a></span></dt>
     1333<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__mpl__test_bit__and__static_test_bit___">Template
     1334        Class <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">test_bit</span></code> and <code class="computeroutput"><span class="identifier">static_test_bit</span><span class="special">&lt;&gt;</span></code></a></span></dt>
     1335<dt><span class="section"><a href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__mpl__flip_bit____and__static_flip_bit___">Template
     1336        Class <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">flip_bit</span><span class="special">&lt;&gt;</span></code>
     1337        and <code class="computeroutput"><span class="identifier">static_flip_bit</span><span class="special">&lt;&gt;</span></code></a></span></dt>
    9491338</dl></div>
    9501339<p>
     
    9631352<span class="comment">// Sets the bit `pos' in data
    9641353</span><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">data</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <span class="identifier">pos</span><span class="special">&gt;</span>
    965 <span class="keyword">struct</span> <span class="identifier">set_bit</span>
    966 <span class="special">{</span>
    967         <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span>
    968 <span class="special">};</span> <span class="comment">// set_bit
    969 </span>
    970 
     1354<span class="keyword">struct</span> <span class="identifier">static_set_bit</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
     1355       
    9711356<span class="comment">// Clear the bit `pos' in data
    9721357</span><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">data</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <span class="identifier">pos</span><span class="special">&gt;</span>
    973 <span class="keyword">struct</span> <span class="identifier">clear_bit</span>
    974 <span class="special">{</span>
    975         <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span>
    976 <span class="special">};</span> <span class="comment">// clear_bit
    977 </span>
     1358<span class="keyword">struct</span> <span class="identifier">static_clear_bit</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
     1359
    9781360<span class="comment">// If the bit `pos' is 1 then it will be 0 if not the bit will be 1
    9791361</span><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">data</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <span class="identifier">pos</span><span class="special">&gt;</span>
    980 <span class="keyword">struct</span> <span class="identifier">flip_bit</span>
    981 <span class="special">{</span>
    982         <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span>
    983 <span class="special">};</span> <span class="comment">// flip_bit
    984 </span>
     1362<span class="keyword">struct</span> <span class="identifier">static_flip_bit</span><span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
     1363
    9851364<span class="comment">// Test if the bit in `pos' positon is set or not
    9861365</span><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">data</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <span class="identifier">pos</span><span class="special">&gt;</span>
    987 <span class="keyword">struct</span> <span class="identifier">test_bit</span>
    988 <span class="special">{</span>
    989         <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span>
    990 <span class="special">};</span> <span class="comment">// test_bit       
     1366<span class="keyword">struct</span> <span class="identifier">static_test_bit</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
     1367
     1368<span class="keyword">namespace</span> <span class="identifier">mpl</span> <span class="special">{</span>
     1369
     1370<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <span class="identifier">pos</span><span class="special">&gt;</span>
     1371<span class="keyword">struct</span> <span class="identifier">set_bit</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">::</span><span class="identifier">value_type</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
     1372
     1373<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <span class="identifier">pos</span><span class="special">&gt;</span>
     1374<span class="keyword">struct</span> <span class="identifier">clear_bit</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">::</span><span class="identifier">value_type</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
     1375
     1376<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <span class="identifier">pos</span><span class="special">&gt;</span>
     1377<span class="keyword">struct</span> <span class="identifier">flip_bit</span><span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">::</span><span class="identifier">value_type</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
     1378
     1379<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">IC</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <span class="identifier">pos</span><span class="special">&gt;</span>
     1380<span class="keyword">struct</span> <span class="identifier">test_bit</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">value</span> <span class="special">=</span> <span class="emphasis"><em>implementation-defined</em></span><span class="special">;</span> <span class="special">};</span>
     1381
     1382<span class="special">}</span> <span class="comment">// mpl
    9911383</span>
    9921384<span class="special">}</span> <span class="comment">// boost
    9931385</span></pre>
    9941386</div>
    995 <div class="section" title="Template Class set_bit&lt;&gt;">
    996 <div class="titlepage"><div><div><h4 class="title">
    997 <a name="boost_integer.bits_and_ints.bin_utils.template_class__set_bit___"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__set_bit___" title="Template Class set_bit&lt;&gt;">Template
    998         Class <code class="computeroutput"><span class="identifier">set_bit</span><span class="special">&lt;&gt;</span></code></a>
     1387<div class="section" title="Template Class static_set_bit&lt;&gt; and mpl::set_bit">
     1388<div class="titlepage"><div><div><h4 class="title">
     1389<a name="boost_integer.bits_and_ints.bin_utils.template_class__static_set_bit____and__mpl__set_bit_"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__static_set_bit____and__mpl__set_bit_" title="Template Class static_set_bit&lt;&gt; and mpl::set_bit">Template
     1390        Class <code class="computeroutput"><span class="identifier">static_set_bit</span><span class="special">&lt;&gt;</span></code>
     1391        and <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">set_bit</span></code></a>
    9991392</h4></div></div></div>
    10001393<p>
    10011394          Sets the bit <code class="computeroutput"><span class="identifier">pos</span></code> active
    1002           in <code class="computeroutput"><span class="identifier">data</span></code>.
     1395          in <code class="computeroutput"><span class="identifier">value</span></code>.
    10031396        </p>
    10041397<div class="itemizedlist"><ul class="itemizedlist" type="disc">
    10051398<li class="listitem">
    10061399<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">pos</span></code>
    1007             must be smaller than the size (in bits) of <code class="computeroutput"><span class="identifier">Type</span></code>.
     1400            must be smaller than the size (in bits) of <code class="computeroutput"><span class="identifier">Type</span></code>
     1401            for <code class="computeroutput"><span class="identifier">static_set_bit</span><span class="special">&lt;&gt;</span></code>
     1402            and smaller than IC::value_type for <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">static_set_bit</span><span class="special">&lt;&gt;</span></code>.
    10081403          </li>
    10091404<li class="listitem">
    1010 <span class="bold"><strong>Remarks: </strong></span><code class="computeroutput"><span class="identifier">T</span></code>
    1011             must be an integral type. If this constraint is not met, this metafunction
    1012             do not participate in overload resolution.
    1013           </li>
     1405<span class="bold"><strong>Remarks: </strong></span><div class="itemizedlist"><ul class="itemizedlist" type="circle">
     1406<li class="listitem">
     1407<code class="computeroutput"><span class="identifier">T</span></code> must be an integral
     1408                type. If this constraint is not met, <code class="computeroutput"><span class="identifier">static_set_bit</span><span class="special">&lt;&gt;</span></code> do not participate in overload
     1409                resolution.
     1410              </li>
     1411<li class="listitem">
     1412<code class="computeroutput"><span class="identifier">IC</span></code> must be a <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code>
     1413                type. If this constraint is not met, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">set_bit</span><span class="special">&lt;&gt;</span></code> metafunction do not participate
     1414                in overload resolution.
     1415              </li>
     1416</ul></div>
     1417</li>
    10141418<li class="listitem"><span class="bold"><strong>Example:</strong></span></li>
    10151419</ul></div>
     
    10181422</pre>
    10191423</div>
    1020 <div class="section" title="Template Class clear_bit&lt;&gt;">
    1021 <div class="titlepage"><div><div><h4 class="title">
    1022 <a name="boost_integer.bits_and_ints.bin_utils.template_class__clear_bit___"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__clear_bit___" title="Template Class clear_bit&lt;&gt;">Template
    1023         Class <code class="computeroutput"><span class="identifier">clear_bit</span><span class="special">&lt;&gt;</span></code></a>
     1424<div class="section" title="Template Class mpl::clear_bit&lt;&gt; and static_clear_bit&lt;&gt;">
     1425<div class="titlepage"><div><div><h4 class="title">
     1426<a name="boost_integer.bits_and_ints.bin_utils.template_class__mpl__clear_bit____and__static_clear_bit___"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__mpl__clear_bit____and__static_clear_bit___" title="Template Class mpl::clear_bit&lt;&gt; and static_clear_bit&lt;&gt;">Template
     1427        Class <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">clear_bit</span><span class="special">&lt;&gt;</span></code>
     1428        and <code class="computeroutput"><span class="identifier">static_clear_bit</span><span class="special">&lt;&gt;</span></code></a>
    10241429</h4></div></div></div>
    10251430<p>
     
    10301435<li class="listitem">
    10311436<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">pos</span></code>
    1032             must be smaller than the size (in bits) of <code class="computeroutput"><span class="identifier">Type</span></code>.
     1437            must be smaller than the size (in bits) of <code class="computeroutput"><span class="identifier">Type</span></code>
     1438            for <code class="computeroutput"><span class="identifier">static_clear_bit</span><span class="special">&lt;&gt;</span></code> and smaller than IC::value_type
     1439            for <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">static_clear_bit</span><span class="special">&lt;&gt;</span></code>.
    10331440          </li>
    10341441<li class="listitem">
    1035 <span class="bold"><strong>Remarks: </strong></span><code class="computeroutput"><span class="identifier">T</span></code>
    1036             must be an integral type. If this constraint is not met, this metafunction
    1037             do not participate in overload resolution.
    1038           </li>
     1442<span class="bold"><strong>Remarks: </strong></span><div class="itemizedlist"><ul class="itemizedlist" type="circle">
     1443<li class="listitem">
     1444<code class="computeroutput"><span class="identifier">T</span></code> must be an integral
     1445                type. If this constraint is not met, <code class="computeroutput"><span class="identifier">static_clear_bit</span><span class="special">&lt;&gt;</span></code> do not participate in overload
     1446                resolution.
     1447              </li>
     1448<li class="listitem">
     1449<code class="computeroutput"><span class="identifier">IC</span></code> must be a <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code>
     1450                type. If this constraint is not met, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">clear_bit</span><span class="special">&lt;&gt;</span></code> metafunction do not participate
     1451                in overload resolution.
     1452              </li>
     1453</ul></div>
     1454</li>
    10391455<li class="listitem"><span class="bold"><strong>Example:</strong></span></li>
    10401456</ul></div>
     
    10431459</pre>
    10441460</div>
    1045 <div class="section" title="Template Class test_bit&lt;&gt;">
    1046 <div class="titlepage"><div><div><h4 class="title">
    1047 <a name="boost_integer.bits_and_ints.bin_utils.template_class__test_bit___"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__test_bit___" title="Template Class test_bit&lt;&gt;">Template
    1048         Class <code class="computeroutput"><span class="identifier">test_bit</span><span class="special">&lt;&gt;</span></code></a>
     1461<div class="section" title="Template Class mpl::test_bit and static_test_bit&lt;&gt;">
     1462<div class="titlepage"><div><div><h4 class="title">
     1463<a name="boost_integer.bits_and_ints.bin_utils.template_class__mpl__test_bit__and__static_test_bit___"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__mpl__test_bit__and__static_test_bit___" title="Template Class mpl::test_bit and static_test_bit&lt;&gt;">Template
     1464        Class <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">test_bit</span></code> and <code class="computeroutput"><span class="identifier">static_test_bit</span><span class="special">&lt;&gt;</span></code></a>
    10491465</h4></div></div></div>
    10501466<p>
     
    10551471<li class="listitem">
    10561472<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">pos</span></code>
    1057             must be smaller than the size (in bits) of <code class="computeroutput"><span class="identifier">Type</span></code>.
     1473            must be smaller than the size (in bits) of <code class="computeroutput"><span class="identifier">Type</span></code>
     1474            for <code class="computeroutput"><span class="identifier">static_test_bit</span><span class="special">&lt;&gt;</span></code>
     1475            and smaller than IC::value_type for <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">static_test_bit</span><span class="special">&lt;&gt;</span></code>.
    10581476          </li>
    10591477<li class="listitem">
    1060 <span class="bold"><strong>Remarks: </strong></span><code class="computeroutput"><span class="identifier">T</span></code>
    1061             must be an integral type. If this constraint is not met, this metafunction
    1062             do not participate in overload resolution.
    1063           </li>
     1478<span class="bold"><strong>Remarks: </strong></span><div class="itemizedlist"><ul class="itemizedlist" type="circle">
     1479<li class="listitem">
     1480<code class="computeroutput"><span class="identifier">T</span></code> must be an integral
     1481                type. If this constraint is not met, <code class="computeroutput"><span class="identifier">static_test_bit</span><span class="special">&lt;&gt;</span></code> do not participate in overload
     1482                resolution.
     1483              </li>
     1484<li class="listitem">
     1485<code class="computeroutput"><span class="identifier">IC</span></code> must be a <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code>
     1486                type. If this constraint is not met, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">test_bit</span><span class="special">&lt;&gt;</span></code> metafunction do not participate
     1487                in overload resolution.
     1488              </li>
     1489</ul></div>
     1490</li>
    10641491<li class="listitem"><span class="bold"><strong>Example:</strong></span></li>
    10651492</ul></div>
     
    10681495</pre>
    10691496</div>
    1070 <div class="section" title="Template Class flip_bit&lt;&gt;">
    1071 <div class="titlepage"><div><div><h4 class="title">
    1072 <a name="boost_integer.bits_and_ints.bin_utils.template_class__flip_bit___"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__flip_bit___" title="Template Class flip_bit&lt;&gt;">Template
    1073         Class <code class="computeroutput"><span class="identifier">flip_bit</span><span class="special">&lt;&gt;</span></code></a>
     1497<div class="section" title="Template Class mpl::flip_bit&lt;&gt; and static_flip_bit&lt;&gt;">
     1498<div class="titlepage"><div><div><h4 class="title">
     1499<a name="boost_integer.bits_and_ints.bin_utils.template_class__mpl__flip_bit____and__static_flip_bit___"></a><a class="link" href="bits_and_ints.html#boost_integer.bits_and_ints.bin_utils.template_class__mpl__flip_bit____and__static_flip_bit___" title="Template Class mpl::flip_bit&lt;&gt; and static_flip_bit&lt;&gt;">Template
     1500        Class <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">flip_bit</span><span class="special">&lt;&gt;</span></code>
     1501        and <code class="computeroutput"><span class="identifier">static_flip_bit</span><span class="special">&lt;&gt;</span></code></a>
    10741502</h4></div></div></div>
    10751503<p>
     
    10801508<li class="listitem">
    10811509<span class="bold"><strong>Requires: </strong></span><code class="computeroutput"><span class="identifier">pos</span></code>
    1082             must be smaller than the size (in bits) of <code class="computeroutput"><span class="identifier">Type</span></code>.
     1510            must be smaller than the size (in bits) of <code class="computeroutput"><span class="identifier">Type</span></code>
     1511            for <code class="computeroutput"><span class="identifier">static_flip_bit</span><span class="special">&lt;&gt;</span></code>
     1512            and smaller than IC::value_type for <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">static_flip_bit</span><span class="special">&lt;&gt;</span></code>.
    10831513          </li>
    10841514<li class="listitem">
    1085 <span class="bold"><strong>Remarks: </strong></span><code class="computeroutput"><span class="identifier">T</span></code>
    1086             must be an integral type. If this constraint is not met, this metafunction
    1087             do not participate in overload resolution.
    1088           </li>
     1515<span class="bold"><strong>Remarks: </strong></span><div class="itemizedlist"><ul class="itemizedlist" type="circle">
     1516<li class="listitem">
     1517<code class="computeroutput"><span class="identifier">T</span></code> must be an integral
     1518                type. If this constraint is not met, <code class="computeroutput"><span class="identifier">static_flip_bit</span><span class="special">&lt;&gt;</span></code> do not participate in overload
     1519                resolution.
     1520              </li>
     1521<li class="listitem">
     1522<code class="computeroutput"><span class="identifier">IC</span></code> must be a <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;&gt;</span></code>
     1523                type. If this constraint is not met, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">flip_bit</span><span class="special">&lt;&gt;</span></code> metafunction do not participate
     1524                in overload resolution.
     1525              </li>
     1526</ul></div>
     1527</li>
    10891528<li class="listitem"><span class="bold"><strong>Example:</strong></span></li>
    10901529</ul></div>
  • sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/boost_integer/history.html

    r63833 r63881  
    2727</h2></div></div></div>
    2828<a name="boost_integer.history.1_42_0"></a><h5>
    29 <a name="id560880"></a>
     29<a name="id36200325"></a>
    3030      <a class="link" href="history.html#boost_integer.history.1_42_0">1.42.0</a>
    3131    </h5>
     
    5656</ul></div>
    5757<a name="boost_integer.history.1_32_0"></a><h5>
    58 <a name="id560998"></a>
     58<a name="id36200445"></a>
    5959      <a class="link" href="history.html#boost_integer.history.1_32_0">1.32.0</a>
    6060    </h5>
  • sandbox/SOC/2010/bits_and_ints/libs/integer/doc/html/index.html

    r63202 r63881  
    256256</div>
    257257<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
    258 <td align="left"><p><small>Last revised: June 21, 2010 at 20:43:18 GMT</small></p></td>
     258<td align="left"><p><small>Last revised: July 11, 2010 at 17:24:10 GMT</small></p></td>
    259259<td align="right"><div class="copyright-footer"></div></td>
    260260</tr></table>
Note: See TracChangeset for help on using the changeset viewer.