|
Boost : |
From: Fernando Cacciola (fernando_cacciola_at_[hidden])
Date: 2003-02-04 11:00:41
John Maddock wrote:
>> I was just about to build the filesystem library for the first time
>> on my Win98+BCC 5.5.1 environment, but I got lots of errors from
>> "type_traits/is_convertible.hpp"
>> Since the regression_test shows that this library passed bcc5.6.1
> yesterday,
>> I thought that is_convertible might have changed today. Indeed,
>> version
> 1.10
>> (the previous) works fine. (that is, I was able to build the FS
>> library)
>>
>> I attach here the compiler output using the -Q compiler option (which
> shows
>> extended error information).
>
> It's a builder 5.5.1 bug: is_convertible does not work correctly with
> that compiler (and never has), when one To parameter has a user
> defined constructor.
>
But the problem is that is_convertible<> is currently being used
by, at least, the filesystem library in a way that doesn't work any
more with bcc5.5.1; while it did. The recent changes allowed it to
keep working with bcc5.6 which is why the regression tests didn't
show the problem, but it broke bcc5.5.1.
The following fix, for bcc5.5.1, reverts the is_convertible
definition to the way it was on version1.10.
#if BOOST_WORKAROUND(_BORLANDC_, < 0x560 )
BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_convertible,From,To,(::boost::detail::is_con
vertible_impl<From,To>::value))
#else
template <typename From, typename To>
struct is_convertible_forwarder
{
typedef typename add_reference<From>::type ref_type;
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_and<
::boost::detail::is_convertible_impl<ref_type,To>::value,
::boost::type_traits::ice_not<
::boost::is_array<To>::value
>::value
>::value)
);
};
BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_convertible,From,To,::boost::detail::is_conv
ertible_forwarder<From,To>::value))
#endif
-- Fernando Cacciola
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk