#6 BC5 type_traits_test, etc.

5.0
closed
BC5 (4)
5
2005-11-07
2005-10-16
esanfo
No

Restore support for remaining unit tests for bc55 (free-
compiler) and bc56 (CBuilderX).

* build/test/unit/bc55.mak: Build all unit tests.

* stlport/config/stl_bc.h: Add workarounds to restore full
support for std::unexpected_handler and partial support
for std::uncaught_exception. Restore class partial
specialization support for Borland 5.5. Add workaround
to resolve errors in type_traits_test where Borland 5.5
and 5.6 fail to select the correct boolean typedef
(__true_type or __false_type).

* stlport/stdexcept: Include native Borland <except.h>
header to restore full support for
std::unexpected_handler and partial support for
std::uncaught_exception.

* stlport/stl/_algobase.h: Add workarounds in iter_swap,
__iter_swap_aux, __copy_aux, __copy_backward_aux
functions where Borland 5.5 and 5.6 fail to select the
correct boolean typedef. Comment obsolete 'min/max'
workarounds for legacy Borland compilers.

* stlport/stl/_alloc.h: Add workaround in
_STLP_alloc_proxy. Borland compilers complain about
conversion from '__move_source<char*>' to 'char*' in
_STLP_alloc_proxy function.

* stlport/stl/_bvector.h: Add swap(bool __x, bool __y)
function in _Bit_reference struct. Borland compilers fail
to find a match for swap<_Tp,_Alloc>
(_Bit_reference,_Bit_reference).

* stlport/stl/_fstream.c: Add workaround in seekoff
function to resolve a tellg error in fstream_test.

* stlport/stl/_iterator_base.h: Add alternate
_STLP_IS_REF_TYPE_REAL_REF macro. Borland 5.5
and 5.6 may fail to select the correct boolean typedef in
iter_swap function.

* stlport/stl/_move_construct_fwk.h: Add workaround in
_MoveSourceTraits template. Borland 5.6 fails to select
the correct value for _MvImp.

* stlport/stl/_rope.h: Add alternate _IsChar and
_IsWCharT typedefs in _Rope_RopeRep.

* stlport/stl/_string.h: Add alternate _IsIterator and
_IsConstIterator typedefs in _M_insert_dispatch and
_M_replace_dispatch. Borland 5.5 and 5.6 may fail to
select the correct boolean typedef.

* stlport/stl/_uninitialized.h: Add workaround in
__ucopy_aux function. Borland 5.5 and 5.6 may fail to
select the correct boolean typedef for __ucopy_ptrs
function.

* stlport/stl/_vector.h: Add workaround in _Vector_base
(__move_source<_Self> src) function. This should
resolve crash in mvctor_test where Borland compilers
return an incorrect value for _M_end_of_storage in erase
function.

* stlport/stl/debug/_deque.h: Add alternate
_IsNonConstIterator and _IsConstIterator typedefs in
insert(iterator, _InputIterator, _InputIterator). Borland 5.5
and 5.6 may fail to select the correct boolean typedef.

* stlport/stl/debug/_list.h: same.

* stlport/stl/debug/_string.h: same.

* stlport/stl/debug/_vector.h: same.

* stlport/stl/pointers/_void_ptr_traits.h: Add workaround
for qualified specialization bug. Add workaround in void*
cast(_Tp*__ptr) function where Borland 5.5 complains
about a cast from 'const char*' to 'void*'.

* stlport/stl/pointers/_void_ptr_traits.h: Add workarounds
for qualified specialization bug.

* stlport/stl/type_traits.h: Add workarounds in
_BothPtrType, _OKToMemCpy, _TrivialUCopyAux, and
_OKToSwap templates to set a boolean value, which
can then be converted to appropriate boolean type at
runtime. Borland 5.5 and 5.6 fail to select the correct
boolean typedef in type_traits_test.

* test/unit/type_traits_test.cpp: Add workarounds in
are_same_uncv_types, is_pointer_type, reference_type,
are_both_pointer_type and is_ok_to_use_memcpy
functions. Borland 5.5 and 5.6 fail to select the correct
boolean typedef (__true_type or __false_type).

Discussion

  • esanfo
    esanfo
    2005-10-16

    BC5 type_traits_test (zipped diff)

     
    Attachments
    • assigned_to: nobody --> dums
    • status: open --> closed