Hi there,

currently, dynamic bitset tests fail for VA6 because the library doesn't correctly detect that a standard compliant allocator is available.

Therefore I propose the attached patch to be applied to boost/detail/dynamic_bitset.hpp. The patch uses BOOST_NO_STD_ALLOCATOR to check if a workaround is needed. It only tries to use the workaround if BOOST_NO_STD_ALLOCATOR is defined.

Markus
Index: dynamic_bitset.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/detail/dynamic_bitset.hpp,v
retrieving revision 1.11
diff -c -r1.11 dynamic_bitset.hpp
*** dynamic_bitset.hpp  4 Feb 2003 09:10:50 -0000       1.11
--- dynamic_bitset.hpp  18 Feb 2003 11:00:39 -0000
***************
*** 64,75 ****
  
        dynamic_bitset_base(size_type num_bits, const Allocator& alloc)
          : dynamic_bitset_alloc_base<Allocator>(alloc),
! #if (defined(_MSC_VER) && (_MSC_VER <= 1300)) || !defined(_CPPLIB_VER) || 
(_CPPLIB_VER < 306) // Dinkumware for VC6/7
            m_bits(dynamic_bitset_alloc_base<Allocator>::
!                  m_alloc.allocate(calc_num_blocks(num_bits), 0)),
  #else
            m_bits(dynamic_bitset_alloc_base<Allocator>::
!                  m_alloc.allocate(calc_num_blocks(num_bits))),
  #endif
            m_num_bits(num_bits),
            m_num_blocks(calc_num_blocks(num_bits))
--- 64,77 ----
  
        dynamic_bitset_base(size_type num_bits, const Allocator& alloc)
          : dynamic_bitset_alloc_base<Allocator>(alloc),
! #ifndef BOOST_NO_STD_ALLOCATOR
            m_bits(dynamic_bitset_alloc_base<Allocator>::
!                  m_alloc.allocate(calc_num_blocks(num_bits))),
  #else
+ #  if (defined(_MSC_VER) && (_MSC_VER <= 1300)) || !defined(_CPPLIB_VER) || 
+(_CPPLIB_VER < 306) // Dinkumware for VC6/7
            m_bits(dynamic_bitset_alloc_base<Allocator>::
!                  m_alloc.allocate(calc_num_blocks(num_bits), 0)),
! #  endif
  #endif
            m_num_bits(num_bits),
            m_num_blocks(calc_num_blocks(num_bits))

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to