diff --git a/include/boost/dynamic_bitset/dynamic_bitset.hpp b/include/boost/dynamic_bitset/dynamic_bitset.hpp index acac3ce..50582ec 100644 --- a/include/boost/dynamic_bitset/dynamic_bitset.hpp +++ b/include/boost/dynamic_bitset/dynamic_bitset.hpp @@ -277,11 +277,6 @@ public: friend bool operator<(const dynamic_bitset& a, const dynamic_bitset& b); - template - friend bool oplessthan(const dynamic_bitset& a, - const dynamic_bitset& b); - - template friend void to_block_range(const dynamic_bitset& b, BlockOutputIterator result); @@ -1551,52 +1546,6 @@ bool operator<(const dynamic_bitset& a, } } -template -bool oplessthan(const dynamic_bitset& a, - const dynamic_bitset& b) -{ -// BOOST_ASSERT(a.size() == b.size()); - - typedef BOOST_DEDUCED_TYPENAME dynamic_bitset::size_type size_type; - - size_type asize(a.num_blocks()); - size_type bsize(b.num_blocks()); - BOOST_ASSERT(asize == 3); - BOOST_ASSERT(bsize == 4); - - if (!bsize) - { - return false; - } - else if (!asize) - { - return true; - } - else - { - - size_type leqsize(std::min BOOST_PREVENT_MACRO_SUBSTITUTION(asize,bsize)); - BOOST_ASSERT(leqsize == 3); - - //if (a.size() == 0) - // return false; - - // Since we are storing the most significant bit - // at pos == size() - 1, we need to do the comparisons in reverse. - // - for (size_type ii = 0; ii < leqsize; ++ii,--asize,--bsize) - { - size_type i = asize-1; - size_type j = bsize-1; - if (a.m_bits[i] < b.m_bits[j]) - return true; - else if (a.m_bits[i] > b.m_bits[j]) - return false; - } - return (a.num_blocks() < b.num_blocks()); - } -} - template inline bool operator<=(const dynamic_bitset& a, const dynamic_bitset& b)