Changeset 54811


Ignore:
Timestamp:
Jul 8, 2009, 9:27:05 PM (9 years ago)
Author:
Daniel James
Message:

Use BOOST_STATIC_CONSTANT in static_log2, as g++ 4.0 has problems with enum.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/boost/integer/static_log2.hpp

    r23945 r54811  
    4949     struct choose_initial_n {
    5050
    51          enum { c = (argument_type(1) << n << n) != 0 };
     51         BOOST_STATIC_CONSTANT(bool, c = (argument_type(1) << n << n) != 0);
    5252         BOOST_STATIC_CONSTANT(
    5353             result_type,
     
    8686     struct static_log2_impl {
    8787
    88          enum { c = (x >> n) > 0 }; // x >= 2**n ?
     88         BOOST_STATIC_CONSTANT(bool, c = (x >> n) > 0); // x >= 2**n ?
    8989         BOOST_STATIC_CONSTANT(
    9090             result_type,
Note: See TracChangeset for help on using the changeset viewer.