Boost logo

Boost :

From: AlisdairM (alisdair.meredith_at_[hidden])
Date: 2005-06-05 06:04:57


THe following patch should allow Borland BCB6 to pass the
boost_check_equal_str test case. The problem appears to be
pointer-decay of arrays.

cvs diff -w boost\test\test_tools.hpp (in directory D:\Projects\boost)
Index: boost/test/test_tools.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/test/test_tools.hpp,v
retrieving revision 1.53
diff -w -r1.53 test_tools.hpp
285a286,296
> #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
> template<typename T, std::size_t N >
> struct print_log_value< T[N] > {
> void operator()( std::ostream& ostr, T const* t )
> {
> ostr << t; // by default print the value
> }
> };
>
> #endif
>
333a345,354
> #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
> // Borland suffers premature pointer decay passing arrays by reference
> template<typename T, std::size_t N >
> struct print_helper_t< T[ N ] > {
> explicit print_helper_t( T const * t ) : m_t( t ) {}
>
> T const * m_t;
> };
>
> #endif

-- 
AlisdairM

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk