Changeset 48280


Ignore:
Timestamp:
Aug 21, 2008, 11:49:12 AM (10 years ago)
Author:
Gennaro Prota
Message:

dynamic_bitset: tentative code reworking in count() member function, to help gcc 3.4.6 on Sandia-sun, which seems to have troubles with a simple constant expression of enumeration type (see <http://www.boost.org/development/tests/trunk/developer/dynamic_bitset_.html>)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/boost/dynamic_bitset/dynamic_bitset.hpp

    r48252 r48280  
    954954}
    955955
    956 
    957956template <typename Block, typename Allocator>
    958957typename dynamic_bitset<Block, Allocator>::size_type
     
    963962    const bool no_padding = bits_per_block == CHAR_BIT * sizeof(Block);
    964963    const bool enough_table_width = table_width >= CHAR_BIT;
    965 
    966     typedef mode_to_type< (no_padding && enough_table_width ?
    967                           access_by_bytes : access_by_blocks) > m;
    968 
    969     return do_count(m_bits.begin(), num_blocks(), Block(0), static_cast<m*>(0));
    970 
     964    const mode m = (no_padding && enough_table_width)
     965                       ? access_by_bytes
     966                       : access_by_blocks;
     967
     968    typedef mode_to_type<m> m_type;
     969
     970    return do_count(m_bits.begin(), num_blocks(), Block(0),
     971                                                    static_cast<m_type *>(0));
    971972}
    972973
Note: See TracChangeset for help on using the changeset viewer.